diff options
author | Holger Levsen <holger@layer-acht.org> | 2015-12-16 16:54:34 +0100 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2015-12-16 16:55:35 +0100 |
commit | c33e7e79e5cc52f272053f709f009d7d99c270e0 (patch) | |
tree | 9d084a41011afb18bed9ae406c1458625b60ea42 | |
parent | d2478fbb8818ac2f4bc09e77ad5353f322e3607b (diff) | |
download | jenkins.debian.net-c33e7e79e5cc52f272053f709f009d7d99c270e0.tar.xz |
reproducible archlinux: refactor
-rwxr-xr-x | bin/reproducible_build_archlinux_pkg.sh | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/bin/reproducible_build_archlinux_pkg.sh b/bin/reproducible_build_archlinux_pkg.sh index b60aaf8b..17c53c03 100755 --- a/bin/reproducible_build_archlinux_pkg.sh +++ b/bin/reproducible_build_archlinux_pkg.sh @@ -74,16 +74,19 @@ choose_package() { local PKG for REPO in $ARCHLINUX_REPOS ; do case $REPO in - core) MIN_AGE=6 + core) MIN_AGE=7 ;; - extra|multilib) MIN_AGE=27 + extra|multilib) MIN_AGE=28 ;; - *) MIN_AGE=99 # should never happen… + community) MIN_AGE=42 + ;; + *) MIN_AGE=365 # should never happen… ;; esac + touch -d "$(date -d '$MIN_AGE days ago' '+%Y-%m-%d') 00:00 UTC" $DUMMY for PKG in $(cat ${ARCHLINUX_PKGS}_$REPO) ; do # build package if it has never build or at least $MIN_AGE days ago - if [ ! -d $BASE/archlinux/$REPO/$PKG ] || [ ! -z $(find $BASE/archlinux/$REPO/ -name $PKG -mtime +$MIN_AGE) ] ; then + if [ ! -d $BASE/archlinux/$REPO/$PKG ] || [ $DUMMY -nt $BASE/archlinux/$REPO/$PKG ] ; then REPOSITORY=$REPO SRCPACKAGE=$PKG echo "$(date -u ) - building package $PKG from '$REPOSITORY' now..." @@ -99,6 +102,7 @@ choose_package() { break fi done + rm $DUMMY > /dev/null if [ -z $SRCPACKAGE ] ; then echo "$(date -u ) - no package found to be build, sleeping 6h." for i in $(seq 1 12) ; do |