[X2Go-Commits] [buildscripts] 05/07: bin/build-rpm-package: add the repos and do pass-through correctly.

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 b00b97e3ea1d3279c772321a92fea3139ba76d47
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Wed Apr 1 08:27:58 2015 +0200

    bin/build-rpm-package: add the repos and do pass-through correctly.
---
 bin/build-rpm-package |   18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/bin/build-rpm-package b/bin/build-rpm-package
index 1db9c77..8409321 100755
--- a/bin/build-rpm-package
+++ b/bin/build-rpm-package
@@ -343,11 +343,27 @@ create_mock_config () { # MOCK_BASE CUSTOM_REPO COMPONENT TARGET
 			REPO_START=1
 		elif [ "${REPO_START}" -eq "1" ] && [[ "${line}" =~ ${TMP_REGEX_END} ]]; then
 			# Time to insert whatever is required.
+			printf '\n' >> "${TMP_MOCK_CFG_FILE}"
 
+			# Extras repo.
+			typeset -i i=0
+			for ((i = 0; i < ${#extra_repo[@]}; ++i)); do
+				echo "${extra_repo[${i}]}" >> "${TMP_MOCK_CFG_FILE}"
+			done
+
+			# Full repo if required.
+			if [ "${TARGET}" = "full" ]; then
+				printf '\n' >> "${TMP_MOCK_CFG_FILE}"
+
+				typeset -i i=0
+				for ((i = 0; i < ${#full_repo[@]}; ++i)); do
+					echo "${full_repo[${i}]}" >> "${TMP_MOCK_CFG_FILE}"
+				done
+			fi
 		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
+		else
 			# Write-through.
 			echo "${line}" >> "${TMP_MOCK_CFG_FILE}"
 		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