summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2014-10-15 15:56:53 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2014-10-15 15:56:53 +0200
commit5afcfe2a51a9e47e95023b99bcab065d1975e950 (patch)
tree77d9537d0b8bb02e23f1021e0fb67ae59878b78f /apt-pkg
parent9227645d6d355f9f4332f400b8d58c8fa8f1e899 (diff)
downloadapt-5afcfe2a51a9e47e95023b99bcab065d1975e950.tar.gz
don't cleanup cdrom files in apt-get update
Regression from merging 801745284905e7962aa77a9f37a6b4e7fcdc19d0 and b0f4b486e6850c5f98520ccf19da71d0ed748ae4. While fine by itself, merged the part fixing the filename is skipped if a cdrom source is encountered, so that our list-cleanup removes what seems to be orphaned files. Closes: 765458
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/acquire-item.cc15
1 files changed, 7 insertions, 8 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc
index 2401364a9..253cbdaf7 100644
--- a/apt-pkg/acquire-item.cc
+++ b/apt-pkg/acquire-item.cc
@@ -1144,16 +1144,12 @@ void pkgAcqIndex::Done(string Message,unsigned long long Size,string Hash,
else
Local = true;
- // do not reverify cdrom sources as apt-cdrom may rewrite the Packages
- // file when its doing the indexcopy
- if (RealURI.substr(0,6) == "cdrom:" &&
- StringToBool(LookupTag(Message,"IMS-Hit"),false) == true)
- return;
-
// The files timestamp matches, for non-local URLs reverify the local
// file, for local file, uncompress again to ensure the hashsum is still
// matching the Release file
- if (!Local && StringToBool(LookupTag(Message,"IMS-Hit"),false) == true)
+ bool const IsCDROM = RealURI.substr(0,6) == "cdrom:";
+ if ((Local == false || IsCDROM == true) &&
+ StringToBool(LookupTag(Message,"IMS-Hit"),false) == true)
{
// set destfile to the final destfile
if(_config->FindB("Acquire::GzipIndexes",false) == false)
@@ -1162,7 +1158,10 @@ void pkgAcqIndex::Done(string Message,unsigned long long Size,string Hash,
DestFile += URItoFileName(RealURI);
}
- ReverifyAfterIMS(FileName);
+ // do not reverify cdrom sources as apt-cdrom may rewrite the Packages
+ // file when its doing the indexcopy
+ if (IsCDROM == false)
+ ReverifyAfterIMS(FileName);
return;
}
string decompProg;