]> git.donarmstrong.com Git - wannabuild.git/blobdiff - trigger.daily
No reason to lock the database anymore.
[wannabuild.git] / trigger.daily
index c8222958b0bdd0eb0222d470cba0461ec4e1013b..1ee7824dd44ba487915e26d93d1cbab5fad5a4cc 100755 (executable)
@@ -8,7 +8,7 @@
 #     Sources.* == uncompressed, concat'd version
 
 LANG=C
-PATH="/bin:/usr/bin"
+PATH="/bin:/usr/bin:/org/wanna-build/bin"
 #testing must be before unstable so late upld don't build for testing needlessly
 DISTS="oldstable-security stable-security testing-security oldstable stable testing unstable"
 # While oldstable is purged
@@ -118,15 +118,20 @@ for d in $DISTS; do
 # double builds.
 #
     if [ "$d" = "unstable" ]; then
-       rm -f "Sources.$d.base"
-       cp "Sources.$d" "Sources.$d.base"
-       curl_index "$MASTERBUILDD/Sources.gz" "Sources-$d.accepted.gz" "Sources.$d"
+       mv "Sources.$d" "Sources.$d.base"
+       curl_index "$MASTERBUILDD/Sources.gz" "Sources-$d.accepted.gz" "/dev/null"
+       rm -f "Sources-$d.accepted"
+       gunzip "Sources-$d.accepted.gz"
+       keep-latest source "Sources.$d.base" "Sources-$d.accepted" > "Sources.$d"
+
        curl_index "$MASTERBUILDD/Packages.gz" "Packages-$d.accepted.gz" "/dev/null"
+       rm -f "Packages-$d.accepted"
+       gunzip "Packages-$d.accepted.gz"
 
        for a in $ARCHS; do
-           rm -f "Packages.$d.$a.base"
-           cp "Packages.$d.$a" "Packages.$d.$a.base"
+           mv "Packages.$d.$a" "Packages.$d.$a.base"
            gzip -dc "Packages-$d.accepted.gz" >> "Packages.$d.$a"
+           keep-latest $a "Packages.$d.$a.base" "Packages-$d.accepted" > "Packages.$d.$a"
        done
     else
        if [ -e "Sources.$d-p-u" ]; then
@@ -165,8 +170,6 @@ umask 002
 ALL_ARCHES=$(echo $ARCHS_oldstable $ARCHS_stable $ARCHS_testing $ARCHS_unstable \
             | tr ' ' '\n' | sort -u)
 for a in $ALL_ARCHES ; do
-       wanna-build --create-maintenance-lock --database=$a/build-db
-
        for d in $DISTS ; do
                dist=`echo $d | sed s/-.*$//`
                case "$dist" in
@@ -206,7 +209,6 @@ for a in $ALL_ARCHES ; do
        if [ "$DAY" = "0" ]; then
                savelog -p -c 128 /srv/wanna-build/db/$a/transactions.log
        fi
-       wanna-build --remove-maintenance-lock --database=$a/build-db
 done
 umask 022
 for d in $DISTS; do