summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/acquire-item.cc4
-rw-r--r--apt-pkg/algorithms.cc9
2 files changed, 6 insertions, 7 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc
index 503ad7dae..679f9cee7 100644
--- a/apt-pkg/acquire-item.cc
+++ b/apt-pkg/acquire-item.cc
@@ -711,13 +711,13 @@ void pkgAcqIndex::Done(string Message,unsigned long Size,string Hash,
else
Local = true;
- string compExt = Desc.URI.substr(Desc.URI.size()-3);
+ string compExt = flExtension(URI(Desc.URI).Path);
const char *decompProg;
if(compExt == "bz2")
decompProg = "bzip2";
else if(compExt == ".gz")
decompProg = "gzip";
- else if(compExt == "ges" || compExt == "ces") // packaGES or sourCES
+ else if(compExt == "")
decompProg = "copy";
else {
_error->Error("Unsupported extension: %s", compExt.c_str());
diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc
index 1d04ae64d..bd33d5ef1 100644
--- a/apt-pkg/algorithms.cc
+++ b/apt-pkg/algorithms.cc
@@ -1342,11 +1342,10 @@ bool ListUpdate(pkgAcquireStatus &Stat,
(*I)->Finished();
- ::URI uri((*I)->DescURI());
- uri.User.clear();
- uri.Password.clear();
- string descUri = string(uri);
-
+ ::URI uri((*I)->DescURI());
+ uri.User.clear();
+ uri.Password.clear();
+ string descUri = string(uri);
_error->Warning(_("Failed to fetch %s %s\n"), descUri.c_str(),
(*I)->ErrorText.c_str());