From: Pat Riehecky riehecky@fnal.gov
Pungi's highly customizable behavior lends itself to some fairly long execution lines. The attached patch will allow setting some defaults in a ~/.pungirc while still allowing the end user to override them on the command line.
I hope to eventually expand this to cover more of the pungi options. But first things first, are there any objections to this patch?
Pat Riehecky (1): Allow for setting some defaults via a .pungirc
src/pypungi/config.py | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
From: Pat Riehecky riehecky@fnal.gov
--- src/pypungi/config.py | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/src/pypungi/config.py b/src/pypungi/config.py index 8856857..bc00e33 100644 --- a/src/pypungi/config.py +++ b/src/pypungi/config.py @@ -53,3 +53,8 @@ class Config(SafeConfigParser): self.set('pungi', 'lookaside_repos', '') self.set('pungi', 'resolve_deps', "True") self.set('pungi', 'no_dvd', "False") + + # look for user local config for defaults, no error if missing + # https://docs.python.org/2/library/configparser.html#ConfigParser.RawConfigPa... + userconf = os.path.expanduser('~/.pungirc') + self.read(userconf)
any comments on this patch?
On 12/29/2014 11:49 AM, Pat Riehecky wrote:
From: Pat Riehecky riehecky@fnal.gov
src/pypungi/config.py | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/src/pypungi/config.py b/src/pypungi/config.py index 8856857..bc00e33 100644 --- a/src/pypungi/config.py +++ b/src/pypungi/config.py @@ -53,3 +53,8 @@ class Config(SafeConfigParser): self.set('pungi', 'lookaside_repos', '') self.set('pungi', 'resolve_deps', "True") self.set('pungi', 'no_dvd', "False")
# look for user local config for defaults, no error if missing
# https://docs.python.org/2/library/configparser.html#ConfigParser.RawConfigParser.read
userconf = os.path.expanduser('~/.pungirc')
self.read(userconf)
buildsys@lists.fedoraproject.org