diff options
Diffstat (limited to 'apt-pkg')
-rw-r--r-- | apt-pkg/acquire-item.cc | 14 | ||||
-rw-r--r-- | apt-pkg/contrib/strutl.h | 2 | ||||
-rw-r--r-- | apt-pkg/deb/dpkgpm.cc | 4 |
3 files changed, 13 insertions, 7 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 253cbdaf7..0bcafdc5c 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -1194,8 +1194,18 @@ void pkgAcqIndex::Done(string Message,unsigned long long Size,string Hash, Desc.URI = decompProg + ":" + FileName; QueueURI(Desc); - // FIXME: this points to a c++ string that goes out of scope - Mode = decompProg.c_str(); + if (decompProg == "copy") + Mode = "copy"; + else if (decompProg == "xz") + Mode = "xz"; + else if (decompProg == "lzma") + Mode = "lzma"; + else if (decompProg == "bzip2") + Mode = "bzip2"; + else if (decompProg == "gzip") + Mode = "gzip"; + else + Mode = "decomp"; } /*}}}*/ // AcqIndexTrans::pkgAcqIndexTrans - Constructor /*{{{*/ diff --git a/apt-pkg/contrib/strutl.h b/apt-pkg/contrib/strutl.h index 185cdc3fc..f4f80834b 100644 --- a/apt-pkg/contrib/strutl.h +++ b/apt-pkg/contrib/strutl.h @@ -79,7 +79,7 @@ bool TokSplitString(char Tok,char *Input,char **List, unsigned long ListMax); // split a given string by a char -std::vector<std::string> VectorizeString(std::string const &haystack, char const &split) APT_CONST; +std::vector<std::string> VectorizeString(std::string const &haystack, char const &split) APT_PURE; /* \brief Return a vector of strings from string "input" where "sep" * is used as the delimiter string. diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index b187efb40..82e045fd3 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -1908,10 +1908,6 @@ void pkgDPkgPM::WriteApportReport(const char *pkgpath, const char *errormsg) "Purge", "ConfigurePending", "TriggersPending", - "reserved-1", - "reserved-2", - "reserved-3", - "reserved-4", }; fprintf(report, "AptOrdering:\n"); for (vector<Item>::iterator I = List.begin(); I != List.end(); ++I) |