From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mx.groups.io with SMTP id smtpd.web10.3735.1587094291698496893 for ; Thu, 16 Apr 2020 20:31:31 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.115, mailfrom: ashley.e.desimone@intel.com) IronPort-SDR: Avg590B34nNyXWwXojyX13uj2gqEJv7PFC0PtHLiO7+xdQqb7HMamRsS3n0BbPh4GBqCeFrqiA rEIvsCJz28ng== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Apr 2020 20:31:30 -0700 IronPort-SDR: TPL5zJrz+Gnxocz+lc3bWPagFkOxex5j9TVv89k34PHQ0nFgeH5/PbDyoQbHbpIyQgeOh3747g yD4RP6ojQweA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,393,1580803200"; d="scan'208";a="333066518" Received: from aedesimo-desk.amr.corp.intel.com ([10.7.159.171]) by orsmga001.jf.intel.com with ESMTP; 16 Apr 2020 20:31:30 -0700 From: "Ashley E Desimone" To: devel@edk2.groups.io Cc: Nate DeSimone , Puja Pandya , Erik Bjorge , Bret Barkelew , Prince Agyeman Subject: [edk2-staging/EdkRepo] [PATCH 1/6] EdkRepo: Support Updated CFG Format Defining Multiple Manifest Repos Date: Thu, 16 Apr 2020 20:31:18 -0700 Message-Id: <20200417033123.34972-2-ashley.e.desimone@intel.com> X-Mailer: git-send-email 2.16.2.windows.1 In-Reply-To: <20200417033123.34972-1-ashley.e.desimone@intel.com> References: <20200417033123.34972-1-ashley.e.desimone@intel.com> Add support for the following cfg format to the BaseConfig class enabling it to be consumed by both the Global and User configuration file classes. CfgProps for each listed manifest repository will be dynamically added to the classes prop_list. Configuration Example: [Manifest_A] ... [Manifest_B] ... [manifest-repos] Manifest_A Manifest_B Signed-off-by: Ashley E Desimone Cc: Nate DeSimone Cc: Puja Pandya Cc: Erik Bjorge Cc: Bret Barkelew Cc: Prince Agyeman --- edkrepo/config/config_factory.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/edkrepo/config/config_factory.py b/edkrepo/config/config_factory.py index c342838..6c14f1b 100644 --- a/edkrepo/config/config_factory.py +++ b/edkrepo/config/config_factory.py @@ -85,6 +85,12 @@ class BaseConfig(): if os.path.isfile(self.filename): self.cfg.read(self.filename) + if self.cfg.has_section('manifest-repos'): + for option in self.cfg.options('manifest-repos'): + self.prop_list.append(CfgProp('{}'.format(option), 'URL', '{}-manifest_repo_url.'.format(option), None, False)) + self.prop_list.append(CfgProp('{}'.format(option), 'Branch', '{}-manifest_repo_branch'.format(option), None, False)) + self.prop_list.append(CfgProp('{}'.format(option), 'LocalPath', '{}-manifest_repo_local_path.'.format(option), None, False)) + # Create properties defined by the prop_list cfg_updated = False for prop in self.prop_list: -- 2.16.2.windows.1