From ce750b78b8a9e6d9ce089eaae78bc65f2d49860a Mon Sep 17 00:00:00 2001 From: Papoteur Date: Mon, 10 Oct 2016 12:12:51 +0200 Subject: Corrections for putsrpm command - formatting the defines parameters in rpm command --- MgaRepo/rpmutil.py | 2 +- MgaRepo/simplerpm.py | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'MgaRepo') diff --git a/MgaRepo/rpmutil.py b/MgaRepo/rpmutil.py index 0fe6f81..78e086d 100644 --- a/MgaRepo/rpmutil.py +++ b/MgaRepo/rpmutil.py @@ -214,7 +214,7 @@ def put_srpm(srpmfile, markrelease=False, striplog=True, branch=None, else: pkgurl = layout.package_url(srpm.name, distro=branch, mirrored=False) - svn = detectVCS(pkgdirurl) + svn = detectVCS(pkgurl) print("Importing package to %s" % pkgurl) try: if srpm.epoch: diff --git a/MgaRepo/simplerpm.py b/MgaRepo/simplerpm.py index 94b0fb0..19fc535 100644 --- a/MgaRepo/simplerpm.py +++ b/MgaRepo/simplerpm.py @@ -14,9 +14,11 @@ class SRPM: self.epoch = None def unpack(self, topdir): - args ["rpm", "-i", "--nodeps", "--define", "_sourcedir", topdir+"/SOURCES", - "--define", "_specdir", topdir + "/SPECS", "--define", "_patchdir", - topdir+"/SOURCES", 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 -- cgit v1.2.1