[edk2-devel] [edk2-staging/EdkRepo] [PATCH 1/6] EdkRepo: Support Updated CFG Format Defining Multiple Manifest Repos

Bjorge, Erik C erik.c.bjorge at intel.com
Fri Apr 17 15:21:24 UTC 2020


Reviewed-by: Erik Bjorge <erik.c.bjorge at intel.com>

-----Original Message-----
From: Desimone, Ashley E <ashley.e.desimone at intel.com> 
Sent: Thursday, April 16, 2020 8:31 PM
To: devel at edk2.groups.io
Cc: Desimone, Nathaniel L <nathaniel.l.desimone at intel.com>; Pandya, Puja <puja.pandya at intel.com>; Bjorge, Erik C <erik.c.bjorge at intel.com>; Bret Barkelew <Bret.Barkelew at microsoft.com>; Agyeman, Prince <prince.agyeman at 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.desimone at intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone at intel.com>
Cc: Puja Pandya <puja.pandya at intel.com>
Cc: Erik Bjorge <erik.c.bjorge at intel.com>
Cc: Bret Barkelew <Bret.Barkelew at microsoft.com>
Cc: Prince Agyeman <prince.agyeman at 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/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-





More information about the edk2-devel-archive mailing list