From 7d05483906567000a4952c1826b2a001e20a8ed2 Mon Sep 17 00:00:00 2001 From: Andreas Hasenack Date: Mon, 10 Jul 2006 20:08:25 +0000 Subject: - imported moredefines fix --- RepSys/rpmutil.py | 15 ++++++++++++--- 1 file 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) -- cgit v1.2.1