From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6925447760545054720 X-Received: by 2002:aa7:d98f:: with SMTP id u15mr3897994eds.267.1612537198394; Fri, 05 Feb 2021 06:59:58 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:906:adb:: with SMTP id z27ls4717929ejf.1.gmail; Fri, 05 Feb 2021 06:59:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJwA3fo8I90bweXN8OUUm9/inXMXDQur1d7EVXSx3yvSzk3TDiG10oo/QXZ8SZdIRHtH7DGu X-Received: by 2002:a17:906:33c5:: with SMTP id w5mr4461877eja.319.1612537197611; Fri, 05 Feb 2021 06:59:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612537197; cv=none; d=google.com; s=arc-20160816; b=th5y17ZJyot41HrBVj7h16NYPjku+R2heKKOFymekcaIeuOo3CDBhPqbReaQthmTCj I4bD3KRE2fpwv2gp3k7F0QLTTAhJ/2hQIDmIbK5qRFJf312Aqh8yF8RnT/HYBbPCrsxG HYvwNd2Ry8fJ1Q+CSWter8BIlxjHoJokHNNofb03L56QEk6gCYNigGtIH1jpDaBQ045F s2btqWJ6RvWCkJtPLa1N8ekDUvmTlPZ42W29c4OCvbkEmxYizwP9YFrT1Yxg2oWQKP+8 +J8VGHyD3njLLu5f6QRpMz4wPjQckqzif/kvaprbD0mK7CL51Re0DiqSQZeBnHgwnarl bc+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:to:from:date; bh=Zl1vM5CPmoeIeE+4yRCweWTzLVlHn4O7RLXWfk8FV94=; b=F9XFBrZNJfGMJ8BIbY7R02D8Fhesh0cXbO55SGkI6Wdnkc/T+6pzsfCg1GjSXkPo6s h4buwyQOXucf0znhorC8F6nHgVTiM6HqtlKgm/4khnQsW6odRbXMzdVo66lSKnsAXO8F 2rP5pmjgnipGlcCztW7h2Y6dGW5JsA+/bbxG038/Gka8SkGXF7iwGZr6YmrFgs3vQw6r b+5LPaYO/LKCW7OH/yx2iwoehqg0qnl9+E85YLs1iugOGJKU1IPbKHOTk9jVR2ojngJM DjXXzOEMDi1gLAYLtm71OCD7tKVKLe0d0SmNVIAEVyCcMGux2BpxwdOzDKIvKB1LEn6x Z7Ig== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 85.214.156.166 is neither permitted nor denied by best guess record for domain of ibr@radix50.net) smtp.mailfrom=ibr@radix50.net Return-Path: Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id jz19si697286ejb.0.2021.02.05.06.59.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Feb 2021 06:59:57 -0800 (PST) Received-SPF: neutral (google.com: 85.214.156.166 is neither permitted nor denied by best guess record for domain of ibr@radix50.net) client-ip=85.214.156.166; Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 85.214.156.166 is neither permitted nor denied by best guess record for domain of ibr@radix50.net) smtp.mailfrom=ibr@radix50.net Received: from yssyq.m.ilbers.de (host-80-81-17-52.static.customer.m-online.net [80.81.17.52]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8) with ESMTPSA id 115Exsve021374 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 5 Feb 2021 15:59:57 +0100 Date: Fri, 5 Feb 2021 15:59:54 +0100 From: Baurzhan Ismagulov To: isar-users@googlegroups.com Subject: Re: [PATCHv3] wic/plugins: fix kernel version detection for bios Message-ID: <20210205145954.GG20742@yssyq.m.ilbers.de> Mail-Followup-To: isar-users@googlegroups.com References: <20210205114812.6370-1-henning.schild@siemens.com> <420a0704-56cb-fad5-2d51-a6cdffb7bc83@ilbers.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <420a0704-56cb-fad5-2d51-a6cdffb7bc83@ilbers.de> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-TUID: BKk8I+RqinYR 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. 1. Henning, would it be ok if we commit with the following message: 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? With kind regards, Baurzhan.