]> git.saurik.com Git - apt.git/commitdiff
do not load filesize in pkgAcqIndexTrans explicitly
authorDavid Kalnischkies <david@kalnischkies.de>
Mon, 13 Oct 2014 08:24:54 +0000 (10:24 +0200)
committerDavid Kalnischkies <david@kalnischkies.de>
Mon, 13 Oct 2014 11:01:52 +0000 (13:01 +0200)
The constructor is calling the baseclass pkgAcqIndex which does this
already – and also does it correctly for compressed files which would
overwise lead to the size of uncompressed files to be expected.

Git-Dch: Ignore

apt-pkg/acquire-item.cc
test/integration/test-bug-596498-trusted-unsigned-repo
test/integration/test-compressed-indexes

index 5ca2d57fa2ade53d6b357391f14f368991fc3856..c63253447f60505f9af82c298c7aad8ae7d31335 100644 (file)
@@ -1486,10 +1486,6 @@ pkgAcqIndexTrans::pkgAcqIndexTrans(pkgAcquire *Owner,
                                    indexRecords *MetaIndexParser)
    : pkgAcqIndex(Owner, TransactionManager, Target, ExpectedHashes, MetaIndexParser)
 {
                                    indexRecords *MetaIndexParser)
    : pkgAcqIndex(Owner, TransactionManager, Target, ExpectedHashes, MetaIndexParser)
 {
-   // load the filesize
-   indexRecords::checkSum *Record = MetaIndexParser->Lookup(string(Target->MetaKey));
-   if(Record)
-      FileSize = Record->Size;
 }
                                                                        /*}}}*/
 // AcqIndexTrans::Custom600Headers - Insert custom request headers     /*{{{*/
 }
                                                                        /*}}}*/
 // AcqIndexTrans::Custom600Headers - Insert custom request headers     /*{{{*/
index 3104a70c25166d81be66f9d9005c04a03d532cea..a08c153f82ebd80fe30617143f772dd87a137d5d 100755 (executable)
@@ -12,7 +12,7 @@ setupaptarchive
 
 aptgetupdate() {
        rm -rf rootdir/var/lib/apt/ rootdir/var/cache/apt/*.bin
 
 aptgetupdate() {
        rm -rf rootdir/var/lib/apt/ rootdir/var/cache/apt/*.bin
-       aptget update -qq --allow-insecure-repositories
+       testsuccess aptget update --allow-insecure-repositories
 }
 
 PKGTEXT="$(aptget install cool --assume-no -d | head -n 7)"
 }
 
 PKGTEXT="$(aptget install cool --assume-no -d | head -n 7)"
index 1beb5d8318f0b31a372fc94fa28f66c17843e8ea..f6707797373d2bd4b432a235893a563f357a9baf 100755 (executable)
@@ -51,6 +51,7 @@ testrun() {
                ! test -e rootdir/var/lib/apt/lists/*_Translation-en.* || F=1
        fi
        if [ -n "$F" ]; then
                ! test -e rootdir/var/lib/apt/lists/*_Translation-en.* || F=1
        fi
        if [ -n "$F" ]; then
+               cat rootdir/tmp/testsuccess.output
                ls -laR rootdir/var/lib/apt/lists/
                msgfail
        else
                ls -laR rootdir/var/lib/apt/lists/
                msgfail
        else
@@ -103,15 +104,15 @@ testovermethod() {
                        INDCOMP='compressed'
                fi
 
                        INDCOMP='compressed'
                fi
 
-               testsuccess aptget update
+               testsuccess aptget update -o Debug::Acquire::http=1
                msgmsg "${1}: ${COMPRESSOR}: Test with $INDCOMP indexes"
                testrun "$INDCOMP"
 
                msgmsg "${1}: ${COMPRESSOR}: Test with $INDCOMP indexes"
                testrun "$INDCOMP"
 
-               testsuccess aptget update -o Acquire::Pdiffs=1
+               testsuccess aptget update -o Acquire::Pdiffs=1 -o Debug::Acquire::http=1
                msgmsg "${1}: ${COMPRESSOR}: Test with $INDCOMP indexes (update unchanged with pdiffs)"
                testrun "$INDCOMP"
 
                msgmsg "${1}: ${COMPRESSOR}: Test with $INDCOMP indexes (update unchanged with pdiffs)"
                testrun "$INDCOMP"
 
-               testsuccess aptget update -o Acquire::Pdiffs=0
+               testsuccess aptget update -o Acquire::Pdiffs=0 -o Debug::Acquire::http=1
                msgmsg "${1}: ${COMPRESSOR}: Test with $INDCOMP indexes (update unchanged without pdiffs)"
                testrun "$INDCOMP"
 
                msgmsg "${1}: ${COMPRESSOR}: Test with $INDCOMP indexes (update unchanged without pdiffs)"
                testrun "$INDCOMP"