diff options
author | Andreas Hasenack <andreas@mandriva.com> | 2006-06-23 16:10:46 +0000 |
---|---|---|
committer | Andreas Hasenack <andreas@mandriva.com> | 2006-06-23 16:10:46 +0000 |
commit | f036a727817170087299ee8c968d46fb2bf509f4 (patch) | |
tree | 37d96efaeea3db160eda36cc087b4c190e5a3b8c /RepSys | |
parent | af916ae4691312511547acf801592409b3615553 (diff) | |
download | mgarepo-f036a727817170087299ee8c968d46fb2bf509f4.tar mgarepo-f036a727817170087299ee8c968d46fb2bf509f4.tar.gz mgarepo-f036a727817170087299ee8c968d46fb2bf509f4.tar.bz2 mgarepo-f036a727817170087299ee8c968d46fb2bf509f4.tar.xz mgarepo-f036a727817170087299ee8c968d46fb2bf509f4.zip |
- define a more complete rpm environment for constructing the .src.rpm
so all the files end up being where we expect them to be
Diffstat (limited to 'RepSys')
-rw-r--r-- | RepSys/rpmutil.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/RepSys/rpmutil.py b/RepSys/rpmutil.py index 40e712e..83d0051 100644 --- a/RepSys/rpmutil.py +++ b/RepSys/rpmutil.py @@ -39,6 +39,13 @@ def get_srpm(pkgdirurl, template = None): svn = SVN(baseurl=pkgdirurl) 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", @@ -69,8 +76,11 @@ def get_srpm(pkgdirurl, 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)) + + execcmd("rpm -bs --nodeps %s %s %s %s %s %s %s %s %s" % + (topdir, builddir, rpmdir, sourcedir, specdir, + srcrpmdir, patchdir, packager, spec)) + if revision and revisionreal: srpm = glob.glob(os.path.join(srpmsdir, "*.src.rpm"))[0] srpminfo = SRPM(srpm) |