public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: isar-users <isar-users@googlegroups.com>
Subject: [PATCH v5 2/5] linux-mainline: fix stripping of .0 from the kernel version
Date: Tue, 10 Dec 2019 19:22:05 +0100	[thread overview]
Message-ID: <cbd706f415d306501378bd9b6ce27049eb9f236f.1576002128.git.jan.kiszka@siemens.com> (raw)
In-Reply-To: <cover.1576002128.git.jan.kiszka@siemens.com>
In-Reply-To: <cover.1576002128.git.jan.kiszka@siemens.com>

From: Cedric Hombourger <Cedric_Hombourger@mentor.com>

The strip() function was used to strip the trailing .0 from the kernel
version since it is omitted in the upstream archive file names. That
function is actually taking a character set as argument not a substring.
This was causing ARCHIVE_VERSION to expand to "4.19.8" when the user
provided version was "4.19.80". The inline python code was changed to
check if the version ends with ".0" and only then remove the last two
characters.

Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 meta-isar/recipes-kernel/linux/linux-mainline_4.19.0.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta-isar/recipes-kernel/linux/linux-mainline_4.19.0.bb b/meta-isar/recipes-kernel/linux/linux-mainline_4.19.0.bb
index e50e149..127f6e2 100644
--- a/meta-isar/recipes-kernel/linux/linux-mainline_4.19.0.bb
+++ b/meta-isar/recipes-kernel/linux/linux-mainline_4.19.0.bb
@@ -7,7 +7,7 @@
 
 require recipes-kernel/linux/linux-custom.inc
 
-ARCHIVE_VERSION = "${@d.getVar('PV').strip('.0')}"
+ARCHIVE_VERSION = "${@ d.getVar('PV')[:-2] if d.getVar('PV').endswith('.0') else d.getVar('PV') }"
 
 SRC_URI += " \
     https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-${ARCHIVE_VERSION}.tar.xz \
-- 
2.16.4


  parent reply	other threads:[~2019-12-10 18:22 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-10 18:22 [PATCH v5 0/5] linux-custom recipe rework Jan Kiszka
2019-12-10 18:22 ` [PATCH v5 1/5] recipes-kernel/linux: make KERNEL_DEFCONFIG support in-tree defconfigs Jan Kiszka
2019-12-10 18:22 ` Jan Kiszka [this message]
2019-12-10 18:22 ` [PATCH v5 3/5] linux-mainline: update from 4.19.0 to 4.19.88 Jan Kiszka
2019-12-10 18:22 ` [PATCH v5 4/5] linux-custom: rewrite to no longer depend on the kernel's builddeb Jan Kiszka
2019-12-11 14:40   ` Jan Kiszka
2019-12-11 15:20   ` Gylstorff Quirin
2019-12-11 15:43     ` Jan Kiszka
2019-12-11 18:36       ` Jan Kiszka
2019-12-11 22:09         ` Henning Schild
2019-12-12  7:57           ` Gylstorff Quirin
2019-12-12  8:01             ` Jan Kiszka
2019-12-12  9:46               ` Gylstorff Quirin
2019-12-12 10:10                 ` Gylstorff Quirin
2019-12-10 18:22 ` [PATCH v5 5/5] linux-mainline: Test config fragments Jan Kiszka
2019-12-19 15:19 ` [PATCH v5 0/5] linux-custom recipe rework cedric_hombourger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cbd706f415d306501378bd9b6ce27049eb9f236f.1576002128.git.jan.kiszka@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=isar-users@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox