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 (#57541): https://edk2.groups.io/g/devel/message/57541
Mute This Topic: https://groups.io/mt/73088009/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to