Reviewed-by: Erik Bjorge <erik.c.bjo...@intel.com>

-----Original Message-----
From: Desimone, Ashley E <ashley.e.desim...@intel.com> 
Sent: Thursday, April 16, 2020 8:31 PM
To: devel@edk2.groups.io
Cc: Desimone, Nathaniel L <nathaniel.l.desim...@intel.com>; Pandya, Puja 
<puja.pan...@intel.com>; Bjorge, Erik C <erik.c.bjo...@intel.com>; Bret 
Barkelew <bret.barke...@microsoft.com>; Agyeman, Prince 
<prince.agye...@intel.com>
Subject: [edk2-staging/EdkRepo] [PATCH 1/6] EdkRepo: Support Updated CFG Format 
Defining Multiple Manifest Repos

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 <ashley.e.desim...@intel.com>
Cc: Nate DeSimone <nathaniel.l.desim...@intel.com>
Cc: Puja Pandya <puja.pan...@intel.com>
Cc: Erik Bjorge <erik.c.bjo...@intel.com>
Cc: Bret Barkelew <bret.barke...@microsoft.com>
Cc: Prince Agyeman <prince.agye...@intel.com>
---
 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


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#57511): https://edk2.groups.io/g/devel/message/57511
Mute This Topic: https://groups.io/mt/73070620/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to