set -u . "$TESTSDIR"/test.inc # testing with Sources, as they are easier to generate... if ! test -e "$RREDTOOL" ; then echo "SKIPPED: rredtool not found, '$RREDTOOL' tried." exit 0 fi mkdir conf cat > conf/distributions < test_1.tar.gz cat > test_1.dsc < X-Data: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa X-Data: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa X-Data: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa X-Data: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa X-Data: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa X-Data: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa X-Data: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa X-Data: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa X-Data: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa X-Data: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa X-Data: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa X-Data: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa X-Data: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa X-Data: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa X-Data: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa X-Data: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa X-Data: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa X-Data: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa X-Data: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa X-Data: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa X-Data: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa X-Data: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa X-Data: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa X-Data: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa X-Data: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa Files: $(mdandsize test_1.tar.gz) test_1.tar.gz EOF echo "Dummy file" > pre_1.tar.gz cat > pre_1.dsc < Section: pre Priority: extra Files: $(mdandsize pre_1.tar.gz) pre_1.tar.gz EOF echo "New file" > pre_2.tar.gz cat > pre_2.dsc < Section: pre Priority: extra Files: $(mdandsize pre_2.tar.gz) pre_2.tar.gz EOF echo "Even newer" > pre_3.tar.gz cat > pre_3.dsc < Section: pre Priority: extra Files: $(mdandsize pre_3.tar.gz) pre_3.tar.gz EOF mkdir old testrun - includedsc test test_1.dsc 3< patches cat > results.expected <> results.expected <> results.expected <> results.expected <> results.expected < results.expected << EOF 1c Package: pre Format: 1.0 Binary: pre Architecture: all Version: 3 Maintainer: Guess Who Priority: extra Section: pre Directory: pool/main/p/pre Files: $(mdandsize pre_3.dsc) pre_3.dsc $(mdandsize pre_3.tar.gz) pre_3.tar.gz Checksums-Sha1: $(sha1andsize pre_3.dsc) pre_3.dsc $(sha1andsize pre_3.tar.gz) pre_3.tar.gz Checksums-Sha256: $(sha2andsize pre_3.dsc) pre_3.dsc $(sha2andsize pre_3.tar.gz) pre_3.tar.gz Package: test . EOF dodiff results.expected 1.diff rm 1.diff cat > results.expected << EOF 17,18c $(sha2andsize pre_3.dsc) pre_3.dsc $(sha2andsize pre_3.tar.gz) pre_3.tar.gz . 14,15c $(sha1andsize pre_3.dsc) pre_3.dsc $(sha1andsize pre_3.tar.gz) pre_3.tar.gz . 11,12c $(mdandsize pre_3.dsc) pre_3.dsc $(mdandsize pre_3.tar.gz) pre_3.tar.gz . 5c Version: 3 . EOF dodiff results.expected 2.diff rm 2.diff dodiff results.expected 3.diff rm 3.diff cat > results.expected << EOF 1c Package: pre . EOF dodiff results.expected 4.diff rm 4.diff rm -r old db pool conf dists pre_*.dsc pre_*.tar.gz test_1.dsc test_1.tar.gz results.expected patches testsuccess