From nobody Mon Feb 9 05:41:06 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+58268+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+58268+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1588111037; cv=none; d=zohomail.com; s=zohoarc; b=ebYQ5zdPkj5l6TX4d1FrHhrS8NZ1ZFQRmtydXFBcT6PKxcwdVf8SZJi8Slj5IQaMmdIqCv84gxDR1NkNSTw7jNAUS/khZjjfMj5XGMzJ4FvoLiWEXmt9ByBPIvS9wtDuu5RawnD4Bo5BYn9ttjxIeBwhuESx6kpIvqk5RyFYUL0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588111037; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=bF+Ais36/6oicZkCDE2zIhGBijFSr06VSSz4PaVQIeg=; b=PMuhXk34Zk+JByktqkWLudUfZ/7j/Ag3zI+QQS7W+zu2cv2QicMnll2bwjqz61gA55MAe/9RkE0d/mUJIQRcF6xcG4aYRIdAdPnDtP9fswSLtxvGdy8cjH0lAwmdvVtmqvV29MYyHJiP1tA2xweUXaZ9KKeAuibOar3yMVQTTPc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+58268+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1588111037770411.84157028351683; Tue, 28 Apr 2020 14:57:17 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id iahMYY1788612xfc0dPnHe43; Tue, 28 Apr 2020 14:57:17 -0700 X-Received: from mga06.intel.com (mga06.intel.com []) by mx.groups.io with SMTP id smtpd.web11.382.1588111035181534714 for ; Tue, 28 Apr 2020 14:57:16 -0700 IronPort-SDR: HQQ+wf16SJmIy7cfuwwu5ZjVyWd+aAMJKFqSsIdWu4U0T5WvfcSj1O0ETg7S8dYDxeYt+RwUL0 +EOhdmj5ShuA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Apr 2020 14:57:13 -0700 IronPort-SDR: apF8765xUJxhgOcJRnOCnUBXmQ/VQlmi5SrW51g7WJJbVIGiBBY0Afir9mZ9ahp3bGE6pKwijf COj+sKA5oRzw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,328,1583222400"; d="scan'208";a="246642466" X-Received: from aedesimo-desk.amr.corp.intel.com ([10.7.159.171]) by orsmga007.jf.intel.com with ESMTP; 28 Apr 2020 14:57:13 -0700 From: "Ashley E Desimone" To: devel@edk2.groups.io Cc: Nate DeSimone , Puja Pandya , Erik Bjorge , Bret Barkelew , Prince Agyeman Subject: [edk2-devel] [edk2-staging/EdkRepo] [PATCH 2/7] EdkRepo: Add downloading all available manifest repositories Date: Tue, 28 Apr 2020 14:57:05 -0700 Message-Id: <20200428215710.45504-3-ashley.e.desimone@intel.com> In-Reply-To: <20200428215710.45504-1-ashley.e.desimone@intel.com> References: <20200428215710.45504-1-ashley.e.desimone@intel.com> Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: <27952.devel.edk2.groups.io> Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,ashley.e.desimone@intel.com X-Gm-Message-State: QZleRGnMgtWy9e22wqaTOF9yx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1588111037; bh=+ATg5VF769tyC7mQZgHij4W+FYTvmj4N/2JwrX4u9QE=; h=Cc:Date:From:Reply-To:Subject:To; b=lLyjfeCAVGnLEc3TShRqbU6gEatmsDkaCxCRu/MLwZ5CJj9Fv7v3z5d3KcT4DH09Ftw kJD4ZGkHzBjf0abN7XYk/GsueOukcRlcfwF7WzuYH4qCR0mOs7esWK+PxcPuao/fhxMfR PR7tpt7jnYb7Gaj9W7Yv3KK7ParbP2iPYZo= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Add a function that will download all available manifest repositories defined in either the edkrepo.cfg or the edkrepo_user.cfg Signed-off-by: Ashley E Desimone Cc: Nate DeSimone Cc: Puja Pandya Cc: Erik Bjorge Cc: Bret Barkelew Cc: Prince Agyeman Reviewed-by: Nate DeSimone --- .../humble/manifest_repos_maintenance_humble.py | 4 +++ .../manifest_repos_maintenance.py | 38 ++++++++++++++++++= ++++ 2 files changed, 42 insertions(+) diff --git a/edkrepo/common/workspace_maintenance/humble/manifest_repos_mai= ntenance_humble.py b/edkrepo/common/workspace_maintenance/humble/manifest_r= epos_maintenance_humble.py index 440fd8a..e592f19 100644 --- a/edkrepo/common/workspace_maintenance/humble/manifest_repos_maintenanc= e_humble.py +++ b/edkrepo/common/workspace_maintenance/humble/manifest_repos_maintenanc= e_humble.py @@ -21,3 +21,7 @@ SINGLE_MAN_REPO_NOT_CFG_BRANCH =3D ('The current active b= ranch, {}, is not the ' 'specified branch for global manifst rep= ository: {}') SINGLE_MAN_REPO_CHECKOUT_CFG_BRANCH =3D 'Checking out the specified branch= : {} prior to syncing' SINGLE_MAN_REPO_MOVED =3D '{}{}WARNING:{}{} The global manifest repository= has moved. Backing up previous global manifest repository to: {{}}{}\n'.fo= rmat(Style.BRIGHT, Fore.RED, Style.RESET_ALL, Fore.RED, Style.RESET_ALL) +CONFLICT_NO_CLONE =3D ('The definition of global manifest repository, {}, ' + 'in the edkrepo_user.cfg does not match the definitio= n in the edkrepo.cfg. ' + 'This global manifest repository will not be download= ed or updated. ' + 'Resolve the conflict and then re-run the failed oper= ation') diff --git a/edkrepo/common/workspace_maintenance/manifest_repos_maintenanc= e.py b/edkrepo/common/workspace_maintenance/manifest_repos_maintenance.py index ad6ddbc..24ad76a 100644 --- a/edkrepo/common/workspace_maintenance/manifest_repos_maintenance.py +++ b/edkrepo/common/workspace_maintenance/manifest_repos_maintenance.py @@ -57,6 +57,44 @@ def pull_single_manifest_repo(url, branch, local_path, r= eset_hard=3DFalse): print (humble.CLONE_SINGLE_MAN_REPO.format(local_path, url)) repo =3D Repo.clone_from(url, local_path, progress=3DGitProgre= ssHandler(), branch=3Dbranch) =20 +def pull_all_manifest_repos(edkrepo_cfg, edkrepo_user_cfg, reset_hard=3DFa= lse): + ''' + Clones or syncs all global manifest repositories defined in both the + edkrepo_cfg and the edkrepo_user.cfg) + ''' + cfg_man_repos =3D [] + user_cfg_man_repos =3D [] + conflicts, duplicates =3D detect_man_repo_conflicts_duplicates(edkrepo= _cfg, edkrepo_user_cfg) + if not conflicts and not duplicates: + cfg_man_repos.extend(edkrepo_cfg.manifest_repo_list) + user_cfg_man_repos.extend(edkrepo_user_cfg.manifest_repo_list) + elif conflicts: + for conflict in conflicts: + # In the case of a conflict do not pull conflicting repo + print(humble.CONFLICT_NO_CLONE.format(conflict)) + cfg_man_repos.extend(edkrepo_cfg.manifest_repo_list) + cfg_man_repos.remove(conflict) + user_cfg_man_repos.extend(edkrepo_user_cfg.manifest_repo_list) + user_cfg_man_repos.remove(conflict) + elif duplicates: + for duplicate in duplicates: + # the duplicate needs to be ignored in on of the repo lists so= it is + # not cloned/pulled twice + cfg_man_repos.extend(edkrepo_cfg.manifest_repo_list) + user_cfg_man_repos.extend(edkrepo_user_cfg.manifest_repo_list) + user_cfg_man_repos.remove(conflict) + for repo in cfg_man_repos: + pull_single_manifest_repo(edkrepo_cfg.get_manifest_repo_url(repo), + edkrepo_cfg.get_manifest_repo_branch(rep= o), + edkrepo_cfg.get_manifest_repo_local_path= (repo), + reset_hard) + for repo in user_cfg_man_repos: + pull_single_manifest_repo(edkrepo_user_cfg.get_manifest_repo_url(r= epo), + edkrepo_user_cfg.get_manifest_repo_branc= h(repo), + edkrepo_user_cfg.get_manifest_repo_local= _path(repo), + reset_hard) + + def detect_man_repo_conflicts_duplicates(edkrepo_cfg, edkrepo_user_cfg): ''' Determines whether there is are conflicting or duplicated manifest --=20 2.16.2.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#58268): https://edk2.groups.io/g/devel/message/58268 Mute This Topic: https://groups.io/mt/73340189/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-