public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ashley E Desimone" <ashley.e.desimone@intel.com>
To: devel@edk2.groups.io
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>,
	Puja Pandya <puja.pandya@intel.com>,
	Erik Bjorge <erik.c.bjorge@intel.com>,
	Bret Barkelew <Bret.Barkelew@microsoft.com>,
	Prince Agyeman <prince.agyeman@intel.com>
Subject: [edk2-staging/EdkRepo] [PATCH 1/6] EdkRepo: Support Updated CFG Format Defining Multiple Manifest Repos
Date: Thu, 16 Apr 2020 20:31:18 -0700	[thread overview]
Message-ID: <20200417033123.34972-2-ashley.e.desimone@intel.com> (raw)
In-Reply-To: <20200417033123.34972-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 <ashley.e.desimone@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Puja Pandya <puja.pandya@intel.com>
Cc: Erik Bjorge <erik.c.bjorge@intel.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Cc: Prince Agyeman <prince.agyeman@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


  reply	other threads:[~2020-04-17  3:31 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-17  3:31 [edk2-staging/EdkRepo] [PATCH 0/6] EdkRepo: Add Initial Config Factory Support for Multiple Manifest Repositories Ashley E Desimone
2020-04-17  3:31 ` Ashley E Desimone [this message]
2020-04-17 15:21   ` [edk2-staging/EdkRepo] [PATCH 1/6] EdkRepo: Support Updated CFG Format Defining Multiple Manifest Repos Bjorge, Erik C
2020-04-17  3:31 ` [edk2-staging/EdkRepo] [PATCH 2/6] EdkRepo: Add new sections to edkrepo.cfg Ashley E Desimone
2020-04-17 15:04   ` Bjorge, Erik C
2020-04-17  3:31 ` [edk2-staging/EdkRepo] [PATCH 3/6] EdkRepo: Add the manifest_repo_list property to BaseConfig Ashley E Desimone
2020-04-17 15:22   ` Bjorge, Erik C
2020-04-17  3:31 ` [edk2-staging/EdkRepo] [PATCH 4/6] EdkRepo: Add manifest_repo_props() Ashley E Desimone
2020-04-17 15:08   ` Bjorge, Erik C
2020-04-17 17:04     ` Ashley E Desimone
2020-04-17  3:31 ` [edk2-staging/EdkRepo] [PATCH 5/6] EdkRepo: Move edkrepo_global_data directory to BaseConfig Ashley E Desimone
2020-04-17 15:19   ` Bjorge, Erik C
2020-04-17  3:31 ` [edk2-staging/EdkRepo] [PATCH 6/6] EdkRepo: Add 'get' functions for Manifest Repo data Ashley E Desimone
2020-04-17 15:23   ` Bjorge, Erik C

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200417033123.34972-2-ashley.e.desimone@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox