From nobody Mon Feb 9 08:10:32 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+59021+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+59021+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1589158232; cv=none; d=zohomail.com; s=zohoarc; b=HKR58v01iYvSvwHxhVr6ysCGe7QdIy1hA8S776eYFXSzsWoHOUq110Z6WnolDd706BHax+NU82OPTBFbgmkrgs1U/4VKeqrN2NktZohV1OCcrQ6ZvTFvAD+FEwLifJ/U5cdmnp5tTlaKEngbWDnkb3gy+MakacmSiMMTBWxpH5A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589158232; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=wfwy/9NdvAFmRoqDp3kGPYABTwi4Gnx0Ay55gsXVsf4=; b=DL80ChHfqZ00hze7yzcy0lisXHPx8RHsvx+y4UU0HtdUvjjU0CMRS4BdZFufOb4xFK28MxAXcXteEa5uFe4hJcXH1p2LxKJvIz2fLsbasFFL1jt42vmEi+qKlVVgnx7wY6EewJbmJoDzo6MpjkDzxPre+4RiwEuQa2G+Pco6SBI= 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+59021+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 1589158232598345.51638615389425; Sun, 10 May 2020 17:50:32 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id lSLTYY1788612xcELenwGBFG; Sun, 10 May 2020 17:50:32 -0700 X-Received: from mga17.intel.com (mga17.intel.com []) by mx.groups.io with SMTP id smtpd.web11.4128.1589158229244686585 for ; Sun, 10 May 2020 17:50:30 -0700 IronPort-SDR: 1eQTPhq0A3XfOsym3eaIoBWuZoJGyQjMCzkGDoCZEL2dqFbpDd4dJHV4MtJxTT3AFoQTBL54rR jY5AQ8Q+sJLw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2020 17:50:29 -0700 IronPort-SDR: aAJJbFL2moh33/yVKyKZWp84snrjW49LJl/wb7kf5CzIhgMbsI+99i/XFrdIpTAS2cVsVAdev5 dbowHr6ahyqw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,377,1583222400"; d="scan'208";a="296747721" X-Received: from aedesimo-desk.amr.corp.intel.com ([10.212.208.216]) by fmsmga002.fm.intel.com with ESMTP; 10 May 2020 17:50:29 -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 3/4] EdkRepo: Add support for multiple manifest repostories to command completions Date: Sun, 10 May 2020 17:50:25 -0700 Message-Id: <20200511005026.23532-4-ashley.e.desimone@intel.com> In-Reply-To: <20200511005026.23532-1-ashley.e.desimone@intel.com> References: <20200511005026.23532-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: xXD8TYnyPZwAN6sEcsj4oQPFx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1589158232; bh=YqEVIDzbjXxdZpzMGT8x/4Q0agJJPV2rvhCEP92SqrY=; h=Cc:Date:From:Reply-To:Subject:To; b=GbUfiytzvIb0hkFk2gGB+nWEVMsBURBjEw1oWJpf9XG70NAy0UqSsbvdOEhwNbJ9AW/ drzD1CFAtlA3qJNnCerVIGJcskQkLzNkvXSN2EtlNngvPkSvG2IfGXeWKcQLVwIDr/swS GnuoCtoU23va0OPSRwRJdjoThqx5r42ebfY= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Update the command completions for the checkout pin command to support multiple manifest repositories. If a source manifest repository cannot be found for the current workspace then no completions will be provided. Signed-off-by: Ashley E Desimone Cc: Nate DeSimone Cc: Puja Pandya Cc: Erik Bjorge Cc: Bret Barkelew Cc: Prince Agyeman --- edkrepo/command_completion_edkrepo.py | 48 +++++++++++++++++++++++--------= ---- 1 file changed, 32 insertions(+), 16 deletions(-) diff --git a/edkrepo/command_completion_edkrepo.py b/edkrepo/command_comple= tion_edkrepo.py index 1220924..8a2c0e6 100644 --- a/edkrepo/command_completion_edkrepo.py +++ b/edkrepo/command_completion_edkrepo.py @@ -15,6 +15,9 @@ import traceback =20 from edkrepo_manifest_parser.edk_manifest import ManifestXml from edkrepo.common.common_repo_functions import combinations_in_manifest +from edkrepo.common.edkrepo_exception import EdkrepoManifestNotFoundExcept= ion +from edkrepo.common.workspace_maintenance.manifest_repos_maintenance impor= t list_available_manifest_repos +from edkrepo.common.workspace_maintenance.manifest_repos_maintenance impor= t find_source_manifest_repo from edkrepo.config import config_factory from edkrepo.config.config_factory import get_workspace_manifest =20 @@ -28,23 +31,36 @@ def current_combo(parsed_args, config): =20 def checkout_pin(parsed_args, config): pins =3D [] - manifest_directory =3D config['cfg_file'].manifest_repo_abs_local_path manifest =3D get_workspace_manifest() - pin_folder =3D os.path.normpath(os.path.join(manifest_directory, manif= est.general_config.pin_path)) - for dirpath, _, filenames in os.walk(pin_folder): - for file in filenames: - pin_file =3D os.path.join(dirpath, file) - # Capture error output from manifest parser stdout so it is hi= dden unless verbose is enabled - stdout =3D sys.stdout - sys.stdout =3D io.StringIO() - pin =3D ManifestXml(pin_file) - parse_output =3D sys.stdout.getvalue() - sys.stdout =3D stdout - if parsed_args.verbose and parse_output.strip() !=3D '': - print('Pin {} Parsing Errors: {}\n'.format(file, parse_out= put.strip())) - if pin.project_info.codename =3D=3D manifest.project_info.code= name: - pins.append(file) - print(' '.join(pins)) + manifest_directory =3D None + try: + source_manifest_repo =3D find_source_manifest_repo(manifest, confi= g['cfg_file'], config['user_cfg_file'], ) + if source_manifest_repo: + cfg, user_cfg, conflicts =3D list_available_manifest_repos(con= fig['cfg_file'], config['user_cfgFile']) + if source_manifest_repo in cfg: + manifest_directory =3D config['cfg_file'].manifest_repo_ab= s_path(source_manifest_repo) + elif source_manifest_repo in user_cfg: + manifest_directory =3D config['user_cfg_file'].manifest_re= po_abs_path(source_manifest_repo) + else: + manifest_directory =3D None + except EdkrepoManifestNotFoundException: + manifest_directory =3D None + if manifest_directory: + pin_folder =3D os.path.normpath(os.path.join(manifest_directory, m= anifest.general_config.pin_path)) + for dirpath, _, filenames in os.walk(pin_folder): + for file in filenames: + pin_file =3D os.path.join(dirpath, file) + # Capture error output from manifest parser stdout so it i= s hidden unless verbose is enabled + stdout =3D sys.stdout + sys.stdout =3D io.StringIO() + pin =3D ManifestXml(pin_file) + parse_output =3D sys.stdout.getvalue() + sys.stdout =3D stdout + if parsed_args.verbose and parse_output.strip() !=3D '': + print('Pin {} Parsing Errors: {}\n'.format(file, parse= _output.strip())) + if pin.project_info.codename =3D=3D manifest.project_info.= codename: + pins.append(file) + print(' '.join(pins)) =20 # To add command completions for a new command, add an entry to this dicti= onary. command_completions =3D { --=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 (#59021): https://edk2.groups.io/g/devel/message/59021 Mute This Topic: https://groups.io/mt/74126916/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-