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 <[email protected]>
Cc: Nate DeSimone <[email protected]>
Cc: Puja Pandya <[email protected]>
Cc: Erik Bjorge <[email protected]>
Cc: Bret Barkelew <[email protected]>
Cc: Prince Agyeman <[email protected]>
---
 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 (#57488): https://edk2.groups.io/g/devel/message/57488
Mute This Topic: https://groups.io/mt/73070620/21656
Group Owner: [email protected]
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to