From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6925447760545054720 X-Received: by 2002:adf:f8cd:: with SMTP id f13mr4987538wrq.381.1612554945688; Fri, 05 Feb 2021 11:55:45 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a1c:4e14:: with SMTP id g20ls2651096wmh.2.canary-gmail; Fri, 05 Feb 2021 11:55:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJztMhpUKQWz9M501YRYwBBkEmh1ooTAT2SvESm6tO4s06GxL7ZznYiPIgI5Tv/G+/n9HHvr X-Received: by 2002:a1c:96d7:: with SMTP id y206mr4951659wmd.9.1612554944787; Fri, 05 Feb 2021 11:55:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612554944; cv=none; d=google.com; s=arc-20160816; b=GLKFNsRIQqC1cYPEJea9Dt781fwd4T2ajFhO0bNCbAdL6aI/lLGT9mLlypKUKQDVvO qABjp8leK8sAhrW6FENot80hTR9vk2ZkaZUqV6ZD2pIO4b5FDSfkRuxi5IAhf8veKRvT M42+RkJcmzwoBhvw4y1PiKZSd6fXfCGRmPZb4XlahMbnu3lm+to9exZj9nKxhh6bOdWV Z/s835tpTGhhPGwPMx5pwyKXXcpJquLXVCb4hPzAjxQr6OM5sKsxFqTKFvWuen/nkdBX SqGcwo8h4bWjb7q7BS6U9fSk8lMdt7sXaAG38FZXvrteSfUfJvK5NyHAxG9oMYJ2gUJR cJMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date; bh=8YGcSBGwT4uksy4arjaWUh9dR+X6TZZGN33UTnThcMs=; b=r9KKleUIzqzVh4w/fMoMMqZkruQh8c2H6aKg8ZDY1BwXtl8w7s3kCp8j1kM/j3A3ii L3s2zHGY94heRiJlb/AntfpcPGZU45ANhg5znO0Nao48JR9jELmeN9xOHSisLjL/4V3Q oegkdisz6DpeieGH+AwTd8bj9qgO3WKxDjzhVWGIcNv1f5CS1afHU2VT9/3gqklGTNrg mufjszPr/R5/sGeMupkmD9I3ggShqgr4RD/k2q6Hz5hHVtSJufV2ntHq0Tbcfc04cXfu t9exLAtiAhxQf/fGhvp3NgbdhsmpIkrhlOGa1Jdtf9dhv93hGyj/2FVZp5qcxoxHXlDX uJOQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.2 as permitted sender) smtp.mailfrom=henning.schild@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from thoth.sbs.de (thoth.sbs.de. [192.35.17.2]) by gmr-mx.google.com with ESMTPS id e11si595635wrd.3.2021.02.05.11.55.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Feb 2021 11:55:44 -0800 (PST) Received-SPF: pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.2 as permitted sender) client-ip=192.35.17.2; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.2 as permitted sender) smtp.mailfrom=henning.schild@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by thoth.sbs.de (8.15.2/8.15.2) with ESMTPS id 115JtiE0025409 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 5 Feb 2021 20:55:44 +0100 Received: from md1za8fc.ad001.siemens.net ([139.22.126.146]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id 115JthlG008503; Fri, 5 Feb 2021 20:55:43 +0100 Date: Fri, 5 Feb 2021 20:55:42 +0100 From: Henning Schild To: Baurzhan Ismagulov Cc: isar-users@googlegroups.com Subject: Re: [PATCHv3] wic/plugins: fix kernel version detection for bios Message-ID: <20210205205542.09c2f41a@md1za8fc.ad001.siemens.net> In-Reply-To: <20210205145954.GG20742@yssyq.m.ilbers.de> References: <20210205114812.6370-1-henning.schild@siemens.com> <420a0704-56cb-fad5-2d51-a6cdffb7bc83@ilbers.de> <20210205145954.GG20742@yssyq.m.ilbers.de> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TUID: 2BZunmuhOEFx Am Fri, 5 Feb 2021 15:59:54 +0100 schrieb Baurzhan Ismagulov : > On Fri, Feb 05, 2021 at 05:45:27PM +0300, Anton Mikanovich wrote: > > Thanks for finding. > > This issue can be found not on even kernel version numbers, but on > > all version end on 4 and 6, because '-amd64' is used as char values > > to be stripped both from begin and from end. Usage of strip() looks > > completely wrong here. > > Looks good to me. > > If there are no objections, I'd suggest to apply this on Monday. Given that it can not be reproduced by you, i would take back the "rush". Probably still worth merging, my layer is currently fixed with a backport using the kas patch mechanism. > > 1. Henning, would it be ok if we commit with the following message: Please send me a diff or go ahead and change it. > From: Henning Schild > > When building an image with legacy bios using wic, wic can fail to > pick up the initrd. > > ERROR: _exec_cmd: install -m 0644 > /build/tmp/work/debian-buster-amd64/bla-image-qemux86-64-wic-img/0.2-r0/rootfs/boot/initrd.img-4.19.0-1-amd64 > /tmp/tmp.7x9N9Wo4wZ/bla-image-debian-buster-qemux86-64.wic/tmp.wic.r10macew/hdd/boot/initrd.img-4.19.0-1-amd64 > returned '1' instead of 0 output: install: cannot stat > '/build/tmp/work/debian-buster-amd64/bla-image-qemux86-64-wic-img/0.2-r0/rootfs/boot/initrd.img-4.19.0-1-amd64': > No such file or directory > > The mechanism used to "cut off the end" seems to cut off too much. > > >>> "vmlinuz-4.19.0-14-amd64".strip('-' + 'amd64') > 'vmlinuz-4.19.0-1' > > But indeed we would hope for 'vmlinuz-4.19.0-14'. The issue affects > all versions ending with 4 and 6, because '-amd64' is used as a set of > characters to be stripped anywhere in the string. Using strip() is > completely wrong here. > > Signed-off-by: Henning Schild > > > 2. We haven't seen this on Isar CI. Care to add a test case? I am a big fan of test cases, but am not sure how to add one here. As far as i understand it the pipeline should fail for amd64. And for all other arches that have numbers that could be in the revisions. So i would say there is no need, sorry i do not understand why you do not see it. Might also be related to the python version, but we should be using the one from the buildchroot. Henning > > With kind regards, > Baurzhan. >