From e93b4028825648bb29074a1422287e2cb435b0de Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 29 Aug 2015 19:55:19 +0200 Subject: try xz instead of bz2 first for compressed files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit xz has pretty much won "the compressor war" and e.g. the Debian archive doesn't even distribute bz2 anymore in favor of 'xz' and 'gz', so by changing the default order we have a more realistic --print-uris behavior as it will always show the first compressor. In practice this effects repositories without a Release file (very bad, we don't want to support them anymore anyhow) as xz will be tried before bz2 now [which is probably not available, but so might be bz2…] AND repositories which provide both, bz2 and xz (which isn't too common) in sofar as apt will now download xz instead of bz2. Users with special needs can stick with bz2 as first compressor tried with Acquire::CompressionTypes::Order:: "bz2"; (see man apt.conf) – but users with special needs usually prefer "gz" anyhow, so the realworld change is expected to be very low. --- test/integration/test-apt-acquire-additional-files | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'test/integration/test-apt-acquire-additional-files') diff --git a/test/integration/test-apt-acquire-additional-files b/test/integration/test-apt-acquire-additional-files index ee7908a2d..6008c0695 100755 --- a/test/integration/test-apt-acquire-additional-files +++ b/test/integration/test-apt-acquire-additional-files @@ -7,7 +7,7 @@ TESTDIR=$(readlink -f $(dirname $0)) setupenvironment configarchitecture 'amd64' -# note that in --print-uri we talk about .bz2 because that is the default. +# note that in --print-uri we talk about .xz because that is the default. # This doesn't mean it is actually attempt to download it. configcompression '.' 'gz' @@ -17,9 +17,9 @@ setupaptarchive --no-update changetowebserver testequal "'http://localhost:8080/dists/unstable/InRelease' localhost:8080_dists_unstable_InRelease 0 -'http://localhost:8080/dists/unstable/main/source/Sources.bz2' localhost:8080_dists_unstable_main_source_Sources 0 -'http://localhost:8080/dists/unstable/main/binary-amd64/Packages.bz2' localhost:8080_dists_unstable_main_binary-amd64_Packages 0 -'http://localhost:8080/dists/unstable/main/i18n/Translation-en.bz2' localhost:8080_dists_unstable_main_i18n_Translation-en 0 " aptget update --print-uris +'http://localhost:8080/dists/unstable/main/source/Sources.xz' localhost:8080_dists_unstable_main_source_Sources 0 +'http://localhost:8080/dists/unstable/main/binary-amd64/Packages.xz' localhost:8080_dists_unstable_main_binary-amd64_Packages 0 +'http://localhost:8080/dists/unstable/main/i18n/Translation-en.xz' localhost:8080_dists_unstable_main_i18n_Translation-en 0 " aptget update --print-uris testsuccessequal "Get:1 http://localhost:8080 unstable InRelease [$(stat -c%s aptarchive/dists/unstable/InRelease) B] Get:2 http://localhost:8080 unstable/main Sources [$(stat -c%s aptarchive/dists/unstable/main/source/Sources.gz) B] @@ -44,10 +44,10 @@ touch ./rootdir/var/lib/apt/lists/localhost:8080_dists_unstable_main_Contents-am testequal "$(readlink -f ./rootdir/var/lib/apt/lists/localhost:8080_dists_unstable_main_Contents-amd64.gz)" aptget indextargets --format '$(FILENAME)' 'Created-By: Contents' testequal "'http://localhost:8080/dists/unstable/InRelease' localhost:8080_dists_unstable_InRelease 0 -'http://localhost:8080/dists/unstable/main/source/Sources.bz2' localhost:8080_dists_unstable_main_source_Sources 0 -'http://localhost:8080/dists/unstable/main/binary-amd64/Packages.bz2' localhost:8080_dists_unstable_main_binary-amd64_Packages 0 -'http://localhost:8080/dists/unstable/main/i18n/Translation-en.bz2' localhost:8080_dists_unstable_main_i18n_Translation-en 0 -'http://localhost:8080/dists/unstable/main/Contents-amd64.bz2' localhost:8080_dists_unstable_main_Contents-amd64 0 " aptget update --print-uris +'http://localhost:8080/dists/unstable/main/source/Sources.xz' localhost:8080_dists_unstable_main_source_Sources 0 +'http://localhost:8080/dists/unstable/main/binary-amd64/Packages.xz' localhost:8080_dists_unstable_main_binary-amd64_Packages 0 +'http://localhost:8080/dists/unstable/main/i18n/Translation-en.xz' localhost:8080_dists_unstable_main_i18n_Translation-en 0 +'http://localhost:8080/dists/unstable/main/Contents-amd64.xz' localhost:8080_dists_unstable_main_Contents-amd64 0 " aptget update --print-uris testsuccessequal "Hit:1 http://localhost:8080 unstable InRelease Get:2 http://localhost:8080 unstable/main amd64 Contents [$(stat -c%s aptarchive/dists/unstable/main/Contents-amd64.gz) B] @@ -85,10 +85,10 @@ EOF # the last line is utter bogus of course, but how should apt know… testequal "'http://localhost:8080/dists/unstable/InRelease' localhost:8080_dists_unstable_InRelease 0 -'http://localhost:8080/dists/unstable/main/source/Sources.bz2' localhost:8080_dists_unstable_main_source_Sources 0 -'http://localhost:8080/dists/unstable/main/binary-amd64/Packages.bz2' localhost:8080_dists_unstable_main_binary-amd64_Packages 0 -'http://localhost:8080/dists/unstable/main/i18n/Translation-en.bz2' localhost:8080_dists_unstable_main_i18n_Translation-en 0 -'http://localhost:8080/dists/unstable/main/Contents-amd64.gz.bz2' localhost:8080_dists_unstable_main_Contents-amd64.gz 0 " aptget update --print-uris +'http://localhost:8080/dists/unstable/main/source/Sources.xz' localhost:8080_dists_unstable_main_source_Sources 0 +'http://localhost:8080/dists/unstable/main/binary-amd64/Packages.xz' localhost:8080_dists_unstable_main_binary-amd64_Packages 0 +'http://localhost:8080/dists/unstable/main/i18n/Translation-en.xz' localhost:8080_dists_unstable_main_i18n_Translation-en 0 +'http://localhost:8080/dists/unstable/main/Contents-amd64.gz.xz' localhost:8080_dists_unstable_main_Contents-amd64.gz 0 " aptget update --print-uris testsuccessequal "Hit:1 http://localhost:8080 unstable InRelease Get:2 http://localhost:8080 unstable/main amd64 Contents.gz [$(stat -c%s aptarchive/dists/unstable/main/Contents-amd64.gz) B] @@ -101,9 +101,9 @@ testsuccess cmp 'rootdir/var/lib/apt/lists/localhost:8080_dists_unstable_main_Co rm -f rootdir/etc/apt/apt.conf.d/content-target.conf testequal "'http://localhost:8080/dists/unstable/InRelease' localhost:8080_dists_unstable_InRelease 0 -'http://localhost:8080/dists/unstable/main/source/Sources.bz2' localhost:8080_dists_unstable_main_source_Sources 0 -'http://localhost:8080/dists/unstable/main/binary-amd64/Packages.bz2' localhost:8080_dists_unstable_main_binary-amd64_Packages 0 -'http://localhost:8080/dists/unstable/main/i18n/Translation-en.bz2' localhost:8080_dists_unstable_main_i18n_Translation-en 0 " aptget update --print-uris +'http://localhost:8080/dists/unstable/main/source/Sources.xz' localhost:8080_dists_unstable_main_source_Sources 0 +'http://localhost:8080/dists/unstable/main/binary-amd64/Packages.xz' localhost:8080_dists_unstable_main_binary-amd64_Packages 0 +'http://localhost:8080/dists/unstable/main/i18n/Translation-en.xz' localhost:8080_dists_unstable_main_i18n_Translation-en 0 " aptget update --print-uris testsuccessequal "Hit:1 http://localhost:8080 unstable InRelease Reading package lists..." aptget update -- cgit v1.2.3