set -u . "$TESTSDIR"/test.inc mkdir -p conf cat > conf/distributions < conf/options < conf/distributions < conf/distributions < conf/distributions < conf/distributions < conf/distributions < results cat > results.expected < %l" | LC_ALL=C sort -f > results cat > results.expected < dog/Contents-abacus.gz END sed -e "s/^Contents: compatsymlink/Contents: allcomponents/" -i conf/distributions dodiff results.expected results testrun - -b . processincoming default 3< conf/incoming < conf/incoming < conf/incoming < conf/incoming < conf/incoming < conf/incoming < results dodiff /dev/null results find i -type f > results dodiff /dev/null results cat > results.expected < results dodiff results.expected results cat > results.expected < results dodiff results.expected results cat > results.expected < results dodiff results.expected results printindexpart pool/dog/b/bird/bird_1_abacus.deb > results.expected printindexpart pool/dog/b/bird/bird-addons_1_all.deb >> results.expected dodiff results.expected dists/B/dog/binary-abacus/Packages withoutchecksums pool/dog/b/bird/bird_1.dsc | sed -e 's/ \+$//' > results.expected ed -s results.expected < results dodiff results.expected results echo "DebOverride: debo" >> conf/distributions echo "DscOverride: dsco" >> conf/distributions echo "bird Section cat/tasty" > conf/debo echo "bird Priority hungry" >> conf/debo echo "bird Task lunch" >> conf/debo echo "bird-addons Section cat/ugly" >> conf/debo echo "bird Section cat/nest" > conf/dsco echo "bird Priority hurry" >> conf/dsco echo "bird Homepage gopher://tree" >> conf/dsco mv i2/* i/ rmdir i2 testrun - -b . processincoming default 3< results dodiff /dev/null results find i -type f > results dodiff /dev/null results cat > results.expected < results dodiff results.expected results cat > results.expected < results dodiff results.expected results cat > results.expected < results dodiff results.expected results printindexpart pool/cat/b/bird/bird_1_abacus.deb > results.expected printindexpart pool/cat/b/bird/bird-addons_1_all.deb >> results.expected ed -s results.expected < results.expected ed -s results.expected < results dodiff results.expected results # now missing: checking what all can go wrong in a .changes or .dsc file... mkdir pkg mkdir pkg/a touch pkg/a/b mkdir pkg/DEBIAN cat > pkg/DEBIAN/control < i/test.changes < i/test.changes testrun - -b . processincoming default 3< i/test.changes < i/test.changes < i/test.changes < i/test.changes < i/test.changes < i/test.changes < i/test.changes testrun - -b . processincoming default 3<> i/test.changes testrun - -b . processincoming default 3<> i/test.changes testrun - -b . processincoming default 3<> i/test.changes testrun - -b . processincoming default 3<> i/test.changes testrun - -b . processincoming default 3<> i/test.changes testrun - -b . processincoming default 3<> i/test.changes testrun - -b . processincoming default 3<> i/test.changes touch "$(printf 'i/\300\257.\300\257_v_funny.deb')" testrun - -b . processincoming default 3<> i/test.changes mv "$(printf 'i/\300\257.\300\257_v_funny.deb')" "$(printf 'i/\300\257.\300\257_v_all.deb')" testrun - -b . processincoming default 3<> i/test.changes testrun - -b . processincoming default 3<> i/test.changes # TODO: this error message has to be improved: testrun - -b . processincoming default 3<> i/test.changes testrun - -b . processincoming default 3<> i/test.changes # TODO: these will hopefully change to not divulge the place of the temp dir some day... testrun - -b . processincoming default 3<" >> pkg/DEBIAN/control dpkg-deb -b pkg i/debfilename_debfileversion~2_all.deb DEBMD5S="$(md5sum i/debfilename_debfileversion~2_all.deb | cut -d' ' -f1) $(stat -c '%s' i/debfilename_debfileversion~2_all.deb)" printf '$d\nw\nq\n' | ed -s i/test.changes echo " $DEBMD5S - - debfilename_debfileversion~2_all.deb" >> i/test.changes testrun - -b . processincoming default 3<> pkg/DEBIAN/control echo " a package to test reprepro" >> pkg/DEBIAN/control dpkg-deb -b pkg i/debfilename_debfileversion~2_all.deb DEBMD5S="$(md5sum i/debfilename_debfileversion~2_all.deb | cut -d' ' -f1) $(stat -c '%s' i/debfilename_debfileversion~2_all.deb)" printf '$d\nw\nq\n' | ed -s i/test.changes echo " $DEBMD5S - - debfilename_debfileversion~2_all.deb" >> i/test.changes testrun - -b . processincoming default 3<> pkg/DEBIAN/control dpkg-deb -b pkg i/debfilename_debfileversion~2_all.deb DEBMD5S="$(md5sum i/debfilename_debfileversion~2_all.deb | cut -d' ' -f1) $(stat -c '%s' i/debfilename_debfileversion~2_all.deb)" printf '$d\nw\nq\n' | ed -s i/test.changes echo " $DEBMD5S - - debfilename_debfileversion~2_all.deb" >> i/test.changes testrun - -b . processincoming default 3<> i/test.changes testrun - -b . processincoming default 3<> i/test.changes testrun - -b . processincoming default 3<> pkg/DEBIAN/control dpkg-deb -b pkg i/indebname_debfileversion~2_all.deb DEBMD5S="$(md5sum i/indebname_debfileversion~2_all.deb | cut -d' ' -f1) $(stat -c '%s' i/indebname_debfileversion~2_all.deb)" printf '$d\nw\nq\n' | ed -s i/test.changes echo " $DEBMD5S - - indebname_debfileversion~2_all.deb" >> i/test.changes testrun - -b . processincoming default 3<> i/test.changes testrun - -b . processincoming default 3<> pkg/DEBIAN/control dpkg-deb -b pkg i/indebname_debfileversion~2_all.deb DEBMD5S="$(md5sum i/indebname_debfileversion~2_all.deb | cut -d' ' -f1) $(stat -c '%s' i/indebname_debfileversion~2_all.deb)" printf '$d\nw\nq\n' | ed -s i/test.changes echo " $DEBMD5S test - indebname_debfileversion~2_all.deb" >> i/test.changes testrun - -b . processincoming default 3<> i/test.changes checknolog logfile testrun - -b . processincoming default 3< results echo "pool/dog/s/sourceindeb/indebname_0versionindeb~1_all.deb" > results.expected dodiff results.expected results touch i/dscfilename_fileversion~.dsc DSCMD5S="$(md5sum i/dscfilename_fileversion~.dsc | cut -d' ' -f1) $(stat -c '%s' i/dscfilename_fileversion~.dsc)" cat > i/test.changes <> i/test.changes testrun - -b . processincoming default 3< i/dscfilename_fileversion~.dsc DSCMD5S="$(md5sum i/dscfilename_fileversion~.dsc | cut -d' ' -f1) $(stat -c '%s' i/dscfilename_fileversion~.dsc)" printf '$d\nw\nq\n' | ed -s i/test.changes echo " $DSCMD5S - - dscfilename_fileversion~.dsc" >> i/test.changes testrun - -b . processincoming default 3< i/dscfilename_fileversion~.dsc DSCMD5S="$(md5sum i/dscfilename_fileversion~.dsc | cut -d' ' -f1) $(stat -c '%s' i/dscfilename_fileversion~.dsc)" printf '$d\nw\nq\n' | ed -s i/test.changes echo " $DSCMD5S - - dscfilename_fileversion~.dsc" >> i/test.changes testrun - -b . processincoming default 3<> i/dscfilename_fileversion~.dsc DSCMD5S="$(md5sum i/dscfilename_fileversion~.dsc | cut -d' ' -f1) $(stat -c '%s' i/dscfilename_fileversion~.dsc)" printf '$d\nw\nq\n' | ed -s i/test.changes echo " $DSCMD5S - - dscfilename_fileversion~.dsc" >> i/test.changes testrun - -b . processincoming default 3<" >> i/dscfilename_fileversion~.dsc DSCMD5S="$(md5sum i/dscfilename_fileversion~.dsc | cut -d' ' -f1) $(stat -c '%s' i/dscfilename_fileversion~.dsc)" printf '$d\nw\nq\n' | ed -s i/test.changes echo " $DSCMD5S - - dscfilename_fileversion~.dsc" >> i/test.changes testrun - -b . processincoming default 3<> i/dscfilename_fileversion~.dsc DSCMD5S="$(md5sum i/dscfilename_fileversion~.dsc | cut -d' ' -f1) $(stat -c '%s' i/dscfilename_fileversion~.dsc)" printf '$d\nw\nq\n' | ed -s i/test.changes echo " $DSCMD5S - - dscfilename_fileversion~.dsc" >> i/test.changes testrun - -b . processincoming default 3<> i/dscfilename_fileversion~.dsc DSCMD5S="$(md5sum i/dscfilename_fileversion~.dsc | cut -d' ' -f1) $(stat -c '%s' i/dscfilename_fileversion~.dsc)" printf '$d\nw\nq\n' | ed -s i/test.changes echo " $DSCMD5S - - dscfilename_fileversion~.dsc" >> i/test.changes testrun - -b . processincoming default 3<> i/dscfilename_fileversion~.dsc DSCMD5S="$(md5sum i/dscfilename_fileversion~.dsc | cut -d' ' -f1) $(stat -c '%s' i/dscfilename_fileversion~.dsc)" printf '$d\nw\nq\n' | ed -s i/test.changes echo " $DSCMD5S - - dscfilename_fileversion~.dsc" >> i/test.changes testrun - -b . processincoming default 3<> i/test.changes testrun - -b . processincoming default 3<> i/test.changes testrun - -b . processincoming default 3<> i/test.changes testrun - -b . processincoming default 3<> i/test.changes checknolog logfile testrun - -b . processincoming default 3<i/strangefile <i/dscfilename_fileversion~.dsc < Standards-Version: 0 Version: 1:newversion~ Files: md5sumindsc sizeindsc strangefile EOF DSCMD5S="$(md5sum i/dscfilename_fileversion~.dsc | cut -d' ' -f1) $(stat -c '%s' i/dscfilename_fileversion~.dsc)" cat >i/test.changes <> i/test.changes # this is a stupid error message, needs to get some context testrun - -b . processincoming default 3<> i/test.changes testrun - -b . processincoming default 3<> i/test.changes testrun - -b . processincoming default 3<> i/test.changes testrun - -b . processincoming default 3<> i/test.changes testrun - -b . processincoming default 3<> i/dscfilename_fileversion~.dsc DSCMD5S="$(mdandsize i/dscfilename_fileversion~.dsc)" DSCSHA1S="$(sha1andsize i/dscfilename_fileversion~.dsc)" DSCSHA2S="$(sha2andsize i/dscfilename_fileversion~.dsc)" DSCFILENAMEMD5S="$DSCMD5S" DSCFILENAMESHA1S="$DSCSHA1S" DSCFILENAMESHA2S="$DSCSHA2S" printf '$-1,$d\nw\nq\n' | ed -s i/test.changes echo " $DSCMD5S dummy unneeded dscfilename_fileversion~.dsc" >> i/test.changes echo " 33a1096ff883d52f0c1f39e652d6336f 33 - - strangefile_xyz" >> i/test.changes testrun - -b . processincoming default 3< results cat > results.expected < results cat > results.expected < results withoutchecksums pool/dog/b/bird/bird_1.dsc | sed -e 's/ \+$//' >bird.preprocessed ed -s bird.preprocessed < results.expected < Standards-Version: 0 Version: 0versionindsc Priority: can't-live-without Section: dummy Directory: pool/dog/d/dscfilename Files: $OLDDSCFILENAMEMD5S dscfilename_0versionindsc.dsc Checksums-Sha1: $OLDDSCFILENAMESHA1S dscfilename_0versionindsc.dsc Checksums-Sha256: $OLDDSCFILENAMESHA2S dscfilename_0versionindsc.dsc EOF dodiff results.expected results testout "" -b . dumpunreferenced dodiff /dev/null results printf '$d\nw\nq\n' | ed -s i/test.changes echo " 31a1096ff883d52f0c1f39e652d6336f 33 - - strangefile_xyz" >> i/test.changes checknolog logfile testrun - -b . processincoming default 3< results cat > results.expected < results cat > results.expected < results cat bird.preprocessed - > results.expected < Standards-Version: 0 Version: 1:newversion~ Priority: unneeded Section: dummy Directory: pool/dog/d/dscfilename Files: $DSCFILENAMEMD5S dscfilename_newversion~.dsc 31a1096ff883d52f0c1f39e652d6336f 33 strangefile_xyz Checksums-Sha1: $DSCFILENAMESHA1S dscfilename_newversion~.dsc 4453da6ca46859b207c5b55af6213ff8369cd383 33 strangefile_xyz Checksums-Sha256: $DSCFILENAMESHA2S dscfilename_newversion~.dsc c40fcf711220c0ce210159d43b22f1f59274819bf3575e11cc0057ed1988a575 33 strangefile_xyz EOF dodiff results.expected results testout "" -b . dumpunreferenced dodiff /dev/null results REPREPRO_OUT_DIR=. "$SRCDIR"/docs/outstore.py --check rm -r conf db pool dists i pkg logs temp rm results.expected results.log.expected results bird.preprocessed testsuccess