diff options
-rw-r--r-- | RepSys/rpmutil.py | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/RepSys/rpmutil.py b/RepSys/rpmutil.py index 7b6446f..48efd1c 100644 --- a/RepSys/rpmutil.py +++ b/RepSys/rpmutil.py @@ -37,6 +37,13 @@ def get_srpm(pkgdirurl, scripts = []): svn = SVN() tmpdir = tempfile.mktemp() + topdir = "--define '_topdir %s'" % tmpdir + builddir = "--define '_builddir %s/%s'" % (tmpdir, "BUILD") + rpmdir = "--define '_rpmdir %s/%s'" % (tmpdir, "RPMS") + sourcedir = "--define '_sourcedir %s/%s'" % (tmpdir, "SOURCES") + specdir = "--define '_specdir %s/%s'" % (tmpdir, "SPECS") + srcrpmdir = "--define '_srcrpmdir %s/%s'" % (tmpdir, "SRPMS") + patchdir = "--define '_patchdir %s/%s'" % (tmpdir, "SOURCES") try: if mode == "version": geturl = os.path.join(pkgdirurl, "versions", @@ -64,9 +71,11 @@ def get_srpm(pkgdirurl, if status != 0: raise Error, "script %s failed" % script if packager: - packager = " --define 'packager %s'" % packager - execcmd("rpm -bs --nodeps --define '_topdir %s'%s %s" % - (tmpdir, packager, spec)) + packager = "--define 'packager %s'" % packager + + execcmd("rpm -bs --nodeps %s %s %s %s %s %s %s %s %s" % + (topdir, builddir, rpmdir, sourcedir, + specdir, srcrpmdir, patchdir, packager, spec)) if revision: srpm = glob.glob(os.path.join(srpmsdir, "*.src.rpm"))[0] srpmbase = os.path.basename(srpm) |