From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6751292434813026304 X-Received: by 2002:adf:f192:: with SMTP id h18mr3619371wro.148.1573056278366; Wed, 06 Nov 2019 08:04:38 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:600c:1:: with SMTP id g1ls2474438wmc.2.canary-gmail; Wed, 06 Nov 2019 08:04:37 -0800 (PST) X-Google-Smtp-Source: APXvYqwx58kWjX+UyeoqiK0YvBypboBQDMMJdcXzTCTIMDlQoFybwvfgO6hbQC6hq3XUBY/nAbDx X-Received: by 2002:a1c:e386:: with SMTP id a128mr3344221wmh.52.1573056277705; Wed, 06 Nov 2019 08:04:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573056277; cv=none; d=google.com; s=arc-20160816; b=lhtyuJMVPRHM3t7866NoZBTWiUwYqysQcshHTIXrpDrbsPycs2HTfVvCvKhIxOaMVg CDx73/RlRBJmGaDAX+pwauHBSjgYVkBgv4M3abMd5fxqx4cDuqGNJGZZ1+5EMpoO8/PD 37SZTKwBAufIJKzBrZLWibHfc17A/REXleD4KwSJvI3+ruQDGcDmFEwqHVDzZrGzE2sz rSMU4aLRsqD8MFQNguzKOxgVQdwfz112fems9EpHSRvMIA2bD3yMla6zbeYPqgRLpMuQ H/aNP2eEr5cCS5QiKSJ7FzBV9qpPjRyStlcHgZLWynqtXo3fQDUa/tzuAw1UE6//CPGA kHGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:to:subject; bh=jaqgHz1A2apJX8jLCsDE5IhTBZXAAx8eSlIVJ0ZmHCw=; b=Rrr3CrLRDx0DIh/esUn+fGtYOByPudnQ1MPfj7aZ3bLC+hHj3XKTJnG5m3u5szl80Q fqNCDF34stxouq+lBp6s2W2ogZQTf6ww5H7Fp/OK9qafsQqHDMeEF2RHrvaq6nOy1+Gw r4phGhqljOsKzLHLASafMEtwXMRa6Uziv1PEzb8LRUE4DpXjIQ08xYjkU/hWEwA5Y7VY 25yeY7Lp7uqewiluVhDc/nJQNt3e02G25ynFOKqzWY+cutPVrFIyn9PPH4he27DgFgqf XCbHN64sDmOrAvdF4DT6JW9DZhjjOyj3HvJwPz7RJdtlxotTpdyJm9xQiZdaVYcxyRot pbKQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 194.138.37.39 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from lizzard.sbs.de (lizzard.sbs.de. [194.138.37.39]) by gmr-mx.google.com with ESMTPS id w10si594973wru.4.2019.11.06.08.04.37 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Nov 2019 08:04:37 -0800 (PST) Received-SPF: pass (google.com: domain of jan.kiszka@siemens.com designates 194.138.37.39 as permitted sender) client-ip=194.138.37.39; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 194.138.37.39 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from mail1.sbs.de (mail1.sbs.de [192.129.41.35]) by lizzard.sbs.de (8.15.2/8.15.2) with ESMTPS id xA6G4bhL007873 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 6 Nov 2019 17:04:37 +0100 Received: from [139.22.41.172] ([139.22.41.172]) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id xA6G4aoN004465; Wed, 6 Nov 2019 17:04:37 +0100 Subject: Re: [PATCH 05/10] linux-mainline: fix stripping of .0 from the kernel version To: Cedric Hombourger , isar-users@googlegroups.com References: <1571907744-1121-1-git-send-email-Cedric_Hombourger@mentor.com> <1571907744-1121-6-git-send-email-Cedric_Hombourger@mentor.com> From: Jan Kiszka Message-ID: Date: Wed, 6 Nov 2019 17:04:36 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1 MIME-Version: 1.0 In-Reply-To: <1571907744-1121-6-git-send-email-Cedric_Hombourger@mentor.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: zFXT3HvSpKmZ On 24.10.19 11:02, Cedric Hombourger wrote: > 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 > --- > 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 \ > Oh, yeah... good one. Jan -- Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux