summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2014-10-13 10:24:54 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2014-10-13 13:01:52 +0200
commit78bc8d6b16c898c30ab046519d758ee9c1c6f42b (patch)
tree6f388075595c113255eb459916ca64e70c73875d
parent9d653a6de2ca952247cc4e628256259d225570a6 (diff)
do not load filesize in pkgAcqIndexTrans explicitly
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
-rw-r--r--apt-pkg/acquire-item.cc4
-rwxr-xr-xtest/integration/test-bug-596498-trusted-unsigned-repo2
-rwxr-xr-xtest/integration/test-compressed-indexes7
3 files changed, 5 insertions, 8 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc
index 5ca2d57fa..c63253447 100644
--- a/apt-pkg/acquire-item.cc
+++ b/apt-pkg/acquire-item.cc
@@ -1486,10 +1486,6 @@ pkgAcqIndexTrans::pkgAcqIndexTrans(pkgAcquire *Owner,
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 /*{{{*/
diff --git a/test/integration/test-bug-596498-trusted-unsigned-repo b/test/integration/test-bug-596498-trusted-unsigned-repo
index 3104a70c2..a08c153f8 100755
--- a/test/integration/test-bug-596498-trusted-unsigned-repo
+++ b/test/integration/test-bug-596498-trusted-unsigned-repo
@@ -12,7 +12,7 @@ setupaptarchive
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)"
diff --git a/test/integration/test-compressed-indexes b/test/integration/test-compressed-indexes
index 1beb5d831..f67077973 100755
--- a/test/integration/test-compressed-indexes
+++ b/test/integration/test-compressed-indexes
@@ -51,6 +51,7 @@ testrun() {
! 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
@@ -103,15 +104,15 @@ testovermethod() {
INDCOMP='compressed'
fi
- testsuccess aptget update
+ testsuccess aptget update -o Debug::Acquire::http=1
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"
- 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"