[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible Arch Linux: prefer manually triggered packages over new packages
Holger Levsen
holger at layer-acht.org
Thu Nov 30 23:53:02 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 5c2b989abb6b5c8cb68eea7c4e468897ea7222af
Author: Holger Levsen <holger at layer-acht.org>
Date: Thu Nov 30 23:52:47 2017 +0000
reproducible Arch Linux: prefer manually triggered packages over new packages
Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
bin/reproducible_build_archlinux_pkg.sh | 28 +++++++++++++++++++++-------
1 file changed, 21 insertions(+), 7 deletions(-)
diff --git a/bin/reproducible_build_archlinux_pkg.sh b/bin/reproducible_build_archlinux_pkg.sh
index dd4c711..06df943 100755
--- a/bin/reproducible_build_archlinux_pkg.sh
+++ b/bin/reproducible_build_archlinux_pkg.sh
@@ -89,16 +89,12 @@ choose_package() {
local REPO
local PKG
for REPO in $(echo $ARCHLINUX_REPOS | sed -s "s# #\n#g" | sort -R | xargs echo ); do
+ # try to find packages which have been triggered
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 ] || [ -f $BASE/archlinux/$REPO/$PKG/pkg.needs_build ] ; then
+ # if triggered...
+ if [ -f $BASE/archlinux/$REPO/$PKG/pkg.needs_build ] ; then
REPOSITORY=$REPO
SRCPACKAGE=$PKG
- echo "$(date -u ) - building package $PKG from '$REPOSITORY' now..."
- # very simple locking…
- mkdir -p $BASE/archlinux/$REPOSITORY/$PKG
- touch $BASE/archlinux/$REPOSITORY/$PKG
- [ ! -f $BASE/archlinux/$REPO/$PKG/pkg.needs_build ] || rm $BASE/archlinux/$REPO/$PKG/pkg.needs_build
# break out of the loop (and then out of the next loop too...)
break
fi
@@ -107,6 +103,20 @@ choose_package() {
if [ ! -z "$SRCPACKAGE" ] ; then
break
fi
+ # trz to find packages which never been built before
+ for PKG in $(cat ${ARCHLINUX_PKGS}_$REPO | cut -d ' ' -f1 | sort -R | xargs echo ) ; do
+ # if new...
+ if [ ! -d $BASE/archlinux/$REPO/$PKG ] ; then
+ REPOSITORY=$REPO
+ SRCPACKAGE=$PKG
+ # break out of the loop (and then out of the next loop too...)
+ break
+ fi
+ done
+ # again, if we broke out of the previous loop we have choosen a package
+ if [ ! -z "$SRCPACKAGE" ] ; then
+ break
+ fi
done
if [ -z $SRCPACKAGE ] ; then
echo "$(date -u ) - no package found to be build, sleeping 6h."
@@ -117,6 +127,10 @@ choose_package() {
echo "$(date -u ) - exiting cleanly now."
exit 0
fi
+ echo "$(date -u ) - building package $SRCPACKAGE from '$REPOSITORY' now..."
+ # very simple locking…
+ mkdir -p $BASE/archlinux/$REPOSITORY/$SRCPACKAGE
+ [ ! -f $BASE/archlinux/$REPO/$SRCPACKAGE/pkg.needs_build ] || rm $BASE/archlinux/$REPO/$SRCPACKAGE/pkg.needs_build
}
first_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