set -u . "$TESTSDIR"/test.inc dodo test ! -d db mkdir -p conf dists echo "export never" > conf/options cat > conf/distributions < conf/updates < conf/updates < conf/updates < conf/distributions < conf/updates < conf/updates < conf/distributions < conf/updates < conf/updates < testsource/dists/codename1/InRelease < testsource/dists/codename2/InRelease < testsource/dists/codename1/InRelease < testsource/dists/codename2/InRelease <> testsource/dists/codename2/InRelease < results.expected if [ $verbosity -ge 0 ] ; then echo "Calculating packages to get..." > results.expected ; fi if [ $verbosity -ge 3 ] ; then echo " processing updates for 'codename2|bb|yyyyyyyyyy'" >>results.expected ; fi if [ $verbosity -ge 5 ] ; then echo " reading './lists/base_codename2_bb_yyyyyyyyyy_Packages'" >>results.expected echo " marking everything to be deleted" >>results.expected echo " reading './lists/base_codename1_bb_yyyyyyyyyy_Packages'" >>results.expected ; fi if [ $verbosity -ge 3 ] ; then echo " processing updates for 'codename2|bb|x'" >>results.expected ; fi if [ $verbosity -ge 5 ] ; then echo " reading './lists/base_codename2_bb_x_Packages'" >>results.expected echo " marking everything to be deleted" >>results.expected echo " reading './lists/base_codename1_bb_x_Packages'" >>results.expected ; fi if [ $verbosity -ge 3 ] ; then echo " processing updates for 'codename2|a|yyyyyyyyyy'" >>results.expected ; fi if [ $verbosity -ge 5 ] ; then echo " reading './lists/base_codename2_a_yyyyyyyyyy_Packages'" >>results.expected echo " marking everything to be deleted" >>results.expected echo " reading './lists/base_codename1_a_yyyyyyyyyy_Packages'" >>results.expected ; fi if [ $verbosity -ge 3 ] ; then echo " processing updates for 'codename2|a|x'" >>results.expected ; fi if [ $verbosity -ge 5 ] ; then echo " reading './lists/base_codename2_a_x_Packages'" >>results.expected echo " marking everything to be deleted" >>results.expected echo " reading './lists/base_codename1_a_x_Packages'" >>results.expected ; fi dodiff results.expected results mv results.expected results2.expected testout - -b . update codename1 3< results.expected if [ $verbosity -ge 0 ] ; then echo "Calculating packages to get..." > results.expected ; fi if [ $verbosity -ge 3 ] ; then echo " processing updates for 'codename1|bb|source'" >>results.expected ; fi if [ $verbosity -ge 5 ] ; then echo " reading './lists/base_codename1_bb_Sources'" >>results.expected echo " reading './lists/base_codename2_bb_Sources'" >>results.expected echo " marking everything to be deleted" >>results.expected echo " reading './lists/base_codename2_bb_Sources'" >>results.expected echo " reading './lists/base_codename1_bb_Sources'" >>results.expected fi if [ $verbosity -ge 3 ] ; then echo " processing updates for 'codename1|bb|yyyyyyyyyy'" >>results.expected ; fi if [ $verbosity -ge 5 ] ; then echo " reading './lists/base_codename1_bb_yyyyyyyyyy_Packages'" >>results.expected echo " reading './lists/base_codename2_bb_yyyyyyyyyy_Packages'" >>results.expected echo " marking everything to be deleted" >>results.expected echo " reading './lists/base_codename2_bb_yyyyyyyyyy_Packages'" >>results.expected echo " reading './lists/base_codename1_bb_yyyyyyyyyy_Packages'" >>results.expected fi if [ $verbosity -ge 3 ] ; then echo " processing updates for 'codename1|bb|x'" >>results.expected ; fi if [ $verbosity -ge 5 ] ; then echo " reading './lists/base_codename1_bb_x_Packages'" >>results.expected echo " reading './lists/base_codename2_bb_x_Packages'" >>results.expected echo " marking everything to be deleted" >>results.expected echo " reading './lists/base_codename2_bb_x_Packages'" >>results.expected echo " reading './lists/base_codename1_bb_x_Packages'" >>results.expected fi if [ $verbosity -ge 3 ] ; then echo " processing updates for 'codename1|a|source'" >>results.expected ; fi if [ $verbosity -ge 5 ] ; then echo " reading './lists/base_codename1_a_Sources'" >>results.expected echo " reading './lists/base_codename2_a_Sources'" >>results.expected echo " marking everything to be deleted" >>results.expected echo " reading './lists/base_codename2_a_Sources'" >>results.expected echo " reading './lists/base_codename1_a_Sources'" >>results.expected fi if [ $verbosity -ge 3 ] ; then echo " processing updates for 'u|codename1|a|yyyyyyyyyy'" >>results.expected ; fi if [ $verbosity -ge 5 ] ; then echo " reading './lists/base_codename1_a_yyyyyyyyyy_uPackages'" >>results.expected echo " reading './lists/base_codename2_a_yyyyyyyyyy_uPackages'" >>results.expected echo " marking everything to be deleted" >>results.expected echo " reading './lists/base_codename2_a_yyyyyyyyyy_uPackages'" >>results.expected echo " reading './lists/base_codename1_a_yyyyyyyyyy_uPackages'" >>results.expected fi if [ $verbosity -ge 3 ] ; then echo " processing updates for 'codename1|a|yyyyyyyyyy'" >>results.expected ; fi if [ $verbosity -ge 5 ] ; then echo " reading './lists/base_codename1_a_yyyyyyyyyy_Packages'" >>results.expected echo " reading './lists/base_codename2_a_yyyyyyyyyy_Packages'" >>results.expected echo " marking everything to be deleted" >>results.expected echo " reading './lists/base_codename2_a_yyyyyyyyyy_Packages'" >>results.expected echo " reading './lists/base_codename1_a_yyyyyyyyyy_Packages'" >>results.expected fi if [ $verbosity -ge 3 ] ; then echo " processing updates for 'u|codename1|a|x'" >>results.expected ; fi if [ $verbosity -ge 5 ] ; then echo " reading './lists/base_codename1_a_x_uPackages'" >>results.expected echo " reading './lists/base_codename2_a_x_uPackages'" >>results.expected echo " marking everything to be deleted" >>results.expected echo " reading './lists/base_codename2_a_x_uPackages'" >>results.expected echo " reading './lists/base_codename1_a_x_uPackages'" >>results.expected fi if [ $verbosity -ge 3 ] ; then echo " processing updates for 'codename1|a|x'" >>results.expected ; fi if [ $verbosity -ge 5 ] ; then echo " reading './lists/base_codename1_a_x_Packages'" >>results.expected echo " reading './lists/base_codename2_a_x_Packages'" >>results.expected echo " marking everything to be deleted" >>results.expected echo " reading './lists/base_codename2_a_x_Packages'" >>results.expected echo " reading './lists/base_codename1_a_x_Packages'" >>results.expected fi dodiff results.expected results testrun - -b . update codename2 codename1 3< resultsboth.expected || true grep '^ ' results2.expected >> resultsboth.expected || true grep '^ ' results.expected >> resultsboth.expected || true grep '^[^ C]' results.expected >> resultsboth.expected || true dodiff resultsboth.expected results sed -i -e "s/Method: file:/Method: copy:/" conf/updates dodo rm lists/_codename* testout - -b . update codename1 3<