[X2Go-Commits] [buildscripts] 03/03: bin/build-rpm-package: work around buggy mock versions.
git-admin at x2go.org
git-admin at x2go.org
Tue Mar 24 05:11:48 CET 2015
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository buildscripts.
commit 67e67118efe85bd7cb977a81615a0bf3bf9074e2
Author: Mihai Moldovan <ionic at ionic.de>
Date: Tue Mar 24 05:11:42 2015 +0100
bin/build-rpm-package: work around buggy mock versions.
---
bin/build-rpm-package | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/bin/build-rpm-package b/bin/build-rpm-package
index 979605e..afc8f4e 100755
--- a/bin/build-rpm-package
+++ b/bin/build-rpm-package
@@ -187,10 +187,20 @@ get_extra_repository () {
;;
"redhat")
# Always use -r.
- ret="-r"
+ ret="-r "
if [ -n "${RPM_MOCK_CONFIG_DIR}" ]; then
# FIXME: these files should probably be autogenerated to lessen maintenance load.
+ # Itsy-bitsy problem here: mock versions prior to 1.2.0 are buggy in the sense that
+ # they *always* prepend /etc/mock/ and append .cfg to any chroot file specified
+ # via -r, even if the argument is an absolute path.
+ # We have to work around that by specifying ../..//PATH/TO/MOCK-CONFIG and leaving
+ # out the ".cfg" part.
+ # Find out if we're using a buggy version.
+ check_mock_version_atleast "1" "2" "0" && MOCK_BUGGY="0" || MOCK_BUGGY="1"
+
+ [ "${MOCK_BUGGY}" -eq "1" ] && ret="${ret}../../"
+
# Add config base dir if specified.
ret="${ret} ${RPM_MOCK_CONFIG_DIR}/"
@@ -211,11 +221,11 @@ get_extra_repository () {
fi
# Add .cfg extension.
- ret="${ret}.cfg"
+ [ "${MOCK_BUGGY}" -eq "0" ] && ret="${ret}.cfg"
else
# As the default directory /etc/mock is non-writable, assume we don't have
# special mock configs.
- ret="${ret} ${DIST}-${CODENAME}-${ARCH}"
+ ret="${ret}${DIST}-${CODENAME}-${ARCH}"
fi
;;
*)
--
Alioth's /srv/git/code.x2go.org/buildscripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git
More information about the x2go-commits
mailing list