aboutsummaryrefslogtreecommitdiffstats
path: root/MgaRepo/simplerpm.py
diff options
context:
space:
mode:
Diffstat (limited to 'MgaRepo/simplerpm.py')
-rw-r--r--MgaRepo/simplerpm.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/MgaRepo/simplerpm.py b/MgaRepo/simplerpm.py
index a06e694..3d50176 100644
--- a/MgaRepo/simplerpm.py
+++ b/MgaRepo/simplerpm.py
@@ -7,15 +7,17 @@ class SRPM:
self._getinfo()
def _getinfo(self):
- cmdstr = "rpm -qp --nosignature --qf '%%{name} %%{epoch} %%{release} %%{version}' %s"
- status, output = execcmd(cmdstr % self.filename)
+ args = ["rpm", "-qp", "--qf", "%{name} %{epoch} %{release} %{version}",
+ self.filename]
+ status, output = execcmd(args)
self.name, self.epoch, self.release, self.version = output.split()
if self.epoch == "(none)":
self.epoch = None
def unpack(self, topdir):
- execcmd(("rpm -i --nodeps --define '_sourcedir %s/SOURCES' " +
- "--define '_specdir %s/SPECS' --define '_patchdir %s/SOURCES' %s")
- % (topdir, topdir, topdir, self.filename))
+ args ["rpm", "-i", "--nodeps", "--define", "_sourcedir", topdir+"/SOURCES",
+ "--define", "_specdir", topdir + "/SPECS", "--define", "_patchdir",
+ topdir+"/SOURCES", self.filename]
+ execcmd(args)
# vim:et:ts=4:sw=4