[Qa-jenkins-scm] [jenkins.debian.net] 01/02: reproducible Arch Linux: include pkg version information in our package repository

Holger Levsen holger at layer-acht.org
Wed Nov 29 17:20:34 UTC 2017


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch master
in repository jenkins.debian.net.

commit 670cf8d617f82ac4546d923da3f5c7b20ce888f1
Author: Holger Levsen <holger at layer-acht.org>
Date:   Wed Nov 29 17:16:43 2017 +0000

    reproducible Arch Linux: include pkg version information in our package repository
    
    Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
 bin/reproducible_build_archlinux_pkg.sh | 14 +++++++-------
 bin/reproducible_html_archlinux.sh      |  2 +-
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/bin/reproducible_build_archlinux_pkg.sh b/bin/reproducible_build_archlinux_pkg.sh
index 6cf3cad..e8811c8 100755
--- a/bin/reproducible_build_archlinux_pkg.sh
+++ b/bin/reproducible_build_archlinux_pkg.sh
@@ -57,20 +57,20 @@ update_archlinux_repositories() {
 		schroot --run-session -c $SESSION --directory /var/tmp -- sudo pacman -Syu --noconfirm
 		# Get a list of unique package bases.  Non-split packages don't have a pkgbase set
 		# so we need to use the pkgname for them instead.
-		schroot --run-session -c $SESSION --directory /var/tmp -- expac -S '%r %e %n' | \
-			while read repo pkgbase pkgname; do
+		schroot --run-session -c $SESSION --directory /var/tmp -- expac -S '%r %e %n %v' | \
+			while read repo pkgbase pkgname version; do
 				if [[ "$pkgbase" = "(null)" ]]; then
-					printf '%s %s\n' "$repo" "$pkgname"
+					printf '%s %s %s\n' "$repo" "$pkgname" "$version"
 				else
-					printf '%s %s\n' "$repo" "$pkgbase"
+					printf '%s %s %s\n' "$repo" "$pkgbase" "$version"
 				fi
 			done | sort -u > "$ARCHLINUX_PKGS"_full_pkgbase_list
 
 		for REPO in $ARCHLINUX_REPOS ; do
 			echo "$(date -u ) - updating list of available packages in repository '$REPO'."
 			grep "^$REPO" "$ARCHLINUX_PKGS"_full_pkgbase_list | \
-				while read repo pkgbase; do
-					printf '%s\n' "$pkgbase"
+				while read repo pkgbase version; do
+					printf '%s %s\n' "$pkgbase" "$version"
 				done > "$ARCHLINUX_PKGS"_"$REPO"
 			echo "$(date -u ) - these packages in repository '$REPO' are known to us:"
 			cat ${ARCHLINUX_PKGS}_$REPO
@@ -100,7 +100,7 @@ choose_package() {
 					;;
 		esac
 		touch -d "$(date -d "$MIN_AGE days ago" '+%Y-%m-%d') 00:00 UTC" $DUMMY
-		for PKG in $(cat ${ARCHLINUX_PKGS}_$REPO | sort -R | xargs echo ) ; do
+		for PKG in $(cat ${ARCHLINUX_PKGS}_$REPO | cut -d ' ' -f1 | sort -R | xargs echo ) ; do
 			# build package if it has never build or at least $MIN_AGE days ago
 			if [ ! -d $BASE/archlinux/$REPO/$PKG ] || [ $DUMMY -nt $BASE/archlinux/$REPO/$PKG ] ; then
 				REPOSITORY=$REPO
diff --git a/bin/reproducible_html_archlinux.sh b/bin/reproducible_html_archlinux.sh
index 219a2aa..c742bb3 100755
--- a/bin/reproducible_html_archlinux.sh
+++ b/bin/reproducible_html_archlinux.sh
@@ -33,7 +33,7 @@ ARCHLINUX_NR_GOOD=0
 ARCHLINUX_NR_UNKNOWN=0
 for REPOSITORY in $ARCHLINUX_REPOS ; do
 	echo "$(date -u) - starting to analyse build results for '$REPOSITORY'."
-	TOTAL=$(cat ${ARCHLINUX_PKGS}_$REPOSITORY | sed -s "s# #\n#g" | wc -l)
+	TOTAL=$(cat ${ARCHLINUX_PKGS}_$REPOSITORY | wc -l)
 	TESTED=0
 	NR_FTBFS=0
 	NR_FTBR=0

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git



More information about the Qa-jenkins-scm mailing list