[PATCH 2/2] mock-with-analysis: do not hard-wire rpm dist macro
Kamil Dudka
kdudka at redhat.com
Mon Feb 18 15:51:43 UTC 2013
---
mock-with-analysis | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/mock-with-analysis b/mock-with-analysis
index 9390fb0..ae4edb5 100755
--- a/mock-with-analysis
+++ b/mock-with-analysis
@@ -99,9 +99,12 @@ def setup_chroot(mockcfg, srpmpath):
# Read the rpm top directory (e.g. /home/david/rpmbuild)
rpmtopdir = Popen(["rpm", "--eval", "%{_topdir}"], stdout=PIPE).communicate()[0].rstrip()
+ # Read the rpm dist macro (e.g. .fc17)
+ rpmdist = Popen(["rpm", "--eval", "%{dist}"], stdout=PIPE).communicate()[0].rstrip()
+
# Install the pre-built gcc-python-plugin (from the firehose branch):
mockcfg.cmd(['--install',
- rpmtopdir + '/RPMS/x86_64/gcc-python2-plugin-0.11.firehose-1.fc17.x86_64.rpm'])
+ rpmtopdir + '/RPMS/x86_64/gcc-python2-plugin-0.11.firehose-1' + rpmdist + '.x86_64.rpm'])
# Copy up latest version of the libcpychecker code from a working copy
# overriding the copy from the pre-built plugin:
@@ -116,7 +119,7 @@ def setup_chroot(mockcfg, srpmpath):
# FIXME: package these and get them into Fedora:
mockcfg.cmd(['--install', '../firehose/dist/firehose-0.0.1-1.noarch.rpm'])
mockcfg.cmd(['--install', '../gccinvocation/dist/gccinvocation-0.0.1-1.noarch.rpm'])
- mockcfg.cmd(['--install', rpmtopdir + '/RPMS/x86_64/python-subprocess32-3.2.3-1.fc17.x86_64.rpm'])
+ mockcfg.cmd(['--install', rpmtopdir + '/RPMS/x86_64/python-subprocess32-3.2.3-1' + rpmdist + '.x86_64.rpm'])
# ^^^ review request for python-subprocess32:
# https://bugzilla.redhat.com/show_bug.cgi?id=910891
--
1.7.1
More information about the firehose-devel
mailing list