[Qa-jenkins-scm] [jenkins.debian.net] 03/05: reproducible Arch Linux: remove pacman lock in local session

Holger Levsen holger at layer-acht.org
Fri Dec 8 23:36:14 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 34421333915feaee4551194ce7963bfae39af1e5
Author: anthraxx <levente at leventepolyak.net>
Date:   Fri Dec 8 23:37:04 2017 +0100

    reproducible Arch Linux: remove pacman lock in local session
    
    happens when root maintenance update running while session starts.
    
    Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
 bin/reproducible_build_archlinux_pkg.sh | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/bin/reproducible_build_archlinux_pkg.sh b/bin/reproducible_build_archlinux_pkg.sh
index 197aa55..06f8f64 100755
--- a/bin/reproducible_build_archlinux_pkg.sh
+++ b/bin/reproducible_build_archlinux_pkg.sh
@@ -143,6 +143,8 @@ first_build() {
 	ACTUAL_SRCPACKAGE=$(ls "$BUILDDIR")
 	# just set timezone in the 1st build
 	echo 'export TZ="/usr/share/zoneinfo/Etc/GMT+12"' | schroot --run-session -c $SESSION --directory /tmp -- tee -a /var/lib/jenkins/.bashrc
+	# remove possible lock in our local session (happens when root maintenance update running while session starts)
+	schroot --run-session -c $SESSION --directory "$BUILDDIR" -- sudo rm -f /var/lib/pacman/db.lck 2>&1 | tee -a $LOG
 	# update before pulling new dependencies
 	schroot --run-session -c $SESSION --directory "$BUILDDIR" -- sudo pacman -Syu --noconfirm 2>&1 | tee -a $LOG
 	# determine the version of the package being build
@@ -222,6 +224,8 @@ second_build() {
 	export LC_ALL="fr_CH.UTF-8"
 	umask 0002
 	__END__
+	# remove possible lock in our local session (happens when root maintenance update running while session starts)
+	schroot --run-session -c $SESSION --directory "$BUILDDIR" -- sudo rm -f /var/lib/pacman/db.lck 2>&1 | tee -a $LOG
 	# update before pulling new dependencies
 	schroot --run-session -c $SESSION --directory "$BUILDDIR" -- sudo pacman -Syu --noconfirm 2>&1 | tee -a $LOG
 	# determine the version of the package being build

-- 
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