summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorMichael Vogt <mvo@ubuntu.com>2015-05-22 16:17:08 +0200
committerMichael Vogt <mvo@ubuntu.com>2015-05-22 16:17:08 +0200
commit0f3150e7040f45565b459a1390606bc2f714f6a8 (patch)
tree200b65a080c246b09e6bcdcd81ea82c824272600 /apt-pkg
parent314b47542c57d0a12c55dd1dd334cf233a33fcfb (diff)
parent4694e07d450baa13fa04482752ca369a5797c640 (diff)
Merge remote-tracking branch 'upstream/debian/jessie' into debian/sid
Conflicts: apt-pkg/deb/dpkgpm.cc
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/acquire-item.cc14
-rw-r--r--apt-pkg/contrib/strutl.h2
-rw-r--r--apt-pkg/deb/deblistparser.cc2
-rw-r--r--apt-pkg/deb/dpkgpm.cc4
-rw-r--r--apt-pkg/pkgcache.cc14
-rw-r--r--apt-pkg/pkgcache.h2
6 files changed, 16 insertions, 22 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/deblistparser.cc b/apt-pkg/deb/deblistparser.cc
index 3941cf2f2..e87e7b5e4 100644
--- a/apt-pkg/deb/deblistparser.cc
+++ b/apt-pkg/deb/deblistparser.cc
@@ -770,7 +770,7 @@ bool debListParser::ParseDepends(pkgCache::VerIterator &Ver,
if (NewDepends(Ver,Package,"none",Version,Op,Type) == false)
return false;
}
- else if (MultiArchEnabled == true && found != string::npos &&
+ else if (found != string::npos &&
strcmp(Package.c_str() + found, ":any") != 0)
{
string Arch = Package.substr(found+1, string::npos);
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)
diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc
index d7c9656b9..a7b75dae8 100644
--- a/apt-pkg/pkgcache.cc
+++ b/apt-pkg/pkgcache.cc
@@ -230,12 +230,7 @@ pkgCache::PkgIterator pkgCache::SingleArchFindPkg(const string &Name)
pkgCache::PkgIterator pkgCache::FindPkg(const string &Name) {
size_t const found = Name.find(':');
if (found == string::npos)
- {
- if (MultiArchCache() == false)
- return SingleArchFindPkg(Name);
- else
- return FindPkg(Name, "native");
- }
+ return FindPkg(Name, "native");
string const Arch = Name.substr(found+1);
/* Beware: This is specialcased to handle pkg:any in dependencies as
these are linked to virtual pkg:any named packages with all archs.
@@ -249,13 +244,6 @@ pkgCache::PkgIterator pkgCache::FindPkg(const string &Name) {
// ---------------------------------------------------------------------
/* Returns 0 on error, pointer to the package otherwise */
pkgCache::PkgIterator pkgCache::FindPkg(const string &Name, string const &Arch) {
- if (MultiArchCache() == false && Arch != "none") {
- if (Arch == "native" || Arch == "all" || Arch == "any" ||
- Arch == NativeArch())
- return SingleArchFindPkg(Name);
- else
- return PkgIterator(*this,0);
- }
/* We make a detour via the GrpIterator here as
on a multi-arch environment a group is easier to
find than a package (less entries in the buckets) */
diff --git a/apt-pkg/pkgcache.h b/apt-pkg/pkgcache.h
index 5e8a9630a..a7e520bc9 100644
--- a/apt-pkg/pkgcache.h
+++ b/apt-pkg/pkgcache.h
@@ -218,7 +218,7 @@ class pkgCache /*{{{*/
private:
bool MultiArchEnabled;
- PkgIterator SingleArchFindPkg(const std::string &Name);
+ APT_DEPRECATED PkgIterator SingleArchFindPkg(const std::string &Name);
};
/*}}}*/
// Header structure /*{{{*/