2013-01-26 21:41:55 +00:00
|
|
|
Add --gpgkey option to repo command
|
|
|
|
|
|
|
|
This will be used to verify packages by pungi, which have no other way to get
|
|
|
|
key location (no real .repo files).
|
|
|
|
|
|
|
|
Signed-off-by: Marek Marczykowski <marmarek@invisiblethingslab.com>
|
|
|
|
Index: pykickstart-1.99.22/pykickstart/commands/repo.py
|
|
|
|
===================================================================
|
|
|
|
--- pykickstart-1.99.22.orig/pykickstart/commands/repo.py
|
|
|
|
+++ pykickstart-1.99.22/pykickstart/commands/repo.py
|
2015-03-23 19:06:25 +00:00
|
|
|
@@ -130,19 +130,34 @@
|
2013-01-26 21:41:55 +00:00
|
|
|
|
|
|
|
RHEL6_RepoData = F14_RepoData
|
|
|
|
|
|
|
|
-F15_RepoData = F14_RepoData
|
2015-03-23 19:06:25 +00:00
|
|
|
-
|
|
|
|
-class F21_RepoData(F14_RepoData):
|
2013-01-26 21:41:55 +00:00
|
|
|
+class F15_RepoData(F14_RepoData):
|
2015-03-23 19:06:25 +00:00
|
|
|
removedKeywords = F14_RepoData.removedKeywords
|
|
|
|
removedAttrs = F14_RepoData.removedAttrs
|
|
|
|
|
|
|
|
def __init__(self, *args, **kwargs):
|
|
|
|
F14_RepoData.__init__(self, *args, **kwargs)
|
|
|
|
- self.install = kwargs.get("install", False)
|
2013-01-26 21:41:55 +00:00
|
|
|
+ self.gpgkey = kwargs.get("gpgkey", None)
|
2015-03-22 23:11:28 +00:00
|
|
|
|
2015-03-23 19:06:25 +00:00
|
|
|
def _getArgsAsStr(self):
|
|
|
|
retval = F14_RepoData._getArgsAsStr(self)
|
|
|
|
|
2013-01-26 21:41:55 +00:00
|
|
|
+ if self.gpgkey:
|
|
|
|
+ retval += " --gpgkey=\"%s\"" % self.gpgkey
|
|
|
|
+
|
|
|
|
+ return retval
|
|
|
|
+
|
2015-03-22 23:11:28 +00:00
|
|
|
+
|
|
|
|
+class F21_RepoData(F15_RepoData):
|
2015-03-23 19:06:25 +00:00
|
|
|
+ removedKeywords = F15_RepoData.removedKeywords
|
|
|
|
+ removedAttrs = F15_RepoData.removedAttrs
|
|
|
|
+
|
|
|
|
+ def __init__(self, *args, **kwargs):
|
|
|
|
+ F15_RepoData.__init__(self, *args, **kwargs)
|
|
|
|
+ self.install = kwargs.get("install", False)
|
|
|
|
+
|
|
|
|
+ def _getArgsAsStr(self):
|
|
|
|
+ retval = F15_RepoData._getArgsAsStr(self)
|
|
|
|
+
|
|
|
|
if self.install:
|
|
|
|
retval += " --install"
|
2013-01-26 21:41:55 +00:00
|
|
|
|
2015-03-22 23:11:28 +00:00
|
|
|
@@ -271,6 +286,11 @@
|
2013-01-26 21:41:55 +00:00
|
|
|
|
|
|
|
urlRequired = False
|
2015-03-22 23:11:28 +00:00
|
|
|
|
2013-01-26 21:41:55 +00:00
|
|
|
+ def _getParser(self):
|
|
|
|
+ op = F14_Repo._getParser(self)
|
|
|
|
+ op.add_option("--gpgkey", action="store", type="string")
|
|
|
|
+ return op
|
|
|
|
+
|
2015-03-22 23:11:28 +00:00
|
|
|
class F21_Repo(F15_Repo):
|
|
|
|
removedKeywords = F15_Repo.removedKeywords
|
|
|
|
removedAttrs = F15_Repo.removedAttrs
|