Check dependencies with and without backports
authorChristoph Berg <myon@debian.org>
Tue, 19 Jan 2016 23:01:38 +0000 (00:01 +0100)
committerChristoph Berg <myon@debian.org>
Tue, 19 Jan 2016 23:01:38 +0000 (00:01 +0100)
TODO: Actually grab the bpo package list

jenkins/Makefile
jenkins/debcheck-pgapt
jenkins/pgapt-jobs.yaml

index 4fcbb8f13491b1b9814fbb1818c83cbf5b5b3150..3cf38adc9b053e51a8f9118a92eae7ed475be798 100644 (file)
@@ -22,3 +22,8 @@ update-pgdgbuild:
 
 clean:
        rm -rf output output.old
+
+# package lists
+lists: packages.backports
+packages.backports: pgapt-jobs.yaml
+       perl -le 'use YAML::Syck; $$y = LoadFile("pgapt-jobs.yaml"); foreach $$p (@$$y) { print $$p->{project}->{name} if $$p->{project}->{backports} }' > $@
index f8b5c7e872ce04be23808ee8ade435275270e5d4..7cf57f91ceab54ffd092df4d39fa09f79616327c 100755 (executable)
@@ -11,12 +11,13 @@ case $stage in
        *) echo "Bad stage $stage" ; exit 1 ;;
 esac
 
+trap 'rm -f ${TMPPKG:-} ${MAINPKG:-} ${BPOPKG:-}' 0 2 3 15
+
 # include universe on ubuntu
 for FILE in $LISTSDIR/*_dists_${distribution}_universe_binary-${architecture}_Packages ; do
        [ -f "$FILE" ] || continue
        # work around dose-debcheck dying on a Python_ field
        TMPPKG=$(mktemp ${distribution}_universe_binary-${architecture}_Packages.XXXXXX)
-       trap "rm -f $TMPPKG" 0 2 3 15
        sed -e 's/^Python_/Python-/' $FILE > $TMPPKG
        EXTRABG="--bg $TMPPKG"
 done
@@ -32,12 +33,25 @@ esac
 
 DEBCHECK="dose-debcheck -v -f -e ${EXTRABG:-} --bg $LISTSDIR/*_dists_${distribution}_main_binary-${architecture}_Packages"
 
+# packages not depending on backports
+MAINPKG=$(mktemp main_binary-${architecture}_Packages.XXXXXX)
+cat $DISTSDIR/$DIST/main/binary-${architecture}/Packages > $MAINPKG
+for pkg in $(cat packages.backports); do
+  grep-dctrl --not -S $pkg $MAINPKG > $MAINPKG.tmp
+  mv $MAINPKG.tmp $MAINPKG
+done
+
+# packages depending on backports
+BPOPKG=$(mktemp bpo_binary-${architecture}_Packages.XXXXXX)
+for pkg in $(cat packages.backports); do
+  grep-dctrl -S $pkg $DISTSDIR/$DIST/main/binary-${architecture}/Packages >> $BPOPKG
+done
+
 set -x
 
 # run debcheck on main
-$DEBCHECK ${EXTRAFG:-} \
-       --fg $DISTSDIR/$DIST/main/binary-${architecture}/Packages \
-       || EXIT=$?
+$DEBCHECK ${EXTRAFG:-} --fg $MAINPKG || EXIT=$?
+$DEBCHECK ${EXTRAFG:-} --bg $DISTSDIR/$DIST/main/binary-${architecture}/Packages --fg $BPOPKG || : # we need to pull the bpo packages file from somewhere ... || EXIT=$?
 
 # run debcheck on N.N components
 for P in $DISTSDIR/$DIST/?.?/binary-${architecture}/Packages; do
index 9de48d449bbdcf91a9c3b59f8f3504931347c6b4..81641dc8760d21aa3deed929c001f2490cc05c77 100644 (file)
                                 - testing
 
         builders:
-                - shell: 'debcheck-pgapt'
+                - shell: |
+                    make lists
+                    debcheck-pgapt
         #publishers:
         #        - ircbot: *only_configs