]> git.saurik.com Git - apt.git/blobdiff - test/integration/test-compressed-indexes
deprecate confusing Pkg.CandVersion() method
[apt.git] / test / integration / test-compressed-indexes
index b97e1244bca13fd9ed85d0f74b2d0443d25309ee..7ddf2e2e2904972183befaa9c369f13df615695a 100755 (executable)
@@ -7,6 +7,7 @@ TESTDIR="$(readlink -f "$(dirname "$0")")"
 setupenvironment
 configcompression '.' $(aptconfig dump APT::Compressor --format '%t %v%n' | sed -n 's#^Extension \.\(.*\)$#\1#p')
 configarchitecture 'i386'
+LOWCOSTEXT='lz4'
 
 buildsimplenativepackage 'testpkg' 'i386' '1.0'
 
@@ -32,13 +33,11 @@ testrun() {
        msgtest 'Check if all index files are' "${1:-uncompressed}"
        if [ "$1" = 'compressed' ]; then
                ! test -e rootdir/var/lib/apt/lists/*i386_Packages || F=1
-               ! test -e rootdir/var/lib/apt/lists/*all_Packages || F=1
                ! test -e rootdir/var/lib/apt/lists/*_Sources || F=1
                ! test -e rootdir/var/lib/apt/lists/*_Translation-en || F=1
-               test -e rootdir/var/lib/apt/lists/*i386_Packages.${COMPRESS} || F=1
-               test -e rootdir/var/lib/apt/lists/*all_Packages.${COMPRESS} || F=1
-               test -e rootdir/var/lib/apt/lists/*_Sources.${COMPRESS} || F=1
-               test -e rootdir/var/lib/apt/lists/*_Translation-en.${COMPRESS} || F=1
+               test -e rootdir/var/lib/apt/lists/*i386_Packages.$LOWCOSTEXT || F=1
+               test -e rootdir/var/lib/apt/lists/*_Sources.$LOWCOSTEXT || F=1
+               test -e rootdir/var/lib/apt/lists/*_Translation-en.$LOWCOSTEXT || F=1
                # there is no point in trying pdiff if we have compressed indexes
                # as we can't patch compressed files (well, we can, but what is the point?)
                ! test -e rootdir/var/lib/apt/lists/*diff_Index || F=1
@@ -46,11 +45,9 @@ testrun() {
                # clear the faked pdiff indexes so the glob below works
                rm -f rootdir/var/lib/apt/lists/*diff_Index
                test -e rootdir/var/lib/apt/lists/*i386_Packages || F=1
-               test -e rootdir/var/lib/apt/lists/*all_Packages || F=1
                test -e rootdir/var/lib/apt/lists/*_Sources || F=1
                test -e rootdir/var/lib/apt/lists/*_Translation-en || F=1
                ! test -e rootdir/var/lib/apt/lists/*i386_Packages.* || F=1
-               ! test -e rootdir/var/lib/apt/lists/*all_Packages.* || F=1
                ! test -e rootdir/var/lib/apt/lists/*_Sources.* || F=1
                ! test -e rootdir/var/lib/apt/lists/*_Translation-en.* || F=1
        fi
@@ -111,6 +108,7 @@ testovermethod() {
                        INDCOMP='uncompressed'
                else
                        INDCOMP='compressed'
+                       echo 'APT::Compressor::lz4::Name "lz4";' >> rootdir/etc/apt/apt.conf.d/02compressindex
                fi
 
                msgmsg "${1}: ${COMPRESSOR}: Test with $INDCOMP indexes gzip=$INDEX"