From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mx.groups.io with SMTP id smtpd.web12.9547.1589080737112248261 for ; Sat, 09 May 2020 20:18:57 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=yftMyEpC; spf=pass (domain: intel.com, ip: 192.55.52.120, mailfrom: nathaniel.l.desimone@intel.com) IronPort-SDR: xnlW9ODWD4eXhnEmcIZJACOU4sw1ZmuGCulhmh7bCGPf6W/ks/FUCouh6ZVXpac+kiVhczl78f aLv7Qj2nv2rQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 May 2020 20:18:56 -0700 IronPort-SDR: NQXZdx/GemcVyIJ/I/gK6MnZ2Dec0fFf5wUqBpGtov+NzDVaAilHcdANIDchT0EjmGOiHLNGWS BPUT6UCYKnFw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,374,1583222400"; d="scan'208";a="297333232" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga008.jf.intel.com with ESMTP; 09 May 2020 20:18:56 -0700 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sat, 9 May 2020 20:18:55 -0700 Received: from fmsmsx604.amr.corp.intel.com (10.18.126.84) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Sat, 9 May 2020 20:18:55 -0700 Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Sat, 9 May 2020 20:18:55 -0700 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (104.47.36.51) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sat, 9 May 2020 20:18:55 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QE5WDgwBjAMH4Sx9BmdzygEBz+1W71OFBva3JFqrq4QrFyPP3T3J51Tkl9A3AizG0p2l6m4wZyAFweE8nF//cNHngHOvxTfA+NuOEFQfxl0yZf/Y+pr79/pJmrUQ4B1G84/OsQ+ZvqJWUQcofvAEn0CLWkObMZdNAytd4z3YvNts9VKolFQgrUecoPAe3lNQabgon9ZaFonJUnFni/3O3jPhMKAlHX0TzE4ghRbFTjxbaXJ/4QUruEPxSCNXRGMOp9twcVG9waacv8OV2IxeeCaIgBseDT7uGIPipshCPvTLfWkAcphdrWYuwMN3Q/vGb1+m9E6ogVV1nj/m/3zrTw== 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=WP1hdxWCYiIL92IhbPGSZ7KTiu6Oh3Vg1xVzGEMIT00=; b=MlPpyRigNcF+Ae0Cl/bgGa50HjguD87Fotr+9KDOeYYlTY4Kn3N2ntJ4I+vfoVfhmyDIRIivBRq14bAtj4wufrcIVBtFWvv7okpMPTn/qepdiCmu9elfm4FcijYgJAUdzLVKnEv/irHSxR3NA2msFMky1p1hLdHZQdS7PwvoH4tUWj+w5tIZ6Wmys2jgZpdCYTjWRhPp7aWOSA2UiP8y39tam03C+pvVQF7p58x5UOU4uDTmXqeLnGdi1eaEPM0+t8wPgSzpFK5fQb5wlZVAlIuPX/Nf8W8ClGXzlNE4O7JdGgPggiK3rjsvmHlHKkMNZQaM3piRI0r2YBV7+9yu2A== 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=WP1hdxWCYiIL92IhbPGSZ7KTiu6Oh3Vg1xVzGEMIT00=; b=yftMyEpChvCPd2EJjRa+bo1oP8Np9pvPhxO3qBRcCmCbJ/ofhWvVJrta8kofc1EH6r0qNcni4QMRd/5Q8FrxFUlcniCYeu5vCbRCyNYhmqCz0BlKqhpJ4Ra9LZPQH6HQ48xUDNnBIKX/VliyQF+2E4Zo1gy0G6ANRr7CAmQe5as= Received: from BL0PR11MB3489.namprd11.prod.outlook.com (2603:10b6:208:75::29) by BL0PR11MB3361.namprd11.prod.outlook.com (2603:10b6:208:6d::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.26; Sun, 10 May 2020 03:18:53 +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 03:18:53 +0000 From: "Nate DeSimone" To: "devel@edk2.groups.io" , "Desimone, Ashley E" CC: "Pandya, Puja" , "Bjorge, Erik C" , Bret Barkelew , "Agyeman, Prince" Subject: Re: [edk2-devel] [edk2-staging/EdkRepo] [PATCH] EdkRepo: Address corner cases in find_project_in_all_indices Thread-Topic: [edk2-devel] [edk2-staging/EdkRepo] [PATCH] EdkRepo: Address corner cases in find_project_in_all_indices Thread-Index: AQHWJXFH9Q2I6ijM0kuqlQFddlx8wKigqHXQ Date: Sun, 10 May 2020 03:18:53 +0000 Message-ID: References: <20200508194509.10620-1-ashley.e.desimone@intel.com> In-Reply-To: <20200508194509.10620-1-ashley.e.desimone@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNzVjOTk1OGMtZmQwZC00YzgyLWE0YWUtOWUxOTZkZDQ4ZTIyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiekU5MHlpSU1ZMGZyaFkzdXpMVGM1bW5qRWVyZHRCdHQxbkRCNkgyZ0dyd1UrR3BVemF4Q1VLeUpKKzRGNEE5biJ9 dlp-reaction: no-action dlp-version: 11.2.0.6 dlp-product: dlpe-windows x-ctpclassification: CTP_NT authentication-results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; 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: 386bc722-b61d-48fa-b4e5-08d7f490de0b x-ms-traffictypediagnostic: BL0PR11MB3361: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-forefront-prvs: 039975700A x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: ZwRuSQ+sOHZ9sRS/IExftM7T+L76YQteBWzYR/GiGb3KXnDEst6XCJ8ZlmPLPCGatgASSGnQDzaWqCqgxyHO32HU/u2okTzvNyHIqlgL4yCxqSeiIUUIzOIPG/Iu0WPAkn3clJWzVqgU5eD6rSR5XLuE0jVk2JxGa2CE+bjbxLigYV1JN1i3LuqkaMZtTWuTumS4GDPBJGzfOyeXqWRdrvQV5yiQz2dGUeoyjmoH3krdBgw5r7Jk7v1LlcByQvEDE+evG3ZZ8RODE2EU4lGwyAVCs2csOHH2HQtXgKB59kx13bBo8ZPYzq+66J8I01a53XxWSiRhJwWdSlyKtTlIKm7oGy0Xa2QEywBAba9h9w3OhlkjMZOy7W/i9S4cN+EKVblAs1zq4L/xSDTXAKcdiYf2JFu8ci3PrZ4vHNv7YkkcZE7o2r91w9ty2jzJBPUv5ipAMJCf3mVZlci/eVlzD9x4HADJ9KQF3ZLI3n+ODUGSk9SdP9W9AYpW5txM7SNu7fcZTYPEWYElZZ66GmhlZ3RI5fYWKzOeSj0PV8D6ldYS6cLyJcdtplVQwKa9kYobbVLomtKmSYcxOVpv3TQJ0VgG1ti2NQh7PnP6pnRJi1A= 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:(396003)(376002)(346002)(39860400002)(136003)(366004)(33430700001)(71200400001)(8936002)(8676002)(86362001)(2906002)(6636002)(9686003)(966005)(107886003)(4326008)(478600001)(55016002)(26005)(7696005)(53546011)(186003)(52536014)(54906003)(66446008)(33440700001)(33656002)(6506007)(316002)(64756008)(66556008)(110136005)(5660300002)(76116006)(66476007)(66946007);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: m5Ls/2SR76umaV6OGjeVs/cjBs5MnvIJPRII1TybB0rYau0jNfCcBvotpVJcGCAj2s3ra9qgqrLZ0d/DPtrFNsJl0ZLroNxV4wdzL7HK27aLZL/LPwvHidGV0UnkjJ6jgqO7od8L1ZkVZ+8n8ONTPDX54DoMYJc6JPccbia3Zoy/TpUvAmxDji1kLKQpZfYaOt4Vk1O51RSe+HseKywYyEUy1ZFXT263XVKs181hwQhyqzqvhfZW/0j6JimsvzOnDCqJWvxIM2OwU+Cjr6+K8fMqPQ2o7zJ5XZFaAvUFgSqf2ttgukFlfQNIwFgx6dS9ZvwV8OJd78RKxfc9hoUi1hQkNq94AD05ELtyBkstNMSPI7XWgi3Ue6e7RzBIrX8Dhrj8GqLpKciHAzkzlAUyQOxmCInkeZihtnv6GdOuRCCjvE2IHEalOQEIWN0w10w9fkVRR8JPGNIeAOkdpVSFtDRtk3rI5bQiQ+hPMp1ZGsE= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 386bc722-b61d-48fa-b4e5-08d7f490de0b X-MS-Exchange-CrossTenant-originalarrivaltime: 10 May 2020 03:18:53.2262 (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: uhTh+agn0FOeFeSWSMBdJxk+ihk3PYagji30vjPhWidjxjQSVLapJDJFl32izgZ4skvYrt6GQAhB4oqcO96wZA1dabBNfLAq1AyGs0ZoxFM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR11MB3361 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 Reviewed-by: Nate DeSimone > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Ashley E > Desimone > Sent: Friday, May 8, 2020 12:45 PM > To: devel@edk2.groups.io > Cc: Desimone, Nathaniel L ; Pandya, Puja > ; Bjorge, Erik C ; Bret > Barkelew ; Agyeman, Prince > > Subject: [edk2-devel] [edk2-staging/EdkRepo] [PATCH] EdkRepo: Address > corner cases in find_project_in_all_indices >=20 > Update find_project_in_all_indices() to only return None values for the > source manifest repo and config file if the project is truly not found i= n any > manifest repository. In the case a path to a manifest file is provided > recursively call > find_in_all_indices() with the code name from the manifest at the provid= ed > path to generate the source manifest repo and config values. >=20 > Additionally update the call to find_project_in_all_indices() in > find_source_manifest_repo to use the value of man_repo instead of None. >=20 > Signed-off-by: Ashley E Desimone > Cc: Nate DeSimone > Cc: Puja Pandya > Cc: Erik Bjorge > Cc: Bret Barkelew > Cc: Prince Agyeman > --- > .../manifest_repos_maintenance.py | 26 +++++++++++++++= ++++-- > - > 1 file changed, 23 insertions(+), 3 deletions(-) >=20 > diff --git > a/edkrepo/common/workspace_maintenance/manifest_repos_maintenanc > e.py > b/edkrepo/common/workspace_maintenance/manifest_repos_maintenanc > e.py > index 2a5a70f..08c4fe6 100644 > --- > a/edkrepo/common/workspace_maintenance/manifest_repos_maintenanc > e.py > +++ > b/edkrepo/common/workspace_maintenance/manifest_repos_maintenanc > e.py > @@ -185,9 +185,29 @@ def find_project_in_all_indices (project, > edkrepo_cfg, edkrepo_user_cfg, except_ > except KeyError: > raise EdkrepoInvalidParametersException(except_msg_man_repo= ) > elif os.path.isabs(project): > - return None, None, project > + manifest =3D ManifestXml(project) > + try: > + found_manifest_repo, found_cfg, found_project =3D > find_project_in_all_indices(manifest.project_info.codename, > + = edkrepo_cfg, > + = edkrepo_user_cfg, > + = except_msg_man_repo, > + = except_msg_not_found, > + = man_repo) > + return found_manifest_repo, found_cfg, project > + except EdkrepoManifestNotFoundException: > + return None, None, project > elif os.path.isfile(os.path.join(os.getcwd(), project)): > - return None, None, os.path.join(os.getcwd(), project) > + manifest =3D os.path.join(os.getcwd(), project) > + try: > + found_manifest_repo, found_cfg, found_project =3D > find_project_in_all_indices(manifest.project_info.codename, > + = edkrepo_cfg, > + = edkrepo_user_cfg, > + = except_msg_man_repo, > + = except_msg_not_found, > + = man_repo) > + return found_manifest_repo, found_cfg, project > + except EdkrepoManifestNotFoundException: > + return None, None, os.path.join(os.getcwd(), project) > elif not os.path.dirname(project): > for repo in cfg_man_repos: > if (man_repo and (repo =3D=3D man_repo)) or not man_repo: > @@ -215,7 +235,7 @@ def find_source_manifest_repo(project_manifest, > edkrepo_cfg, edkrepo_user_cfg, m > = edkrepo_user_cfg, >=20 > humble.PROJ_NOT_IN_REPO.format(project_manifest.project_info.codena > me), >=20 > humble.SOURCE_MANIFEST_REPO_NOT_FOUND.format(project_manifest. > project_info.codename), > - = man_repo=3DNone) > + > + man_repo) > project_manifest.write_source_manifest_repo(src_man_repo) > return src_man_repo >=20 > -- > 2.16.2.windows.1 >=20 >=20 >=20