From patchwork Thu Aug 26 11:34:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Babic X-Patchwork-Id: 1521049 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::338; helo=mail-wm1-x338.google.com; envelope-from=swupdate+bncbcxploxj6ikrbp7ytweqmgqeuu3rm6a@googlegroups.com; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20210112 header.b=aHx6qvfM; dkim-atps=neutral Received: from mail-wm1-x338.google.com (mail-wm1-x338.google.com [IPv6:2a00:1450:4864:20::338]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GwLNM6cXTz9sXN for ; Thu, 26 Aug 2021 21:34:26 +1000 (AEST) Received: by mail-wm1-x338.google.com with SMTP id r125-20020a1c2b830000b0290197a4be97b7sf801725wmr.9 for ; Thu, 26 Aug 2021 04:34:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1629977663; cv=pass; d=google.com; s=arc-20160816; b=gkBpx4AD1DBTwvbEc48XRscKmwySAtdKIO8j+CrYRw3cZ37TFTwsb9/70B+wpSNLmJ wHd1WYoSa2tEGWvnCjBjW/RvOuf+/vQ0NOYctF+BuNjRwNdLfCkyqkYLZqnjyi2L+rhc yVHWgQGqwySoF+5SoaCoqjLYZzRbcHTCLVZOWLPBHXYj6vLHGDTBNHalo5OK3OoxcybW TGcMpgQVmp52PfYHB4TSaw6y5HCga/pjgkKAxgPuo61txjFjByYld8wYyyS6vtl4ePS2 xFXNYBoOwFNFM9MAV9MjfVH2wAJtQQZjFEVaOWBn73cftVg9GaoxW81iNiv+6F8wfqw/ vX3A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=zSBsXCNSXZAVTInMqhN+TZqNujgDGGV1tEW8gC1ns+o=; b=XWZA0bJ2tyXdLv5zJo06OOOWCF5DMNnuN1yE7QE8t51X+6s9KuoS44/kM7qo5mUS4e Ia8xxbUQi+kv6OMyXytyAeULT/zuA6XcU4Tgu1V62ZlkQFmIrZmjA6T9SBMWzvm5+NR/ Rpx92uVuyJDh8w4dlHJDjOprpnwYQWvJCreQrpLuOOPRfbnAwfankGhIOyYHT9e/pTW+ a9uakky8mtGu2pCivcuy9ehLu1x6T8IefcGz+pIlIMuqlc33tQZU2lPKG5DwHinro4Rj v3OA9J0kkOBsFVz5/HrKL9KqzRsZFSPGT3rvpMsLczqXkXLQn8+7PpV2AtBoSQC12lhK KKhA== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=neutral (google.com: 2001:a60:0:28:0:1:25:1 is neither permitted nor denied by domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=zSBsXCNSXZAVTInMqhN+TZqNujgDGGV1tEW8gC1ns+o=; b=aHx6qvfMShzmaWknF+uiBg5pqZEpklpEvv+UsIZSP5fjtifhTsKHJqsQjfobJDoR82 lUPGuBsXsE3kfC04b5zIa34Kj0M39rB1LK8PdWA7y1EKLIsv6QEqX7R6hlxGTF/ZMTx0 AI+Q49ONpz3jIZcUN7ao5T0wvxBatvUPPlyYIocN3SSZgAZa5KlDPJ9yxFYCKW7Qejap EXOmljn/wqavpCNjbHt8tHbNu5hiVxr/Kt3t8xT5oQPukFj6wwivGWz2obXIEBiUl0og BNbUNh0qEBwBQVjRLGmc40ovIBZfIanE+qDQiQwtSxZbANudJWUPDSlj3qpgg/yYw2Rh NJ/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=zSBsXCNSXZAVTInMqhN+TZqNujgDGGV1tEW8gC1ns+o=; b=YYdooFGN4lJxfKKOiHzzGffJBgVAJh+s7cyGTyFOhpmo22WtNvYRVNP5SvbbabVGre PbLxz2lXRFualLK2Oxs7vuZR78tCQ1JXSHHWLPzTzwxXmLq5rDfOSi2J1EUO/at7eMGD bYs4GDNDFuoAcdqrvjhFOIwWculrOGjIxoQXttjhA2JaAajV8/mlI+TkYLwaXjlwnddD fql7R129Uq2yVKVtaHWe5CE/Jvw3+5uqPfpwyFVwjxPUcrnFduXbcHAIbNMhnu1ulVnU JRYBSHpqfilHJHKktnRFg0Fot/524ad4mq2SxS061X3Jktu/czDuFnWfVCGpqBb+5UwX lRTg== Sender: swupdate@googlegroups.com X-Gm-Message-State: AOAM5319t4+o9mYt5tRw5XF5pTdhq9j8aS4LuXDxnjbdc69B+CJqtuSR 8CZPl+38urjrdgxC0Bl5R3Y= X-Google-Smtp-Source: ABdhPJw5B6WxfUtqftWiCgyqf5S7QuUO6dJT4XGhSRBSaOyKQnL5DD/4X5V0SxftCPKe70upj1v6JA== X-Received: by 2002:a1c:9acc:: with SMTP id c195mr14162995wme.69.1629977663696; Thu, 26 Aug 2021 04:34:23 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a05:600c:1994:: with SMTP id t20ls4440369wmq.2.canary-gmail; Thu, 26 Aug 2021 04:34:22 -0700 (PDT) X-Received: by 2002:a1c:7506:: with SMTP id o6mr14322377wmc.112.1629977662823; Thu, 26 Aug 2021 04:34:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629977662; cv=none; d=google.com; s=arc-20160816; b=yszcbsjRHsHDYAZ185TnP377pHALgAPJ1Wp+sFZtR0cgv9cQvXxYXe3CXJB2TQ4W3D TbN4GGYhjXSFiBMU98IivnIcHWDLnZpxSsE2H53G2h57JFHBxerRFfwl9z5Zj26sVYKV bB0mDN3Y7lWxIYVwsQLA4bOcGeWWKCUgakkLHArurOWbOCp2jy9KOfkldGDc+IYR6kLk iLIryiKuJUv8bNKUksw7y4DsnMs9+augtP3XhtZIehOcheFFbS5yrPd1grySNiQ5oDiN IP17lGJkidgLhNKZltb2YsMZd8+UUa+3QyY+FfUv6r2W7i/kP4gExZa7TIYoZebk1HOc JLNA== 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:date:subject:cc:to:from; bh=J8+VBaTy+NRHhGggd4+X1pKavhrZvwLyBHXb9+yUDoo=; b=IDeVHOij7SEl+XprS+HN0D6A+62g65gmUtFWs1RlWLhPGFKJyNaxS0Gou+4GpxURdW hX/h03b5U+gadQHeqFTfYowkGfHBA6kNDKtAr2Nm9zpX4ZRsip2Wkyv4X++pEzPErWV8 nwuVWdU2PFDpmX0v7rR9L5OnsZU/qUImBzQ33tmcoEIkwyaH83drYxhnktv9jZaQQzQ/ LfLBuXFwHyOps7aDCF3awLXePkFOLkYugrl52N2yVqdn26eroudmuFVHYnwfVI9zT+C7 TyGpVdx2ZQGjrwJPNagnN5yPRs2vMdo7HmSnOhPxDpq9WOwdkPgWQViqQmErb17VRMwS BHWg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 2001:a60:0:28:0:1:25:1 is neither permitted nor denied by domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de Received: from mail-out.m-online.net (mail-out.m-online.net. [2001:a60:0:28:0:1:25:1]) by gmr-mx.google.com with ESMTPS id z70si694761wmc.0.2021.08.26.04.34.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Aug 2021 04:34:22 -0700 (PDT) Received-SPF: neutral (google.com: 2001:a60:0:28:0:1:25:1 is neither permitted nor denied by domain of sbabic@denx.de) client-ip=2001:a60:0:28:0:1:25:1; Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4GwLNG4Qv5z1sHHb; Thu, 26 Aug 2021 13:34:22 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4GwLNG4HxFz1r6P8; Thu, 26 Aug 2021 13:34:22 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id K_ZN6wRp1xLG; Thu, 26 Aug 2021 13:34:21 +0200 (CEST) Received: from babic.homelinux.org (host-88-217-136-221.customer.m-online.net [88.217.136.221]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS; Thu, 26 Aug 2021 13:34:21 +0200 (CEST) Received: from localhost (mail.babic.homelinux.org [127.0.0.1]) by babic.homelinux.org (Postfix) with ESMTP id 757D24540226; Thu, 26 Aug 2021 13:34:21 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at babic.homelinux.org Received: from babic.homelinux.org ([127.0.0.1]) by localhost (mail.babic.homelinux.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6GK5XOKDmraf; Thu, 26 Aug 2021 13:34:19 +0200 (CEST) Received: from paperino.fritz.box (paperino.fritz.box [192.168.178.48]) by babic.homelinux.org (Postfix) with ESMTP id 2D0764541322; Thu, 26 Aug 2021 13:34:15 +0200 (CEST) From: Stefano Babic To: swupdate@googlegroups.com Cc: Stefano Babic Subject: [swupdate] [[meta-swupdate] PATCH 3/9] swupdate-common: autoversion should use SWUPDATE_IMAGES Date: Thu, 26 Aug 2021 13:34:06 +0200 Message-Id: <20210826113412.327976-4-sbabic@denx.de> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210826113412.327976-1-sbabic@denx.de> References: <20210826113412.327976-1-sbabic@denx.de> MIME-Version: 1.0 X-Original-Sender: sbabic@denx.de X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 2001:a60:0:28:0:1:25:1 is neither permitted nor denied by domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Autoversion tries to get the name of packages from the list of files for the CPIO archive, while the list of packages is already set in the SWUPDATE_IMAGES variable. Signed-off-by: Stefano Babic --- classes/swupdate-common.bbclass | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/classes/swupdate-common.bbclass b/classes/swupdate-common.bbclass index c95511f..1467b74 100644 --- a/classes/swupdate-common.bbclass +++ b/classes/swupdate-common.bbclass @@ -129,7 +129,7 @@ def swupdate_expand_bitbake_variables(d, s): for line in write_lines: f.write(line) -def swupdate_expand_auto_versions(d, s, list_for_cpio): +def swupdate_expand_auto_versions(d, s): import re import oe.packagedata AUTO_VERSION_TAG = "@SWU_AUTO_VERSION" @@ -169,7 +169,7 @@ def swupdate_expand_auto_versions(d, s, list_for_cpio): group = data[m.start():m.end()] - (package, pkg_name_defined) = get_package_name(group, list_for_cpio) + (package, pkg_name_defined) = get_package_name(group, (d.getVar('SWUPDATE_IMAGES', True) or "").split()) pkg_info = os.path.join(d.getVar('PKGDATA_DIR'), 'runtime-reverse', package) pkgdata = oe.packagedata.read_pkgdatafile(pkg_info) @@ -194,11 +194,11 @@ def swupdate_expand_auto_versions(d, s, list_for_cpio): with open(os.path.join(s, "sw-description"), 'w+') as f: f.write(data) -def prepare_sw_description(d, s, list_for_cpio): +def prepare_sw_description(d, s): import shutil swupdate_expand_bitbake_variables(d, s) - swupdate_expand_auto_versions(d, s, list_for_cpio) + swupdate_expand_auto_versions(d, s) swupdate_write_sha256(s) @@ -340,7 +340,7 @@ python do_swuimage () { if not add_image_to_swu(deploydir, image, s, encrypted): bb.fatal("swupdate cannot find %s image file" % image) - prepare_sw_description(d, s, list_for_cpio) + prepare_sw_description(d, s) line = 'for i in ' + ' '.join(list_for_cpio) + '; do echo $i;done | cpio -ov -H crc >' + os.path.join(imgdeploydir,d.getVar('IMAGE_NAME', True) + '.swu') os.system("cd " + s + ";" + line)