[X2Go-Commits] [buildscripts] 04/07: bin/build-rpm-package: add (incomplete) attempt at parsing the base mock config file.
git-admin at x2go.org
git-admin at x2go.org
Wed Apr 1 08:45:26 CEST 2015
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository buildscripts.
commit dec04afb6d38cf62c12fbfdd72b7fb8fc12d27bc
Author: Mihai Moldovan <ionic at ionic.de>
Date: Wed Apr 1 08:15:08 2015 +0200
bin/build-rpm-package: add (incomplete) attempt at parsing the base mock config file.
---
bin/build-rpm-package | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/bin/build-rpm-package b/bin/build-rpm-package
index 4d8676c..1db9c77 100755
--- a/bin/build-rpm-package
+++ b/bin/build-rpm-package
@@ -335,8 +335,22 @@ create_mock_config () { # MOCK_BASE CUSTOM_REPO COMPONENT TARGET
done < "/etc/mock/${CUSTOM_REPO}"
typeset -i REPO_START=0
+ TMP_REGEX='^[[:space:]]*config_opts\['"'"'yum\.conf'"'"'\][[:space:]]*=[[:space:]]*"""[[:space:]]*$'
+ typeset TMP_REGEX_END='^[[:space:]]*"""[[:space:]]*$'
+
while read line; do
+ if [[ "${line}" =~ ${TMP_REGEX} ]]; then
+ REPO_START=1
+ elif [ "${REPO_START}" -eq "1" ] && [[ "${line}" =~ ${TMP_REGEX_END} ]]; then
+ # Time to insert whatever is required.
+ elif [ "${REPO_START}" -eq "0" ] && [[ "${line}" =~ ${TMP_REGEX_END} ]]; then
+ echo "Error: Parsing mock base config file failed: unexpected end of yum configuration, no start found." >&2
+ exit -1
+ elif [ "${REPO_START}" -eq "0" ]; then
+ # Write-through.
+ echo "${line}" >> "${TMP_MOCK_CFG_FILE}"
+ fi
done < "/etc/mock/${MOCK_BASE}"
}
--
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