set -u . "$TESTSDIR"/test.inc dodo test ! -d db mkdir -p conf cat > conf/distributions < conf/updates < conf/filterlist echo > conf/filtersrclist testrun - -b . export 1234 3< in/dists/4321/Release testrun - -b . update 1234 3< in/dists/4321/component/source/Sources.xz xz -c < /dev/null > in/dists/4321/component/binary-something/Packages.xz cat > in/dists/4321/Release < build/test-1/src/sourcefile srcorigname=test_1.orig.tar.xz tar -cJf build/${srcorigname} -C build test-1 srcorigsha=$(sha2andsize build/${srcorigname}) mkdir -p build/test-1/debian cat > build/test-1/debian/control < Package: name Architecture: all EOF touch build/test-1/debian/changelog srcdebname=test_1-1.debian.tar.xz tar -cJf build/${srcdebname} -C build/test-1 debian srcdebsha=$(sha2andsize build/${srcdebname}) srcdscname=test_1-1.dsc cat > build/${srcdscname} < build/name/opt/trash mkdir -p build/name/DEBIAN cat > build/name/DEBIAN/control < Description: some description EOF bindebname=name_17-2_all.deb dpkg-deb -Z xz -b build/name build/${bindebname} bindebsha=$(sha2only build/${bindebname}) bindebsize=$(sizeonly build/${bindebname}) rm in/dists/4321/component/binary-something/Packages.xz cat > in/dists/4321/component/binary-something/Packages < Architecture: all Size: ${bindebsize} SHA256: ${bindebsha} Filename: ../build/${bindebname} Description: some description EOF packagessha=$(sha2andsize in/dists/4321/component/binary-something/Packages) xz in/dists/4321/component/binary-something/Packages packagesxzsha=$(sha2andsize in/dists/4321/component/binary-something/Packages.xz) rm in/dists/4321/component/source/Sources.xz cat > in/dists/4321/component/source/Sources < Directory: ../build Checksums-Sha256: ${srcdscsha} ${srcdscname} ${srcdebsha} ${srcdebname} ${srcorigsha} ${srcorigname} EOF sourcessha=$(sha2andsize in/dists/4321/component/source/Sources) xz in/dists/4321/component/source/Sources sourcesxzsha=$(sha2andsize in/dists/4321/component/source/Sources.xz) cat > in/dists/4321/Release < conf/filtersrclist testrun - -b . update 1234 3< conf/filterlist testrun - -b . update 1234 3<> conf/distributions < conf/pulls < conf/filterlist echo > conf/filtersrclist testrun - -b . export dest 3< conf/filtersrclist testrun - -b . pull dest 3< conf/filterlist testrun - -b . pull dest 3< build/test-1/debian/control < Package: name Architecture: all EOF echo "2" > build/test-1/debian/changelog src2debname=test_1-2.debian.tar.xz tar -cJf build/${src2debname} -C build/test-1 debian src2debsha=$(sha2andsize build/${src2debname}) src2dscname=test_1-2.dsc cat > build/${src2dscname} < EOF src2dscsha=$(sha2andsize build/${src2dscname}) mkdir -p build/name/opt/ echo trash > build/name/opt/trash mkdir -p build/name/DEBIAN cat > build/name/DEBIAN/control < Description: some description EOF bin2debname=name_17-3_all.deb dpkg-deb -Z xz -b build/name build/${bin2debname} bin2debsha=$(sha2only build/${bin2debname}) bin2debsize=$(sizeonly build/${bin2debname}) mkdir -p in/dists/4321/component/binary-something in/dists/4321/component/source cat > in/dists/4321/component/binary-something/Packages < Architecture: all Size: ${bin2debsize} SHA256: ${bin2debsha} Filename: ../build/${bin2debname} Description: some description EOF packagessha=$(sha2andsize in/dists/4321/component/binary-something/Packages) xz in/dists/4321/component/binary-something/Packages packagesxzsha=$(sha2andsize in/dists/4321/component/binary-something/Packages.xz) cat > in/dists/4321/component/source/Sources < Directory: ../build Checksums-Sha256: ${src2dscsha} ${src2dscname} ${src2debsha} ${src2debname} ${srcorigsha} ${srcorigname} EOF sourcessha=$(sha2andsize in/dists/4321/component/source/Sources) xz in/dists/4321/component/source/Sources sourcesxzsha=$(sha2andsize in/dists/4321/component/source/Sources.xz) cat > in/dists/4321/Release < conf/filtersrclist echo "name warning" > conf/filterlist dodo mkdir lists testrun - -b . update 1234 3< conf/filtersrclist testrun - -b . --noskipold update 1234 3< conf/filtersrclist echo "name warning" > conf/filterlist testrun - -b . pull dest 3< conf/filtersrclist testrun - -b . pull dest 3<