set -u . "$TESTSDIR"/test.inc mkdir test-1 mkdir test-1/debian cat >test-1/debian/control < Standards-Version: 0.0 Package: sibling Architecture: any Description: bla blub Package: siblingtoo Architecture: any Description: bla blub Package: mytest Architecture: all Description: bla blub END cat >test-1/debian/changelog < Mon, 01 Jan 1980 01:02:02 +0000 END mkdir -p test-1/debian/tmp/DEBIAN touch test-1/debian/tmp/best-file-in-the-root cd test-1 DEB_HOST_ARCH="another" dpkg-gencontrol -psibling -v2 DEB_HOST_ARCH="another" dpkg --build debian/tmp .. DEB_HOST_ARCH="another" dpkg-gencontrol -psiblingtoo -v3 DEB_HOST_ARCH="another" dpkg --build debian/tmp .. DEB_HOST_ARCH="another" dpkg-gencontrol -pmytest -v2 DEB_HOST_ARCH="another" dpkg --build debian/tmp .. DEB_HOST_ARCH="another" dpkg-genchanges -b > ../test-1.changes DEB_HOST_ARCH="somemore" dpkg-gencontrol -psiblingtoo -v3 DEB_HOST_ARCH="somemore" dpkg --build debian/tmp .. cd .. rm -r test-1 mkdir test-2 mkdir test-2/debian cat >test-2/debian/control < Standards-Version: 0.0 Package: sibling Architecture: any Description: bla blub Package: siblingalso Architecture: any Description: bla blub Package: mytest Architecture: all Description: bla blub END cat >test-2/debian/changelog < Mon, 01 Jan 1980 01:02:02 +0000 test (1-1) test; urgency=critical * new upstream release (Closes: #allofthem) -- me Mon, 01 Jan 1980 01:02:02 +0000 END mkdir -p test-2/debian/tmp/DEBIAN touch test-2/debian/tmp/best-file-in-the-root cd test-2 dpkg-gencontrol -psiblingalso -v3.1 dpkg --build debian/tmp .. dpkg-gencontrol -pmytest -v2.4 dpkg --build debian/tmp .. dpkg-gencontrol -psibling -v2.2 dpkg --build debian/tmp .. dpkg-genchanges -b > ../test-2.changes rm debian/files DEB_HOST_ARCH="another" dpkg-gencontrol -psibling -v2.2 DEB_HOST_ARCH="another" dpkg --build debian/tmp .. dpkg-genchanges -b > ../test-2a.changes cd .. rm -r test-2 for tracking in false true ; do mkdir conf cat > conf/distributions <> conf/distributions if test x"${REPREPROOPTIONS#*--verbosedb}" != x"$REPREPROOPTIONS" ; then TRACKINGTESTOPTIONS="-D t=1" else TRACKINGTESTOPTIONS="-D t=0" fi else TRACKINGTESTOPTIONS="-D t=0" fi cat >> conf/distributions <> conf/distributions testrun - -b . retrack test 3< results.expected < results.expected < conf/incoming << EOF Name: myrule Allow: test>two Options: limit_arch_all IncomingDir: i TempDir: tmp EOF ls *.changes mkdir i tmp cp test-1.changes sibling_2_another.deb siblingtoo_3_another.deb mytest_2_all.deb i/ testrun - -b . processincoming myrule 3< results.expected < results.expected < results.expected < results.expected <