Skip to content
Commits on Source (2)
......@@ -332,10 +332,9 @@ See link:https://jenkins.debian.net/userContent/about.html["about jenkins.debian
* use db
** problem: we currently have more (detailed) stati in archlinux
** extend scheduler.sh:
*** actually schedule old packages once queue is empty
*** also delete unknown packages from db
*** check/make sure that updated packages are only scheduled once
*** dont schedule blacklisted packages
*** actually schedule old packages once queue is empty (except blacklisted packages)
*** also delete unknown packages from db: sources and schedule, later results as well
*** check/make sure that packages which are newer in trunk than repo are only scheduled once
** make build.sh read & write db
*** delete all pkg.needs_build files on disk
*** drop all occurrances of pkg.needs_build from the code
......
......@@ -23,6 +23,7 @@ update_archlinux_repositories() {
local SESSION="archlinux-scheduler-$RANDOM"
schroot --begin-session --session-name=$SESSION -c jenkins-reproducible-archlinux
schroot --run-session -c $SESSION --directory /var/tmp -- sudo pacman -Syu --noconfirm
local BLACKLIST="/($(echo $ARCHLINUX_BLACKLISTED | sed "s# #|#g"))/"
#
# Get a list of unique package bases. Non-split packages don't have a pkgbase set
......@@ -90,15 +91,18 @@ update_archlinux_repositories() {
elif [ "$VERSION" != "$version" ] ; then
VERCMP="$(schroot --run-session -c $SESSION --directory /var/tmp -- vercmp $version $VERSION || true)"
if [ "$VERCMP" = "1" ] ; then
# known package but with new version, update db and schedule
# known package with new version, so update db and schedule
echo $REPO/$pkgbase >> $UPDATED
echo "$REPO/$pkgbase $VERSION is known in the database, but repo has $version which is newer, so rescheduling... "
echo " UPDATE sources SET version = '$version' WHERE name = '$PKG' AND suite = '$SUITE' AND architecture='$ARCH';"
query_db "UPDATE sources SET version = '$version' WHERE name = '$PKG' AND suite = '$SUITE' AND architecture='$ARCH';"
if [ -z $(echo $PKG | egrep -v "$BLACKLIST") ] ; then
echo "$PKG is blacklisted, so not scheduling it."
else
PKGID=$(query_db "SELECT id FROM sources WHERE name='$PKG' AND suite='$SUITE' AND architecture='$ARCH';")
echo " INSERT INTO schedule (package_id, date_scheduled) VALUES ('$PKGID', '$DATE');"
query_db "INSERT INTO schedule (package_id, date_scheduled) VALUES ('$PKGID', '$DATE');"
fi
elif [ "$VERCMP" = "-1" ] ; then
# our version is higher than what's in the repo because we build trunk
echo "$REPO/$pkgbase $VERSION in db is higher than $version in repo because we build trunk."
......@@ -161,7 +165,6 @@ update_archlinux_repositories() {
local THRESHOLD=450
if [ $(find $BASE/archlinux/ -name pkg.needs_build | wc -l ) -le $THRESHOLD ] ; then
rm -f $OLDER
local BLACKLIST="/($(echo $ARCHLINUX_BLACKLISTED | sed "s# #|#g"))/"
# reschedule
for i in $( ( for REPO in $ARCHLINUX_REPOS ; do
find $BASE/archlinux/$REPO -type d -wholename "$BASE/archlinux/$REPO/*" -printf '%T+ %p\n' | egrep -v "$BLACKLIST"
......
......@@ -239,7 +239,7 @@ write_page_header() {
class=''
fi
uri="/debian/${s}/index_suite_${ARCH}_stats.html"
if [ $comma == 1 ] ; then
if [ $comma = 1 ] ; then
suite_links+=", {\"s\": \"${s}\", \"class\": \"$class\", \"uri\": \"$uri\"}"
else
suite_links+="{\"s\": \"${s}\", \"class\": \"$class\", \"uri\": \"$uri\"}"
......@@ -258,7 +258,7 @@ write_page_header() {
class=''
fi
uri="/debian/$SUITE/index_suite_${a}_stats.html"
if [ $comma == 1 ] ; then
if [ $comma = 1 ] ; then
arch_links+=", {\"a\": \"${a}\", \"class\": \"$class\", \"uri\": \"$uri\"}"
else
arch_links+="{\"a\": \"${a}\", \"class\": \"$class\", \"uri\": \"$uri\"}"
......
......@@ -39,7 +39,7 @@ for ARCH in ${ARCHS} ; do
write_page "<th>pbuilder setup $SUITE</th>"
done
for SUITE in ${SUITES} ; do
if [ "$SUITE" == "experimental" ]; then
if [ "$SUITE" = "experimental" ]; then
continue
fi
write_page "<th>schroot setup $SUITE</th>"
......@@ -119,7 +119,7 @@ for ARCH in ${ARCHS} ; do
done
# diffoscope schroot setup
for SUITE in ${SUITES} ; do
if [ "$SUITE" == "experimental" ]; then
if [ "$SUITE" = "experimental" ]; then
continue
fi
URL="https://jenkins.debian.net/view/reproducible/view/Debian_setup_${ARCH}/job/reproducible_setup_schroot_${SUITE}_diffoscope_${ARCH}_${JENKINS_NODENAME}"
......
......@@ -126,14 +126,14 @@ if [ "$HOSTNAME" = "$MAINNODE" ] ; then
arm64) NODE="codethink-sled${NODE_ALIAS#codethink}-arm64.debian.net" ;;
armhf) NODE="${NODE_ALIAS}-armhf-rb.debian.net" ;;
esac
if [ "$NODE" == "jenkins" ] ; then
if [ "$NODE" = "jenkins" ] ; then
echo 'Skipping jenkins...'
continue
fi
cd $i/builds
LAST=$(ls -rt1 | tail -1)
GOOD=$(basename $(readlink -f lastStableBuild))
if [ "$LAST" == "$GOOD" ] ; then
if [ "$LAST" = "$GOOD" ] ; then
DIFF=0
else
let DIFF=$LAST-$GOOD || DIFF=-1
......