From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga01.intel.com (mga01.intel.com []) by mx.groups.io with SMTP id smtpd.web10.1640.1587143913856446116 for ; Fri, 17 Apr 2020 10:18:34 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=fail (domain: intel.com, ip: , mailfrom: ashley.e.desimone@intel.com) IronPort-SDR: od4GOYl2G4pRB7O5hqIulKnAy3bEiLNYnui6DfgYGL03R9paC3BRgyETtCuG9qSLYNg9jhN9ry RZStfe2LRt/w== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Apr 2020 10:18:33 -0700 IronPort-SDR: T/EY8aVSjFHJONEkqK1C/x0ryWw/wi0govAmbETJOmJLVPhICYfTEHIDcPhMX9dp7eAcxiEWtK PIG909Lg8Ckw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,395,1580803200"; d="scan'208";a="243070606" Received: from aedesimo-desk.amr.corp.intel.com ([10.7.159.171]) by orsmga007.jf.intel.com with ESMTP; 17 Apr 2020 10:18:32 -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 v2 1/6] EdkRepo: Support Updated CFG Format Defining Multiple Manifest Repos Date: Fri, 17 Apr 2020 10:18:24 -0700 Message-Id: <20200417171829.23032-2-ashley.e.desimone@intel.com> X-Mailer: git-send-email 2.16.2.windows.1 In-Reply-To: <20200417171829.23032-1-ashley.e.desimone@intel.com> References: <20200417171829.23032-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