From patchwork Wed Nov 1 00:05:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoann Congal X-Patchwork-Id: 33238 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id B96F7C41535 for ; Wed, 1 Nov 2023 00:06:15 +0000 (UTC) Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) by mx.groups.io with SMTP id smtpd.web10.10941.1698797173919194732 for ; Tue, 31 Oct 2023 17:06:14 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@smile-fr.20230601.gappssmtp.com header.s=20230601 header.b=qGXT2/K8; spf=pass (domain: smile.fr, ip: 209.85.128.50, mailfrom: yoann.congal@smile.fr) Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-4084b0223ccso47892745e9.2 for ; Tue, 31 Oct 2023 17:06:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile-fr.20230601.gappssmtp.com; s=20230601; t=1698797171; x=1699401971; darn=lists.yoctoproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=yh5nEzraxmSRNNwuQ6uIWkqjMagg6cIr0x2xOWSvQVQ=; b=qGXT2/K8W2rwDR5lgHB+5GDX9DoDCzrGMBZNMBYdQ+/FUCmOjBWzVbaMO8W7VlOlXQ wiSy0jm4VlG0PwGU2bRs+CApTlUTV26cU8o17tmMw7/qIIybM7cUEX/J+z0y8E+6Yfj2 coNrKlsBsKWIP8B4YOhC/kwpvKL67yv/SxVLi+PLqiyerU1MvuFbUPBDKtPvn6bVWOJi XMUmfajoX+6zyhYtRSPL5BhVDtFLEDCTuebNohKezcPZyjjNsKhEnsvpF0BP/1n2o1kj L23C2dfyyzk+AA7nCMqx42Y76B5pjhNgUo6qFyqwWyou/u9gNOYEvHEKDXIkerrV8zDl 4QTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698797171; x=1699401971; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yh5nEzraxmSRNNwuQ6uIWkqjMagg6cIr0x2xOWSvQVQ=; b=ZNn9p3zAPsRz3J3mMXrTd8I0dSPsG1n+hoCyoeKM8rIbXmOP4a6otA718HX6aaoB+V HXQD1U0phbyVWK/E8xT6G3NDcH6DBLtB8DnpWJBG8BNhOaQsrUIYVQ+XuAD96hwQlK6X aB6/Xpf/rQWxrf08axXj+AYULhcL6fqbX5+z5i02qYZ2IfpBVIhLXXB1f8r1FtHMSdOa OmE5v5wcQ5ubteeY8vxPMdOGUjn095hWTimLDFCMfUvVaIpoDcfNvRXRJKL/rnVINvto NKzC4+azwb6jRLW5AV7zsXAhsmM/5ZiPqd9rrZc8Bv591DHfsPN3Xmp9sUQiuI0BZ/PY 773A== X-Gm-Message-State: AOJu0YygerZFuRFcLhNL2q5SHPnO6tsPsxL2sGtOQSAlN/LOUz6whtpi XeRs+XAosyzwARpSosP6DjLcngfDMkJCukJlzSc= X-Google-Smtp-Source: AGHT+IHhNRiBC7RpMP5/mh8sIM7XZTPdBJjhb0yC+0EH5rin4RpxnOIhNU/5TuVdNhhECO2uBwgaHw== X-Received: by 2002:a05:6000:1569:b0:32f:7bee:f300 with SMTP id 9-20020a056000156900b0032f7beef300mr10778461wrz.4.1698797171451; Tue, 31 Oct 2023 17:06:11 -0700 (PDT) Received: from P-ASN-ECS-830T8C3.numericable.fr ([89.159.1.53]) by smtp.gmail.com with ESMTPSA id m5-20020adfe945000000b0032f7cc56509sm2571620wrn.98.2023.10.31.17.06.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Oct 2023 17:06:11 -0700 (PDT) From: Yoann Congal To: yocto@lists.yoctoproject.org Cc: Alex Kanavin , Yoann Congal Subject: [auh][PATCH 1/6] upgrade-helper.py: simplify a condition Date: Wed, 1 Nov 2023 01:05:29 +0100 Message-Id: <20231101000534.241551-2-yoann.congal@smile.fr> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20231101000534.241551-1-yoann.congal@smile.fr> References: <20231101000534.241551-1-yoann.congal@smile.fr> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 01 Nov 2023 00:06:15 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto/message/61539 Both branches contained the same code Signed-off-by: Yoann Congal --- upgrade-helper.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/upgrade-helper.py b/upgrade-helper.py index 1176a73..57bf59a 100755 --- a/upgrade-helper.py +++ b/upgrade-helper.py @@ -674,9 +674,7 @@ class UniverseUpdater(Updater): if status == 'UPDATE' and not no_upgrade_reason: # Always do the upgrade if recipes are specified - if self.recipes and pn in self.recipes: - pkgs_list.append((pn, cur_ver, next_ver, maintainer, revision)) - elif self._pkg_upgradable(pn, next_ver, maintainer): + if self.recipes and pn in self.recipes or self._pkg_upgradable(pn, next_ver, maintainer): pkgs_list.append((pn, cur_ver, next_ver, maintainer, revision)) else: if no_upgrade_reason: From patchwork Wed Nov 1 00:05:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoann Congal X-Patchwork-Id: 33237 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id B4FA4C4332F for ; Wed, 1 Nov 2023 00:06:15 +0000 (UTC) Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) by mx.groups.io with SMTP id smtpd.web10.10942.1698797174368952767 for ; Tue, 31 Oct 2023 17:06:14 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@smile-fr.20230601.gappssmtp.com header.s=20230601 header.b=yuWQwhO0; spf=pass (domain: smile.fr, ip: 209.85.221.50, mailfrom: yoann.congal@smile.fr) Received: by mail-wr1-f50.google.com with SMTP id ffacd0b85a97d-32daeed7771so3867017f8f.3 for ; Tue, 31 Oct 2023 17:06:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile-fr.20230601.gappssmtp.com; s=20230601; t=1698797172; x=1699401972; darn=lists.yoctoproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7cCxkz6yXT59SKPrrRwbz8z9Un3DMts9EGMulAXNyik=; b=yuWQwhO0EnVM7aBCoBjcsU9O/X/edo65JMcvMRxWhQOn33H47nK3nPBcXULva1XkiQ 6uRZ6MTui4MgouObGqmBVNKR6gM8AIdxl2H4iR5c9+Ifc7m16iC8F51JcLJkJbYDficp 1Ib67NdCkPd+j1J6mD7BFkhAD7k4+RNNZh11YLCzX75VRx0XRoJGr+J0yU2mzhWVjiEF FtwqsHniv09o5uBLVbISY2CQcBGASEigrn5fz+577V43YsJYpDVqX27BT0mPXXB1EHCv 2JVIrOhLKzF/0CxkLsvWx4YqrT2K9WJ6yWj3uWkLTJaCDn4x3BPFbrCb4HQSIaWvoIds etvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698797172; x=1699401972; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7cCxkz6yXT59SKPrrRwbz8z9Un3DMts9EGMulAXNyik=; b=BnFAM+DCFTXpJorwaW4H2vh3idbdNURNUEiRoCkVooLB5dZ4kapL/O5BRBHwQrr/2i xrjAA+M0lakCoLM5rh2DSPW2y0aDCL5rN7QeRTIK39+KA3l9y4NsyJttrau4lqv5c7FZ hFJDeEQuizirSzv5nEA37ix7Zz88ZaVW19m4M/jpeRsiYsJqRHw04s/sQJpoePvVRUwy F/yqTli6dOr5Gta0ZZpdMInw0BPMfxCeLMELb09T0CmHl8gP+PM1kywL993Ni0RBpUlj 661Ep3wy2T7/dKSeZHpColeYYeqIt830cTuysc9i7HEwnf+qyw4X90Q4cA4XCtZm/dNZ TCTA== X-Gm-Message-State: AOJu0Yz5zR+jVf8yjkn23mqgD8ZxGhIuxEG8LiACjCKhFVrJU1fPOV4W bhqByBtFBfofdzzylAUflGbFBPaSeC98l6BzrBg= X-Google-Smtp-Source: AGHT+IFTQrG1oirNlwMRxjUuIzyLsjmKRjslgSVXj6XUugGZvC85Vw9m1AWsJlzow396BOzrDJPDMg== X-Received: by 2002:a5d:4e03:0:b0:32d:83b7:bdb3 with SMTP id p3-20020a5d4e03000000b0032d83b7bdb3mr9030181wrt.70.1698797171931; Tue, 31 Oct 2023 17:06:11 -0700 (PDT) Received: from P-ASN-ECS-830T8C3.numericable.fr ([89.159.1.53]) by smtp.gmail.com with ESMTPSA id m5-20020adfe945000000b0032f7cc56509sm2571620wrn.98.2023.10.31.17.06.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Oct 2023 17:06:11 -0700 (PDT) From: Yoann Congal To: yocto@lists.yoctoproject.org Cc: Alex Kanavin , Yoann Congal Subject: [auh][PATCH 2/6] upgrade-helper.py: refactor _get_packages_to_upgrade to return a dict Date: Wed, 1 Nov 2023 01:05:30 +0100 Message-Id: <20231101000534.241551-3-yoann.congal@smile.fr> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20231101000534.241551-1-yoann.congal@smile.fr> References: <20231101000534.241551-1-yoann.congal@smile.fr> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 01 Nov 2023 00:06:15 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto/message/61540 Signed-off-by: Yoann Congal --- upgrade-helper.py | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/upgrade-helper.py b/upgrade-helper.py index 57bf59a..2538d61 100755 --- a/upgrade-helper.py +++ b/upgrade-helper.py @@ -440,15 +440,23 @@ class Updater(object): pkgs_ctx = {} I(" ########### The list of recipes to be upgraded #############") - for p, ov, nv, m, r in pkgs_to_upgrade: - I(" %s, %s, %s, %s, %s" % (p, ov, nv, m, r)) + for pkg_to_upgrade in pkgs_to_upgrade: + I(" %s, %s, %s, %s, %s" % ( + pkg_to_upgrade["pn"], + pkg_to_upgrade["cur_ver"], + pkg_to_upgrade["next_ver"], + pkg_to_upgrade["maintainer"], + pkg_to_upgrade["revision"], + )) + + p = pkg_to_upgrade["pn"] pkgs_ctx[p] = {} pkgs_ctx[p]['PN'] = p - pkgs_ctx[p]['PV'] = ov - pkgs_ctx[p]['NPV'] = nv - pkgs_ctx[p]['MAINTAINER'] = m - pkgs_ctx[p]['NSRCREV'] = r + pkgs_ctx[p]['PV'] = pkg_to_upgrade["cur_ver"] + pkgs_ctx[p]['NPV'] = pkg_to_upgrade["next_ver"] + pkgs_ctx[p]['MAINTAINER'] = pkg_to_upgrade["maintainer"] + pkgs_ctx[p]['NSRCREV'] = pkg_to_upgrade["revision"] pkgs_ctx[p]['base_dir'] = self.uh_recipes_all_dir I(" ############################################################") @@ -471,7 +479,8 @@ class Updater(object): succeeded_pkgs_ctx = [] failed_pkgs_ctx = [] attempted_pkgs = 0 - for pn, _, _, _, _ in pkgs_to_upgrade: + for pkg_to_upgrade in pkgs_to_upgrade: + pn = pkg_to_upgrade["pn"] pkg_ctx = pkgs_ctx[pn] pkg_ctx['error'] = None @@ -675,7 +684,14 @@ class UniverseUpdater(Updater): if status == 'UPDATE' and not no_upgrade_reason: # Always do the upgrade if recipes are specified if self.recipes and pn in self.recipes or self._pkg_upgradable(pn, next_ver, maintainer): - pkgs_list.append((pn, cur_ver, next_ver, maintainer, revision)) + pkg_to_upgrade = { + "pn": pn, + "cur_ver": cur_ver, + "next_ver": next_ver, + "maintainer": maintainer, + "revision": revision + } + pkgs_list.append(pkg_to_upgrade) else: if no_upgrade_reason: I(" Skip package %s (status = %s, current version = %s," \ From patchwork Wed Nov 1 00:05:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoann Congal X-Patchwork-Id: 33240 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id A2622C4332F for ; Wed, 1 Nov 2023 00:06:25 +0000 (UTC) Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) by mx.groups.io with SMTP id smtpd.web10.10944.1698797175503175933 for ; Tue, 31 Oct 2023 17:06:15 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@smile-fr.20230601.gappssmtp.com header.s=20230601 header.b=aEKs2D4R; spf=pass (domain: smile.fr, ip: 209.85.221.42, mailfrom: yoann.congal@smile.fr) Received: by mail-wr1-f42.google.com with SMTP id ffacd0b85a97d-32d80ae19f8so4197080f8f.2 for ; Tue, 31 Oct 2023 17:06:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile-fr.20230601.gappssmtp.com; s=20230601; t=1698797173; x=1699401973; darn=lists.yoctoproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=uObdY10+HIgIw1DzAS/FjxuPQ9H+ZkQ+Ui9gzy4pkEA=; b=aEKs2D4R5aXs9nQjYS0Bzs6gBLcHpGJDof5s9BuvbukMzaGB6qgFKZpabzrZRvetEz INqQl7vr+3F2cUpEOS8HX80xnDmkmsTAtyOdHjwpDLmFaMhm0yyTejNmCVTsHuYvvfbZ 5Pr5QbPHuGXFMP9lhB1cw4dB5HlswvITAUvw3tAkG0rrChbK4iix7bvkGuPt0XjuCvxM 6hYkJaxkV7MGrVjB7LVFT/m4MfPbr1n+DE9NURLOIeZtualvAdKVVKSP/3ALh9fFGe9k mOKEnOsYMo+NQ5m8fm6nCF1X8rUU1tcsNgsuMALtFAkzkSTaBS674UNGePXGbvDLPpID Mj3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698797173; x=1699401973; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=uObdY10+HIgIw1DzAS/FjxuPQ9H+ZkQ+Ui9gzy4pkEA=; b=T25/Jr2npcHzaAxY7fX9XSam06kfeuEVRcv8SI0/oZYMc2iX/v6CxhajL1gOp2M45n YXrAlL9bf5SThvXmQmQhbunmEumO6AK/WhsTcuCKHUzUFpV91g8HY4gsketLm3633Y6k zgJWVqZhD/LX1dIvfj/A/kVWDUuT/m0tSiCMyRMB/7kEGt0Awv7BDW4QHOnMH8U5Q3LT WogIZr+0Su+Sogj39M7vogOr1qZ18own7yhFCp1IzljWgO2fqZ5eSECCgWHwffeaf9D8 lAGIfShqCUkTe4FrDlkQz1jmxd9m9oWYnW9yexIvm7ea0d98++QC8N4BVNKcGf6/Zjfx DbqA== X-Gm-Message-State: AOJu0YyczIU2MzCxu22Ajtw3Kr8anM9cTyMPmTPziCfcD4hTDqEmXc1v u4qCWb4DuzEkCykd1wFBuZPHp97w61VXRXohXhU= X-Google-Smtp-Source: AGHT+IFjFYJYdBTL2K+LlJziVAbkc/9LEm+KhtmbN21+QnUcLfe5KUERUlO1YyoDkOqQEN7Nxn1fJA== X-Received: by 2002:a5d:64c5:0:b0:32f:952f:c524 with SMTP id f5-20020a5d64c5000000b0032f952fc524mr2235667wri.10.1698797173321; Tue, 31 Oct 2023 17:06:13 -0700 (PDT) Received: from P-ASN-ECS-830T8C3.numericable.fr ([89.159.1.53]) by smtp.gmail.com with ESMTPSA id m5-20020adfe945000000b0032f7cc56509sm2571620wrn.98.2023.10.31.17.06.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Oct 2023 17:06:12 -0700 (PDT) From: Yoann Congal To: yocto@lists.yoctoproject.org Cc: Alex Kanavin , Yoann Congal Subject: [auh][PATCH 3/6] upgrade-helper.py: extract the inner function of get_packages_to_upgrade Date: Wed, 1 Nov 2023 01:05:31 +0100 Message-Id: <20231101000534.241551-4-yoann.congal@smile.fr> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20231101000534.241551-1-yoann.congal@smile.fr> References: <20231101000534.241551-1-yoann.congal@smile.fr> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 01 Nov 2023 00:06:25 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto/message/61541 This is to prepare for the futur loop on layers. Signed-off-by: Yoann Congal --- upgrade-helper.py | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/upgrade-helper.py b/upgrade-helper.py index 2538d61..bc485b8 100755 --- a/upgrade-helper.py +++ b/upgrade-helper.py @@ -671,12 +671,10 @@ class UniverseUpdater(Updater): return True def _get_packages_to_upgrade(self, packages=None): - - pkgs = oe.recipeutils.get_recipe_upgrade_status(self.recipes) - - pkgs_list = [] - for pkg in pkgs: - pn, status, cur_ver, next_ver, maintainer, revision, no_upgrade_reason = pkg + + # Prepare a single pkg dict data (or None is not upgradable) from recipeutils.get_recipe_upgrade_status data. + def _get_pkg_to_upgrade(self, pn, status, cur_ver, next_ver, maintainer, revision, no_upgrade_reason): + pkg_to_upgrade = None if self.args.to_version: next_ver = self.args.to_version @@ -691,7 +689,6 @@ class UniverseUpdater(Updater): "maintainer": maintainer, "revision": revision } - pkgs_list.append(pkg_to_upgrade) else: if no_upgrade_reason: I(" Skip package %s (status = %s, current version = %s," \ @@ -702,6 +699,18 @@ class UniverseUpdater(Updater): " next version = %s)" % (pn, status, cur_ver, next_ver)) + return pkg_to_upgrade + + pkgs = oe.recipeutils.get_recipe_upgrade_status(self.recipes) + + pkgs_list = [] + for pkg in pkgs: + pn, status, cur_ver, next_ver, maintainer, revision, no_upgrade_reason = pkg + + pkg_to_upgrade = _get_pkg_to_upgrade(self, pn, status, cur_ver, next_ver, maintainer, revision, no_upgrade_reason) + if pkg_to_upgrade: + pkgs_list.append(pkg_to_upgrade) + return pkgs_list def pkg_upgrade_handler(self, pkg_ctx): From patchwork Wed Nov 1 00:05:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoann Congal X-Patchwork-Id: 33242 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id A6AA4C4167B for ; Wed, 1 Nov 2023 00:06:25 +0000 (UTC) Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com [209.85.167.49]) by mx.groups.io with SMTP id smtpd.web11.11094.1698797176401930435 for ; Tue, 31 Oct 2023 17:06:17 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@smile-fr.20230601.gappssmtp.com header.s=20230601 header.b=aALZQjpo; spf=pass (domain: smile.fr, ip: 209.85.167.49, mailfrom: yoann.congal@smile.fr) Received: by mail-lf1-f49.google.com with SMTP id 2adb3069b0e04-507c8316abcso8860912e87.1 for ; Tue, 31 Oct 2023 17:06:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile-fr.20230601.gappssmtp.com; s=20230601; t=1698797174; x=1699401974; darn=lists.yoctoproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=n8yHNWURFW2vLYa/LGiMIG3meKHALR9RZe3qqmmdx4U=; b=aALZQjpoO5mfwV+3z93LTHCSmwX+SaNFwn4egVrMLmew/lEPvc1IjKAHid8sVd1MSN gN2voseRiVjL0ELoQFrSQ/xLDKUWzdrzmWJPmJlhynzzv99KASd5PwUBLWvtz9Xvjmg+ MqJD6YRArXgRS+5rUm2ZIOTa+WHg7EU3iXev/T6HpYh5eUkYkmg5qvGbpiof8YB1pPMM uzzBZQFYNkV0oih6Vd2NN3aYqMt/OeCBz815l/IvIon44U5FEVJ+bFxFF4x7qhCezfMd 2NSRFDLFC6O5glCAWdz8iywX/ckO/bKzYqT7chPZPXvSOHrUq0U5srq0P2pNvEgDr5ZN 2q/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698797174; x=1699401974; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=n8yHNWURFW2vLYa/LGiMIG3meKHALR9RZe3qqmmdx4U=; b=NhUZ4caChhLjqm0hg/2KYZcWSxd8IG9/QhADWCjbggWiiNruyxKqLHwKNZWmrTKK1a rWqqhVA503hIejdjNe/berOkldGGy/ZDcVSILGfL+MiVVNrMmjnIYLrC6dWnmV4rwOz0 GU75y49ucwBjDsv/mC+VCj7fejox5t38KL7NF6w2fuaArzTBvJ/DvKFMBtsHlUe3NybR nn09igSJVrcnWlULrJudcfT/9LmiluU8orDGAkV2GgiRoozl86EG0eo4QOcaKdZMho4u uaGHW4RKy993vnYUZ2w/d9d6w8wNggxPoTHSjj7fiXaAs3zgGc5PpK3rlBkiBWK+JIyC 1V8g== X-Gm-Message-State: AOJu0Yx8aqRRUTTisi6iyzK6Heu37wyKV/eaT2CYt8gqVmBOav5yRr8m v0vJNpxpSqhkVe/7EYXxvnUjOzGwc+psNqElLtM= X-Google-Smtp-Source: AGHT+IFK2L10SgNVJ+NKY4T4CPSYodFjHTTvIgTSXKQTF7ry/94fyXqta+6Az1gowP2vBoZTdzBntQ== X-Received: by 2002:a05:6512:969:b0:509:377a:26d9 with SMTP id v9-20020a056512096900b00509377a26d9mr1728113lft.8.1698797173742; Tue, 31 Oct 2023 17:06:13 -0700 (PDT) Received: from P-ASN-ECS-830T8C3.numericable.fr ([89.159.1.53]) by smtp.gmail.com with ESMTPSA id m5-20020adfe945000000b0032f7cc56509sm2571620wrn.98.2023.10.31.17.06.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Oct 2023 17:06:13 -0700 (PDT) From: Yoann Congal To: yocto@lists.yoctoproject.org Cc: Alex Kanavin , Yoann Congal Subject: [auh][PATCH 4/6] upgrade-helper.py: Fix indentation Date: Wed, 1 Nov 2023 01:05:32 +0100 Message-Id: <20231101000534.241551-5-yoann.congal@smile.fr> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20231101000534.241551-1-yoann.congal@smile.fr> References: <20231101000534.241551-1-yoann.congal@smile.fr> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 01 Nov 2023 00:06:25 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto/message/61542 Signed-off-by: Yoann Congal --- upgrade-helper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upgrade-helper.py b/upgrade-helper.py index bc485b8..4933a4a 100755 --- a/upgrade-helper.py +++ b/upgrade-helper.py @@ -677,7 +677,7 @@ class UniverseUpdater(Updater): pkg_to_upgrade = None if self.args.to_version: - next_ver = self.args.to_version + next_ver = self.args.to_version if status == 'UPDATE' and not no_upgrade_reason: # Always do the upgrade if recipes are specified From patchwork Wed Nov 1 00:05:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoann Congal X-Patchwork-Id: 33239 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id B069BC00142 for ; Wed, 1 Nov 2023 00:06:25 +0000 (UTC) Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) by mx.groups.io with SMTP id smtpd.web11.11095.1698797177318899010 for ; Tue, 31 Oct 2023 17:06:17 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@smile-fr.20230601.gappssmtp.com header.s=20230601 header.b=f2de6SxY; spf=pass (domain: smile.fr, ip: 209.85.221.43, mailfrom: yoann.congal@smile.fr) Received: by mail-wr1-f43.google.com with SMTP id ffacd0b85a97d-32dc9ff4a8fso3877500f8f.1 for ; Tue, 31 Oct 2023 17:06:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile-fr.20230601.gappssmtp.com; s=20230601; t=1698797175; x=1699401975; darn=lists.yoctoproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=BslftJ30Lrb9cQyRsGzKGEvewlaMB8bQXtMSMqwZ0lY=; b=f2de6SxY1rGPcIIcu1aB0/BiFdhGEXIjJmvk6EKcxblhH+GcsY0r1kM8o0Ao2mWHoC f99Hg+JVLi3ElobjjFP7+2hHSgU24eIjnaLMh9jrtudqvS6az/ec+1nC7fZRZ3tRnuO9 vJaQT5fUgRDRWS+Xo8Tne9OXXfnC1NsXZsW3LLK96Wrt34TdYWCzXKds9oeKAqaIq7ls uY3VV0XIA2O/cmaUrR3qLSnThzGe2sqZgoRCMfRoo7+pPBU8y8emILQeGa+WIxCwsoIz yuVwAPR4J/+F+5t4VVO9gbIyDy5jP1fpi9Uc39rAC46w8Jtb7dthu+llBagzL0Si6Abx WfSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698797175; x=1699401975; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BslftJ30Lrb9cQyRsGzKGEvewlaMB8bQXtMSMqwZ0lY=; b=M8ttg5Pk5bgR/sGzt4e3phn8Y3yrMejX6ZJRnDjgDluOvBGHhX15yGFWT27Zh7trA7 Fee73sbFchE8PtxN+uU6Z0FM2Lc77F10WZ0gHIdB69kCjQIJczgydWc4eMnZuj8My2nv K6z+nSwq819X2d4IrutFnmnj04fR3x8cdzfo7K/gUiinIu+WkxPRYlCyxOH6cq1+i3Kt KiQzpvZPdMT8s+Wu7kYTNvFjzELFSpt5k2eNZwyYvSAYOeiceLO9WqziYt4shqSMpUaK MldQaVjV9F4tSHZ6EkXFzBsLn+S7fJON8jIUHFVe2AwNyOl2thUchHImM3Juq0IDdosA OThA== X-Gm-Message-State: AOJu0YwcKfUXQfL0ypYzOCJII7uDK2gQ4YP1E8CdKbFGYWss6Obqs35V MvHdLOpXUpgWgTrzm5a/XRfJNTUciMZYo9mNDG4= X-Google-Smtp-Source: AGHT+IHHIAMOacjOGeuO3n+LfpfrTTMJZ6xQdZmk3XFaTtQtN1wVWL/7U3SYYXbHTVNidNHM7YXo9w== X-Received: by 2002:a5d:5449:0:b0:32d:a376:5cfc with SMTP id w9-20020a5d5449000000b0032da3765cfcmr10766489wrv.57.1698797175173; Tue, 31 Oct 2023 17:06:15 -0700 (PDT) Received: from P-ASN-ECS-830T8C3.numericable.fr ([89.159.1.53]) by smtp.gmail.com with ESMTPSA id m5-20020adfe945000000b0032f7cc56509sm2571620wrn.98.2023.10.31.17.06.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Oct 2023 17:06:13 -0700 (PDT) From: Yoann Congal To: yocto@lists.yoctoproject.org Cc: Alex Kanavin , David Pierret , Yoann Congal Subject: [auh][PATCH 5/6] upgrade-helper.py: Add layer command line option Date: Wed, 1 Nov 2023 01:05:33 +0100 Message-Id: <20231101000534.241551-6-yoann.congal@smile.fr> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20231101000534.241551-1-yoann.congal@smile.fr> References: <20231101000534.241551-1-yoann.congal@smile.fr> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 01 Nov 2023 00:06:25 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto/message/61543 From: David Pierret - Layer options can be defined as command line arguments - multiple layers can be defined in a single command each layer is analyzed 1 by 1 to check if upgrades are available. Signed-off-by: David Pierret Reviewed-by: Yoann Congal --- upgrade-helper.py | 68 ++++++++++++++++++++++++++++++----------------- 1 file changed, 44 insertions(+), 24 deletions(-) diff --git a/upgrade-helper.py b/upgrade-helper.py index 4933a4a..3be6d68 100755 --- a/upgrade-helper.py +++ b/upgrade-helper.py @@ -105,6 +105,12 @@ def parse_cmdline(): help="do not compile, just change the checksums, remove PR, and commit") parser.add_argument("-c", "--config-file", default=None, help="Path to the configuration file. Default is $BUILDDIR/upgrade-helper/upgrade-helper.conf") + parser.add_argument("--layer-names", nargs='*', action="store", default='', + help="layers to include in the upgrade research") + parser.add_argument("--layer-dir", action="store", default='', + help="the layers root directory") + parser.add_argument("--layer-machines", nargs='*', action="store", default='', + help="machine to build for the layers") return parser.parse_args() def parse_config_file(config_file): @@ -441,7 +447,8 @@ class Updater(object): I(" ########### The list of recipes to be upgraded #############") for pkg_to_upgrade in pkgs_to_upgrade: - I(" %s, %s, %s, %s, %s" % ( + I(" %s, %s, %s, %s, %s, %s" % ( + pkg_to_upgrade["layer_name"], pkg_to_upgrade["pn"], pkg_to_upgrade["cur_ver"], pkg_to_upgrade["next_ver"], @@ -583,24 +590,26 @@ class UniverseUpdater(Updater): def __init__(self, args): Updater.__init__(self, args) - if len(args.recipe) == 1 and args.recipe[0] == "all": - self.recipes = [] - else: - self.recipes = args.recipe - - # to filter recipes in upgrade - if not self.recipes and self.opts['layer_mode'] == 'yes': + if len(args.recipe) == 1 and args.recipe[0] == "all" and self.opts['layer_mode'] != 'yes': + self.recipes = [('', [])] + elif self.opts['layer_mode'] == 'yes': # when layer mode is enabled and no recipes are specified # we need to figure out what recipes are provided by the # layer to try upgrade - self.recipes = self._get_recipes_by_layer() - + self.recipes = [] + for layer in self.opts['layer_name'].split(' '): + recipes_for_layer = self._get_recipes_by_layer(layer) + I("layer %s => Recipes %s", layer, recipes_for_layer) + self.recipes.append((layer, recipes_for_layer)) + else: + self.recipes = [('', args.recipe)] + if args.to_version: if len(self.recipes) != 1: E(" -t is only supported when upgrade one recipe\n") exit(1) - def _get_recipes_by_layer(self): + def _get_recipes_by_layer(self, layer=''): recipes = [] recipe_regex = re.compile('^(?P.*):$') @@ -620,7 +629,7 @@ class UniverseUpdater(Updater): if not 'skipped' in line: s = layer_regex.search(line) if s: - if s.group('name').strip() == self.opts['layer_name']: + if s.group('name').strip() == layer: recipes.append(name) return recipes @@ -673,7 +682,7 @@ class UniverseUpdater(Updater): def _get_packages_to_upgrade(self, packages=None): # Prepare a single pkg dict data (or None is not upgradable) from recipeutils.get_recipe_upgrade_status data. - def _get_pkg_to_upgrade(self, pn, status, cur_ver, next_ver, maintainer, revision, no_upgrade_reason): + def _get_pkg_to_upgrade(self, layer_name, pn, status, cur_ver, next_ver, maintainer, revision, no_upgrade_reason): pkg_to_upgrade = None if self.args.to_version: @@ -683,6 +692,7 @@ class UniverseUpdater(Updater): # Always do the upgrade if recipes are specified if self.recipes and pn in self.recipes or self._pkg_upgradable(pn, next_ver, maintainer): pkg_to_upgrade = { + "layer_name": layer_name, "pn": pn, "cur_ver": cur_ver, "next_ver": next_ver, @@ -691,25 +701,27 @@ class UniverseUpdater(Updater): } else: if no_upgrade_reason: - I(" Skip package %s (status = %s, current version = %s," \ + I(" Skip package %s/%s (status = %s, current version = %s," \ " next version = %s, no upgrade reason = %s)" % - (pn, status, cur_ver, next_ver, no_upgrade_reason)) + (layer_name, pn, status, cur_ver, next_ver, no_upgrade_reason)) else: - I(" Skip package %s (status = %s, current version = %s," \ + I(" Skip package %s/%s (status = %s, current version = %s," \ " next version = %s)" % - (pn, status, cur_ver, next_ver)) + (layer_name, pn, status, cur_ver, next_ver)) return pkg_to_upgrade - pkgs = oe.recipeutils.get_recipe_upgrade_status(self.recipes) - pkgs_list = [] - for pkg in pkgs: - pn, status, cur_ver, next_ver, maintainer, revision, no_upgrade_reason = pkg - pkg_to_upgrade = _get_pkg_to_upgrade(self, pn, status, cur_ver, next_ver, maintainer, revision, no_upgrade_reason) - if pkg_to_upgrade: - pkgs_list.append(pkg_to_upgrade) + for layer_name, layer_recipes in self.recipes: + pkgs = oe.recipeutils.get_recipe_upgrade_status(layer_recipes) + + for pkg in pkgs: + pn, status, cur_ver, next_ver, maintainer, revision, no_upgrade_reason = pkg + + pkg_to_upgrade = _get_pkg_to_upgrade(self, layer_name, pn, status, cur_ver, next_ver, maintainer, revision, no_upgrade_reason) + if pkg_to_upgrade: + pkgs_list.append(pkg_to_upgrade) return pkgs_list @@ -754,6 +766,14 @@ if __name__ == "__main__": log.basicConfig(format='%(levelname)s:%(message)s', level=debug_levels[args.debug_level - 1]) settings, maintainer_override = parse_config_file(args.config_file) + if args.layer_names != '' and args.layer_dir == '': + E("layer-dir is mandatory if layers are defined") + exit(1) + elif args.layer_names != '': + settings['layer_mode'] = 'yes' + settings['layer_dir'] = args.layer_dir + settings['layer_name'] = ' '.join(args.layer_names) + settings['layer_machines'] = ' '.join(args.layer_machines) updater = UniverseUpdater(args) updater.run() From patchwork Wed Nov 1 00:05:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoann Congal X-Patchwork-Id: 33241 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id B5C1FC41535 for ; Wed, 1 Nov 2023 00:06:25 +0000 (UTC) Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) by mx.groups.io with SMTP id smtpd.web11.11096.1698797178048292764 for ; Tue, 31 Oct 2023 17:06:18 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@smile-fr.20230601.gappssmtp.com header.s=20230601 header.b=j0s90BDN; spf=pass (domain: smile.fr, ip: 209.85.221.45, mailfrom: yoann.congal@smile.fr) Received: by mail-wr1-f45.google.com with SMTP id ffacd0b85a97d-32f9268bf8cso1075604f8f.0 for ; Tue, 31 Oct 2023 17:06:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile-fr.20230601.gappssmtp.com; s=20230601; t=1698797176; x=1699401976; darn=lists.yoctoproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=HHtkMnNQvQkEo3QBe0gpq50UsYkgthNWQwuhu+gR0Sw=; b=j0s90BDNNmQpSotcCjzUq9Ws7bBcQTbKJiFEWnAGYqsvMaCYtdCbrwx+8e8sbvdhuY X4P7JDvlLWGQVszo/2xeKQ9TZFdRiq3vCiS1HPNZMIYW+RwbY+vdGBqyXU3//cnIfqK/ DhrsGM0GyxwSlIwqgYIWFH/SseqZne5tV+UnKqOpcartiti94mY8AZaNpc03CT8SBACZ wgxN0xGoBuZHgjqPiAOhhM7bhl1Pot1GogG0fDWwDqMZJz6EXlIJXV94SG5EWyfWtbmj xzRbDqYIn8af+T/jVrEeuTWlS4PR05VyJeA7I6abr1lNZupIPLpzxNew4DFF+17bgAz9 KLBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698797176; x=1699401976; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HHtkMnNQvQkEo3QBe0gpq50UsYkgthNWQwuhu+gR0Sw=; b=WY46iiQ+UpaWzk3zjFK6vakQFP6qBPnCLZHh1biGiiP7871oUJZf1BhhIkhpYO4LXz HxC2wkhSjzfEI2s/4GQWR+L3404yvnfLpIEgb4AmbN4urWujo7hbG/x/iDYIZkKc3lzu X/hh+FG2m1HqT23qgDV/y7BQqu7jhA3PZ2tTAFaTrBXN/RIzbU/5V6RLCYxtgjkYpfAG NWLUKC6R+l7xkIixtkvlzXtwzfocXZe7tUcKMr0am0B21xXknIoLXzO8ACI2fVLKYec2 uzEItLTArjhCNlw4lAz8oSimK681xyzF++EvlaTRwhaBbC6VnVqLrutET7Yaua4UEYH/ UHhQ== X-Gm-Message-State: AOJu0YyIriTyzizLwykbo41ihPp6ArNZjYT3T/lUqBzi7nPo5yYtf4vQ PwV6eaB5vKsgONutQk7or8uSRiPTdggslYi8LyE= X-Google-Smtp-Source: AGHT+IF1y3stEEWEo+459V8tLiqAh8QvnXQFDt603cruhyPIt/GMaiQazOZB/szBV4imYdDRZtHoqA== X-Received: by 2002:a05:6000:1ce:b0:31f:f753:5897 with SMTP id t14-20020a05600001ce00b0031ff7535897mr13176666wrx.59.1698797176342; Tue, 31 Oct 2023 17:06:16 -0700 (PDT) Received: from P-ASN-ECS-830T8C3.numericable.fr ([89.159.1.53]) by smtp.gmail.com with ESMTPSA id m5-20020adfe945000000b0032f7cc56509sm2571620wrn.98.2023.10.31.17.06.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Oct 2023 17:06:15 -0700 (PDT) From: Yoann Congal To: yocto@lists.yoctoproject.org Cc: Alex Kanavin , Yoann Congal Subject: [auh][PATCH 6/6] weeklyjob.sh: Add options to handle upgrading meta-oe Date: Wed, 1 Nov 2023 01:05:34 +0100 Message-Id: <20231101000534.241551-7-yoann.congal@smile.fr> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20231101000534.241551-1-yoann.congal@smile.fr> References: <20231101000534.241551-1-yoann.congal@smile.fr> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 01 Nov 2023 00:06:25 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto/message/61544 For example: ./weeklyjob.sh --layer-dir ../meta-openembedded/ --layer-names "meta-oe" Signed-off-by: Yoann Congal --- weeklyjob.sh | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 58 insertions(+), 1 deletion(-) diff --git a/weeklyjob.sh b/weeklyjob.sh index 94598a2..00f3575 100755 --- a/weeklyjob.sh +++ b/weeklyjob.sh @@ -13,6 +13,59 @@ poky_dir=~/poky build_dir=~/build-tmp-auh-upgrades sstate_dir=~/sstate-cache +ARGS=$(getopt -o '' --long 'layer-dir:,layer-names:,layer-machines:' -n 'weeklyjob.sh' -- "$@") +if [ $? -ne 0 ]; then + echo 'Cannot parse arguments...' >&2 + exit 1 +fi +eval set -- "$ARGS" +unset ARGS + +LAYERDIR="." +LAYERNAMES="" +LAYERMACHINES="" +DEFAULT=1 + +while true; do + case "$1" in + '--layer-dir') + LAYERDIR=$(realpath $2) + DEFAULT=0 + shift 2 + continue + ;; + '--layer-names') + LAYERNAMES+=" $2" + DEFAULT=0 + shift 2 + continue + ;; + '--layer-machines') + LAYERMACHINES+=" $2" + DEFAULT=0 + shift 2 + continue + ;; + '--') + shift + break + ;; + *) + echo "Unexpected value $1" >&2 + exit 1 + ;; + esac +done + +# Default to poky/meta +if [ "$LAYERNAMES" == "" ]; then + LAYERNAMES="meta" +fi +# Default to qemux86-64 +if [ "$LAYERMACHINES" == "" ]; then + LAYERMACHINES="qemux86-64" +fi + pushd $poky_dir # Base the upgrades on poky master @@ -20,7 +73,11 @@ git fetch origin git checkout -B tmp-auh-upgrades origin/master source $poky_dir/oe-init-build-env $build_dir -$auh_dir/upgrade-helper.py -e all +if [ "$DEFAULT" -ne 0 ]; then + $auh_dir/upgrade-helper.py -e all +else + $auh_dir/upgrade-helper.py -e all --layer-dir $LAYERDIR --layer-names "$LAYERNAMES" --layer-machines "$LAYERMACHINES" +fi # clean up to avoid the disk filling up rm -rf $build_dir/tmp/