From: Michael Vogt Date: Wed, 16 Apr 2014 14:34:01 +0000 (+0200) Subject: add Debug::acquire::progress debug option and fixme for index file loading with the... X-Git-Tag: 1.1.exp1~28^2~6 X-Git-Url: https://git.hcoop.net/ntk/apt.git/commitdiff_plain/c62f7898b6f37b8e4b076ae3c40d56d22a884efe add Debug::acquire::progress debug option and fixme for index file loading with the correct extension --- diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index d5f8b0cc..834362b8 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -963,6 +963,7 @@ pkgAcqIndex::pkgAcqIndex(pkgAcquire *Owner, IndexTarget const *Target, else Verify = true; + // FIXME: use the appropriate compression Extension // load the filesize indexRecords::checkSum *Record = MetaIndexParser->Lookup(string(Target->MetaKey)); if(Record) diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc index 9fc40752..46d5e638 100644 --- a/apt-pkg/acquire.cc +++ b/apt-pkg/acquire.cc @@ -846,6 +846,7 @@ bool pkgAcquireStatus::Pulse(pkgAcquire *Owner) unsigned long long ResumeSize = 0; for (pkgAcquire::Worker *I = Owner->WorkersBegin(); I != 0; I = Owner->WorkerStep(I)) + { if (I->CurrentItem != 0 && I->CurrentItem->Owner->Complete == false) { CurrentBytes += I->CurrentSize; @@ -856,7 +857,14 @@ bool pkgAcquireStatus::Pulse(pkgAcquire *Owner) I->CurrentItem->Owner->Complete == false) TotalBytes += I->CurrentSize; } + } + // debug + if (_config->FindB("Debug::acquire::progress", false) == true) + std::clog << " Bytes: " + << SizeToStr(CurrentBytes) << " / " << SizeToStr(TotalBytes) + << std::endl; + // Normalize the figures and account for unknown size downloads if (TotalBytes <= 0) TotalBytes = 1;