From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mx.groups.io with SMTP id smtpd.web10.8473.1589073869318852834 for ; Sat, 09 May 2020 18:24:29 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=FwzCxb1w; spf=pass (domain: intel.com, ip: 134.134.136.126, mailfrom: nathaniel.l.desimone@intel.com) IronPort-SDR: w2RKDU3yx4rfC/qI02u+NUfFJMBYm+bk+NVYkoL3Tj7mwblPvm4+zRhEcihzeZ7dHysGKPYfLi stiwWjQRi2ig== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 May 2020 18:24:28 -0700 IronPort-SDR: Tu1kTvzxHOtUixGu8FCDH+fOti66b2eyTLrZ7ylntDOvVArlRmt/0jjmZJnNrtX+PPCkR8dlQb uW48hasev8sw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,373,1583222400"; d="scan'208";a="436228626" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga005.jf.intel.com with ESMTP; 09 May 2020 18:24:27 -0700 Received: from fmsmsx125.amr.corp.intel.com (10.18.125.40) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sat, 9 May 2020 18:24:27 -0700 Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by FMSMSX125.amr.corp.intel.com (10.18.125.40) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sat, 9 May 2020 18:24:27 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.171) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sat, 9 May 2020 18:24:27 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CWUgaK18JOQg82aKPYcujhfabWLqr6WwdRL1tGAkCy8fBgI9vz4+aDjU2wL12zwg9JNn8QEa/Z2IrFsATbreew2bCs0HKmRPeuMn2iVYhrR2cMa8OXIkzvCwTI6R2Ljazju0yt+4DVv8RDrJw0pL/0V6NQOIpXB3QzOy4bDYTbhsnjiepQGTNacLJG0E+Rh/g6hSGh25XH+zXt4tI/qj7XNSmXTyERwdJmDT1/yuD/hcSjbTUiuFT9W4UvLOIkiuLQDuPCSoKToZSI5zu2EXZsXXBF/AQj2474NudeSSEBrXRJMTucA6of4CoGeiHAD9lzNuUJNOWzknCsQdgn5CNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8nLr2oMt/i4nlUIa2h6JGV8/bFxlgTj67Lz0wZgp130=; b=XeO8bZNS+DrlWOZpGr1hO1ccK3JHtRvEmsM4U1PI/I4LWctSDRV/21TzF5ts312EZkekXPVANr6L4ID7Awd9BFyt/vqpYVH1exAHlxvQvIxRIgYnYKeMHEjOrNyUlO00GUjXu7Fk0r7RNehrcARIirnL60thlNFVYqmZvV/CNY9PVaFu1eOetzzIXORWDo+JUXoT4uiAui8ss/mmxDfSyr538RPPwE6+k+GVAua6TNaf18hHN7gX7Ac2UgAq6SVL4c+q/HzciLSxVU2WJja6/fl6Y1QC79Zmi377bHuDRDqT/r5oPS5IoHyPoZkN0+XD5FGmd4YVVeckNGVkSJCtxA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8nLr2oMt/i4nlUIa2h6JGV8/bFxlgTj67Lz0wZgp130=; b=FwzCxb1w6xUc9h3GJKcNsTr+L5A7jKXyxGO50xoZLcTHFO7f/SpKpX1duDLiBL0CmgQSFqsEJTusdnP5rElXb5Ch0jd0lVqZfgT0MI77RIob8Z/ow04XpmefU27kHl9ANwj6SN1OCGQQpymFTdOmJtgup0XI+y6GCRrQcvPUepo= Received: from BL0PR11MB3489.namprd11.prod.outlook.com (2603:10b6:208:75::29) by BL0PR11MB3300.namprd11.prod.outlook.com (2603:10b6:208:2e::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.30; Sun, 10 May 2020 01:24:25 +0000 Received: from BL0PR11MB3489.namprd11.prod.outlook.com ([fe80::d0f8:bfd7:bae2:3e42]) by BL0PR11MB3489.namprd11.prod.outlook.com ([fe80::d0f8:bfd7:bae2:3e42%7]) with mapi id 15.20.2979.033; Sun, 10 May 2020 01:24:25 +0000 From: "Nate DeSimone" To: "Desimone, Ashley E" , "devel@edk2.groups.io" CC: "Pandya, Puja" , "Bjorge, Erik C" , Bret Barkelew , "Agyeman, Prince" Subject: Re: [edk2-staging/EdkRepo] [PATCH] EdkRepo: Integrate multiple manifest repository support in the manifest command Thread-Topic: [edk2-staging/EdkRepo] [PATCH] EdkRepo: Integrate multiple manifest repository support in the manifest command Thread-Index: AQHWI/TzPiGYrXoo2Eu6hFey2K0E7aigiQOg Date: Sun, 10 May 2020 01:24:25 +0000 Message-ID: References: <20200506222249.19028-1-ashley.e.desimone@intel.com> In-Reply-To: <20200506222249.19028-1-ashley.e.desimone@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYzBkMzYyN2ItZjYwYS00ZjNmLTg5MmYtODk4ODA0ZTIwMzJhIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiblZFa0ZoUlY2eHg4dlc4NmNSZm9FUnFYaE1MV1NWY3hxV0c2aXpjT1wvTTh3M1RBdFZhelRQQ0tHNzFVcjVWWmMifQ== dlp-reaction: no-action dlp-version: 11.2.0.6 dlp-product: dlpe-windows x-ctpclassification: CTP_NT authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [50.53.190.176] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 6bb39b99-92bd-4cbf-10cd-08d7f480e06e x-ms-traffictypediagnostic: BL0PR11MB3300: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8273; x-forefront-prvs: 039975700A x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: rCFtxVWtOQ3FNgTRK5810Xk+aAzf5GUtZ6NvKA8Dnar2/3spNVlkshpUmCMwk+PU89g7cyYSTQaXg2WxWlqFo6OoJKjWZ4GTiKpA/eweAuEzW6slFnIQ3biNx49Ey8Tpo8EmCnKwapUbcVrQpgxL5pd5JkEzXA5iU5ruli5eJBp4O+E8Ysq7OSOpkG6HEjaOhhKtJWUuhmH2mlgAjKhkNH+KkSSKlUKsdZswpJ9DvEPsW3JDqHw0qVZOeMKHgcaX0Az/C6PUWJNBM/4colik73OWHE9VwM/b3WUOdsen2lgkdbCDMQ9QBIGrYWVrPYHPLU68+ZCYhm5APVzsih6vc+fv0SdEiJ3mW6Ff1G5IuKVpudtScKJOG1REHGaR0kN6z2oxWjidhxOe7g3pheu34cmEfzjygrjKEmvo6hZaZWyV8W1QS+m7DjEOwjzdB2z3onDesSxIU9FJMIMXrI/7Hn9u7e2pANLqhj3Ibq4dP8fu/pkyLnd1xDe+YoBMNd7G9jue731uHqbJx1xFNMao5Q== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BL0PR11MB3489.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(366004)(136003)(396003)(39860400002)(346002)(376002)(33430700001)(478600001)(52536014)(4326008)(55016002)(7696005)(86362001)(71200400001)(66556008)(64756008)(76116006)(66946007)(66476007)(66446008)(54906003)(33440700001)(53546011)(6506007)(186003)(110136005)(5660300002)(2906002)(107886003)(8936002)(8676002)(9686003)(33656002)(26005)(316002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: pSGldeVROwg/UXg9lW77DM9uP0s7dTLKYckWZSnr2u2GMDdDuJ5xl7/oTbNEisKwaiNWsWBxiRWT7/uSE3YqbI291ZRUQiNW5PEGk59P5s7uqIOa5WGW8LlASm/luY03HVWhY+tLQFBZZMtSjFeC+fgp/kgA2vhqCK931/43rQEQ9preDeyGS8c/bVOUDfyA1yW0msWsqMo/KFFlzYYDONZCt/5IoDTEqm3+uPwOOEz2nb3u2O75wH97UOUHhQaZ349GUCCp2B3Xr1mLavFg2rwrsEblV37lT5sNgPfZAwazMb06dllfhjbS4radfjeE9HVbFlM+e6U+oU5QtaTs0Kjd8uyVYahrfLSkCM9fiDdCz27SD/4y3oW/LRBswvDAlv3E1ex2wR3gMbJgi6FDYjdU+9w/UWciXuk+zQ+iXpNzOhTr7U2YMrb5vL6ggmaVJNvmOFwGd1jAON3orOQOz+/CD4ttzDQP13EHKLTVm+4= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 6bb39b99-92bd-4cbf-10cd-08d7f480e06e X-MS-Exchange-CrossTenant-originalarrivaltime: 10 May 2020 01:24:25.1017 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: RB1jE/omWuZng1dmgIVcRWRSCRVTqf+xR3y6yVXFl2skhQwoGl5xnJXPn4YiUUcz7mn7YvCL5oOzvN0IRkNMjcfVY603rWvXHRf3wwj+k+Q= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR11MB3300 Return-Path: nathaniel.l.desimone@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Ashley, Feedback inline below. Thanks, Nate > -----Original Message----- > From: Desimone, Ashley E > Sent: Wednesday, May 6, 2020 3:23 PM > To: devel@edk2.groups.io > Cc: Desimone, Nathaniel L ; Pandya, Puja > ; Bjorge, Erik C ; Bret > Barkelew ; Agyeman, Prince > > Subject: [edk2-staging/EdkRepo] [PATCH] EdkRepo: Integrate multiple > manifest repository support in the manifest command >=20 > 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(-) >=20 > diff --git a/edkrepo/commands/manifest_command.py > b/edkrepo/commands/manifest_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 arguments from edkrepo.common.edkrepo_exception import > EdkrepoWorkspaceInvalidException 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 > +import list_available_manifest_repos from > +edkrepo.common.workspace_maintenance.manifest_repos_maintenance > import > +pull_all_manifest_repos from > +edkrepo.common.workspace_maintenance.manifest_repos_maintenance > import > +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.= xml') > + cfg_file =3D config['cfg_file'] > + user_cfg =3D config['user_cfg_file'] > + cfg_man_repos, user_cfg_man_repos, conflicts =3D > list_available_manifest_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_pat= h(repo) > + index_path =3D os.path.join(global_manifest_directory, 'CiIn= dex.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, 'CiIn= dex.xml') > + man_repos[repo] =3D (global_manifest_directory, index_path) >=20 > try: > - current_project =3D get_workspace_manifest().project_info.co= dename > + 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) With the new find_source_manifest_repo() function, we now need to catch bot= h EdkrepoWorkspaceInvalidException AND EdkrepoManifestNotFoundException jus= t in case this is a "loose manifest". Please add the following: except EdkrepoManifestNotFoundException: src_man_repo =3D 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, > verbose=3Dargs.verbose, verify_all=3DTrue, verify_archived=3Dargs.archive= d) > - 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(pro= ject))) > - > - 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, > verbose=3Dargs.verbose, verify_all=3DTrue, verify_archived=3Dargs.archive= d) > + except: > + print() > + > + print("Projects:") > + for project in ci_index_xml.project_list: Since you are modifying this anyway, please change this line to "for projec= t in sorted(ci_index_xml.project_list):" Having the output come out sorted would be a great improvement. > + 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.RE= SET)) > else: > print(" {}".format(project)) > if args.verbose: > print(" -> {}".format(ci_index_xml.get_project_xml= (project))) > + > + if args.archived: > + print() > + print("Archived Projects:") > + for project in ci_index_xml.archived_project_list: Same thing here. "for project in sorted(ci_index_xml.archived_project_list)= :" > + if project =3D=3D current_project: > + print("* {}{}{}".format(Fore.GREEN, project, For= e.RESET)) > + else: > + print(" {}".format(project)) > + if args.verbose: > + print(" -> {}".format(ci_index_xml.get_project= _xml(project))) > -- > 2.16.2.windows.1