From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mx.groups.io with SMTP id smtpd.web11.9709.1589081158508165746 for ; Sat, 09 May 2020 20:25:58 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=v7dJvH3x; spf=pass (domain: intel.com, ip: 134.134.136.24, mailfrom: nathaniel.l.desimone@intel.com) IronPort-SDR: pxrOxm6alvqyb/lKVOKoHv+fmZ0mpcVqrzo1lCM7z+6UIRsCCJjs09ag4ooTL8LLb1n+LwnqCv WoyZ74TWr3tg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 May 2020 20:25:58 -0700 IronPort-SDR: JY3gO6dbYICQ4l6aSh0oA66/hFwpDfvHa6N+ap6gHgt8BCkEu1vhUhsoYbB91jvznoKX6R0Hwc mqKmOoaY2+sQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,374,1583222400"; d="scan'208";a="285883171" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga004.fm.intel.com with ESMTP; 09 May 2020 20:25:58 -0700 Received: from fmsmsx121.amr.corp.intel.com (10.18.125.36) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sat, 9 May 2020 20:25:57 -0700 Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by fmsmsx121.amr.corp.intel.com (10.18.125.36) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sat, 9 May 2020 20:25:57 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.170) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sat, 9 May 2020 20:25:57 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gyrEW6rYq5r3k03ff5w/Qv7DbzoTDg0+9uPtICsL9r5udUgqc7EOtCIABBLNff931cBXuQwIghRefN+oaw2FZPjSyBeqvQZs9lob74SQ1EqGOI19sPBhHmI7yi5U0y3LmRkmc7SscUyCL3NNNlizhfiJkZ6tZV4Biwkv2daK2Oey7ZFHoxWFZHGoPMGng0uhM4OAmOE1uCY/rh04irikpcJe10qakfORXB/Ziv/T9HpODOqyvMzBsCkNCwuK00ha5cdu7qc07HicYjn8sR76NxuJLo85oa928EQ2K9NYWWhFGQRKPV05AjtKypo3VHEjvntLsW42Emqeb8OHurwepQ== 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=b9DvonIkqkpCp1ndv8ch48WUrrwgM8It45bW/IPFGyU=; b=CwC22xkWVFJkRRNQUAN6KWIJsSg0VIe285F9fVsLZU16STLdUCgs/HzhyVrx6em7yi9/epDkiECzZP6elPwaoJ7PM/9u8j+KoAkB884tgVPMDlZYmug2lI/Am6/2RYfx49T6Mg8XoijUB7a1IZhKMaHLnFljkBMBua6fbLyIqeb5id3uX6/M7VE63HmE2xAACPEwxSKHRDY6fc9qZD2kx0HlH2AmIGW2ONPWhw3R7POjz6ZuEfDebZJAgOqGtusOwXwzXHjT5HjSDyEPC4Ea0mVFh9GYKfaOICIhvJNyY59VtNK2Q2mgVFYZdJ9r1MCoZB7s9KJsd4X6VbX0oSF4+w== 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=b9DvonIkqkpCp1ndv8ch48WUrrwgM8It45bW/IPFGyU=; b=v7dJvH3xbdBaLWEN/OW7iXcIaZS0ZUv87Nk6QJ8gs9HnkNbZCafh19PxL8upya2rOCFZJEowA4Sa1ExhtJJwU+rlqDze7M0tUihq+hOKNo70wabibDIFN5I7Ca7sjBINXBrYBx5+yppPE5HZvQLzLrV/bri4VeuqvhukRDiLFOM= Received: from BL0PR11MB3489.namprd11.prod.outlook.com (2603:10b6:208:75::29) by BL0PR11MB3091.namprd11.prod.outlook.com (2603:10b6:208:7f::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.34; Sun, 10 May 2020 03:25:55 +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:25:55 +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: AQHWJXFH9Q2I6ijM0kuqlQFddlx8wKigqn6Q Date: Sun, 10 May 2020 03:25:54 +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: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYWQ3OThkNzgtNDI5NC00OGFiLTk0YTgtNmQwZWI5YTM1MmNmIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiOHZLMm1OT3NqNEV6TUJnUHlDWERGUElENXgxUThGVkxtS0loXC9HdzR3WFpFaWV5bkZUbUdOS1NTOUw1azJ0XC9KIn0= 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: 5f55e635-4d16-4446-ea1e-08d7f491d95a x-ms-traffictypediagnostic: BL0PR11MB3091: 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: W6r+CSkvh1+qIT9kcutpNyaIicc2DhbHcRftgZ5cUtR/qQSnzKQH2npcFztwVUvHKEFsOUuinYXqM9T9slJ152sVbMvmtomEVA25Zr02H7XMGN2ogvtZdHMm+a6I7WQTMiUa+EGiz4vnu2+rsGCeLq+3nZM1KdTApq1K4YOoTqWlSQ2MO7F1blKQ2Svx0qHuatQdp+HJb6T+/UHNCieWUAoHKK8WrL5XkhpTLchdGwPznpbijgkk5l5PaAtt83+MJGUq7g1FwGPPKv4XkxTXx2ZDl3Czdz/6R5O9E8jLB4efCYqpMKe7PKR9J/csaFbqE1+SR6ymRus0IfeQkw02uiJlInDwhnbxG0addngLdiNVtlx35qC7M+fPiRrtnUS+5qhcwyNCvU+q0T1FR6DJ28RVc19nehKXIxciY5n4zF9zJd3kpHeek+UJKiHFNJPyT7Gl6oX7KxJL9vdzWjzK8jbZAjXTlq4K+WJzVLt6L2gXfV7+LBPMFKIDNzfjwgTIQN1XVq3gR1OU4cOqZfu06X/rvZH57gDbtvDHJ6rucYPC1gdvoh1T+uL6mPt7ZJdC0qCY7Z+OmiXDi7feQGBJOrNAGt2Cduyoes6bwe/m660= 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:(136003)(396003)(39860400002)(346002)(366004)(376002)(33430700001)(4326008)(107886003)(186003)(54906003)(110136005)(5660300002)(33656002)(26005)(33440700001)(478600001)(966005)(53546011)(66946007)(6506007)(86362001)(66556008)(64756008)(71200400001)(55016002)(66476007)(66446008)(2906002)(76116006)(9686003)(8936002)(6636002)(7696005)(8676002)(316002)(52536014);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: NqhcY2ftCajCmPfc4MEhAbIsu4NMeKKYY1svSsk2tJ5MhE0EJ03QjqTMLUCeUziWmZCD3oNjm830HdHsDQOhhZ+VmdIBYyUs+/y7ROZYWg2v0YPx+SGFTUa64unPYgGqMUWbZv9C82GEOzxW6FqZHN6kyeeqDYilTpndco8EGc41aJN8YEnW3HKQK9UduJY5fcfX5aHdwC/GZg0FJyIrU3KHSIgbd6Gd0gSq7afr4Z+O7qIpN/2wNWaFDA00Xrx/8Ygcy1zwL5DKrErQimpibu5U7FnwFm4uKDjb8KALhHTy3VFn27PmKcOzIZi7QY3CYXpRIviVcNwk/Z4IV8fGg5JZ69+mfURSenF/XpxoDB+SLT1nu1wRfr0dJAV/y26YiVqyzNQ7dPZMtOJUUd45KH1ivaM6nkEuW//l0IGBSrShZolyNiROraeup3FbQme+/srIfYbGr5hRYGoH2WzpttmgdisBVR5jJZQLS+MjAm8= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 5f55e635-4d16-4446-ea1e-08d7f491d95a X-MS-Exchange-CrossTenant-originalarrivaltime: 10 May 2020 03:25:54.9334 (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: laJDLlR5xSFIrc9QRHPT+8qkiRAtU733IBOM+LPMAFmtqY36M1cAcbV0oCIF5RW6B8vatcINXdoN0LzXY1RbiXkhKoqYPA4cjnKO2pMI4mw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR11MB3091 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 Pushed: b770e4017e889247925b17cfaa064d112eadda32 > -----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