From nobody Sun May 5 10:38:07 2024 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+58754+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+58754+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1588803776; cv=none; d=zohomail.com; s=zohoarc; b=N4fFUNWL/R8EDw/ctyMlkYVMRN7ObM/Vjqy0E3nYpzPfZ2f8cmSFuGg7IQkaS0nBPtGZ+PjqzsFyn35LT1OIki+P1iHytcxtSJvWo50YjHSOwKmHDUk36p4wx1sUxc1rPqXYs1nOpz6TGTzfcTf5MrxHOxtKpy4yDybxX85MCSs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588803776; h=Cc:Date:From:List-Id:List-Unsubscribe:Message-ID:Reply-To:Sender:Subject:To; bh=qOp0/6uhfk+tkMuhwi5jbkDXAhkuhGcp5AGO0+DfZLk=; b=ayustFAVPCYjJf9QAQEDEJJ8tBwmRklq5q2NdCWYmdSnAYmD73kHDpNq5a0JKGWvGi2AuoivBL+2+VTAK54dLVpCI4TJ1+9Ak5luuun6jGv4yJXf7PBRXCBAlct4q/LLNjTOhy9XI70nX1K3aKI0JpIqsLR3jJ6+JKZCrMQ5hI8= 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+58754+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 1588803776061581.3407771453509; Wed, 6 May 2020 15:22:56 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id IpqaYY1788612xGvQzi82Gxt; Wed, 06 May 2020 15:22:55 -0700 X-Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web10.426.1588803774709240474 for ; Wed, 06 May 2020 15:22:54 -0700 IronPort-SDR: IRPlaF7ZogRMCwfebsc5Wd9O8DKxk0muuRWEogSsZp1WoPVYL6M7auVDYwk4m/3Kv9IegwpPRV Zfm5rmLUzOdQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 May 2020 15:22:53 -0700 IronPort-SDR: dfZYTUIPM7yE/XaHvoshMEwusDt+YbXXCZAAKx8olSrFeRgLEhPQMK90AmGtaOXmkxNmds+9Y4 OMhJuiFUVf0g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,360,1583222400"; d="scan'208";a="284783853" X-Received: from aedesimo-desk.amr.corp.intel.com ([10.254.1.73]) by fmsmga004.fm.intel.com with ESMTP; 06 May 2020 15:22:53 -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] EdkRepo: Integrate multiple manifest repository support in the manifest command Date: Wed, 6 May 2020 15:22:48 -0700 Message-Id: <20200506222249.19028-1-ashley.e.desimone@intel.com> Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: 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: 1SsjG5IXwEZnPFdAuO9zN9NHx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1588803775; bh=KMRwueFT1w0hfRAwO5yy3pT2XuTdpBniHOtZ6USDtqI=; h=Cc:Date:From:Reply-To:Subject:To; b=gZN4PepdwRK1EdEuLR4AB1ZPkF6G1cBXeXpEDcpgc5/Qs2Bma022LIc81hNc0pSXaxn /iGI9WeNtUoPWRYtCm5BBS3DQTlW6e4xhNc6Z+8tUr43NviM7OUVC6AbpI0yYSY2d3Hoq s5K6hZav7uOAp7H/VokfNfwSNRwOlrSWIvU= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Ashley E Desimone Cc: Nate DeSimone Cc: Puja Pandya Cc: Erik Bjorge Cc: Bret Barkelew Cc: Prince Agyeman --- edkrepo/commands/manifest_command.py | 79 +++++++++++++++++++++++---------= ---- 1 file changed, 50 insertions(+), 29 deletions(-) diff --git a/edkrepo/commands/manifest_command.py b/edkrepo/commands/manife= st_command.py index 44218c9..9e7d204 100644 --- a/edkrepo/commands/manifest_command.py +++ b/edkrepo/commands/manifest_command.py @@ -3,7 +3,7 @@ ## @file # manifest_command.py # -# Copyright (c) 2017- 2019, Intel Corporation. All rights reserved.
+# Copyright (c) 2017- 2020, Intel Corporation. All rights reserved.
# SPDX-License-Identifier: BSD-2-Clause-Patent # =20 @@ -18,6 +18,9 @@ import edkrepo.commands.arguments.manifest_args as argume= nts from edkrepo.common.edkrepo_exception import EdkrepoWorkspaceInvalidExcept= ion from edkrepo.common.common_repo_functions import pull_latest_manifest_repo= , verify_manifest_data from edkrepo.common.ui_functions import init_color_console +from edkrepo.common.workspace_maintenance.manifest_repos_maintenance impor= t list_available_manifest_repos +from edkrepo.common.workspace_maintenance.manifest_repos_maintenance impor= t pull_all_manifest_repos +from edkrepo.common.workspace_maintenance.manifest_repos_maintenance impor= t find_source_manifest_repo from edkrepo.config.config_factory import get_workspace_manifest from edkrepo_manifest_parser.edk_manifest import CiIndexXml =20 @@ -44,46 +47,64 @@ class ManifestCommand(EdkrepoCommand): print() init_color_console(args.color) =20 - # Get path to global manifest file - global_manifest_directory =3D config['cfg_file'].manifest_repo_abs= _local_path - if args.verbose: - print("Manifest directory:") - print(global_manifest_directory) - print() - index_path =3D os.path.join(global_manifest_directory, 'CiIndex.xm= l') + cfg_file =3D config['cfg_file'] + user_cfg =3D config['user_cfg_file'] + cfg_man_repos, user_cfg_man_repos, conflicts =3D list_available_ma= nifest_repos(cfg_file, user_cfg) + man_repos =3D {} =20 - pull_latest_manifest_repo(args, config) - print() + pull_all_manifest_repos(cfg_file, user_cfg, False) =20 - ci_index_xml =3D CiIndexXml(index_path) + # Get paths to the global manifest dirs and their index files + for repo in cfg_man_repos: + global_manifest_directory =3D cfg_file.manifest_repo_abs_path(= repo) + index_path =3D os.path.join(global_manifest_directory, 'CiInde= x.xml') + man_repos[repo] =3D (global_manifest_directory, index_path) + for repo in user_cfg_man_repos: + global_manifest_directory =3D user_cfg.manifest_repo_abs_path(= repo) + index_path =3D os.path.join(global_manifest_directory, 'CiInde= x.xml') + man_repos[repo] =3D (global_manifest_directory, index_path) =20 try: - current_project =3D get_workspace_manifest().project_info.code= name + wkspc_manifest =3D get_workspace_manifest() + current_project =3D wkspc_manifest.project_info.codename + src_man_repo =3D find_source_manifest_repo(wkspc_manifest, cfg= _file, user_cfg, None) except EdkrepoWorkspaceInvalidException: current_project =3D None + src_man_repo =3D None =20 - # Attempt to make sure the manifest data is good - try: - verify_manifest_data(global_manifest_directory, config, verbos= e=3Dargs.verbose, verify_all=3DTrue, verify_archived=3Dargs.archived) - except: + for repo in man_repos.keys(): print() - - print("Projects:") - for project in ci_index_xml.project_list: - if project =3D=3D current_project: - print("* {}{}{}".format(Fore.GREEN, project, Fore.RESET)) - else: - print(" {}".format(project)) + print("Manifest directory:") + print(repo) if args.verbose: - print(" -> {}".format(ci_index_xml.get_project_xml(proje= ct))) - - if args.archived: + print('Manifest directory path:') + print(man_repos[repo][0]) print() - print("Archived Projects:") - for project in ci_index_xml.archived_project_list: - if project =3D=3D current_project: + + ci_index_xml =3D CiIndexXml(man_repos[repo][1]) + + # Attempt to make sure the manifest data is good + try: + verify_manifest_data(global_manifest_directory, config, ve= rbose=3Dargs.verbose, verify_all=3DTrue, verify_archived=3Dargs.archived) + except: + print() + + print("Projects:") + for project in ci_index_xml.project_list: + if (project =3D=3D current_project and src_man_repo =3D=3D= repo) or (not src_man_repo and project =3D=3D current_project): print("* {}{}{}".format(Fore.GREEN, project, Fore.RESE= T)) else: print(" {}".format(project)) if args.verbose: print(" -> {}".format(ci_index_xml.get_project_xml(p= roject))) + + if args.archived: + print() + print("Archived Projects:") + for project in ci_index_xml.archived_project_list: + if project =3D=3D current_project: + print("* {}{}{}".format(Fore.GREEN, project, Fore.= RESET)) + else: + print(" {}".format(project)) + if args.verbose: + print(" -> {}".format(ci_index_xml.get_project_x= ml(project))) --=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 (#58754): https://edk2.groups.io/g/devel/message/58754 Mute This Topic: https://groups.io/mt/74039561/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-