diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2011-07-28 09:19:45 +0200 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2011-07-28 09:19:45 +0200 |
commit | 0b7d641cf12761c3dcc5edb4031adfc9709963e4 (patch) | |
tree | 5d12281c5f482e6f85636f57ef86a2dc92e8713c /apt-pkg/deb | |
parent | 7d79339f811aeebacb3f841bac6075fdfbadd03f (diff) | |
parent | ed6ba81db1b2832089ea443cf0030ab3f15fda97 (diff) |
* merged latest fixes from debian-sid
* apt-pkg/contrib/sha1.cc:
- fix illegally casts of on-stack buffer to a type requiring more
alignment than it has resulting in segfaults on sparc (Closes: #634696)
* apt-pkg/contrib/cdromutl.cc:
- fix escape problem when looking for the mounted devices
* apt-pkg/contrib/strutl.{h,cc}, test/libapt/strutil_test.cc:
- add new DeEscapeString() similar to DeQuoteString but
unescape character escapes like \0XX and \xXX (plus added
test)
* refresh po/*
* cmdline/apt-get.cc:
- fix missing download progress in apt-get download
- do not require unused partial dirs in 'source' (Closes: #633510)
- buildconflicts effect all architectures
- implement MultiarchCross for build-dep and source (Closes: #632221)
* cmdline/apt-key:
- use a tmpfile instead of /etc/apt/secring.gpg (Closes: #632596)
* debian/apt.postinst:
- remove /etc/apt/secring.gpg if it is an empty file
* doc/apt-cache.8.xml:
- apply madison typofix from John Feuerstein, thanks! (Closes: #633455)
* apt-pkg/policy.cc:
- emit an error on unknown APT::Default-Release value (Closes: #407511)
* apt-pkg/aptconfiguration.cc:
- ensure that native architecture is if not specified otherwise the
first architecture in the Architectures vector
* apt-pkg/deb/deblistparser.cc:
- Strip only :any and :native if MultiArch should be stripped as it is
save to ignore them in non-MultiArch contexts but if the dependency
is a specific architecture (and not the native) do not strip
Diffstat (limited to 'apt-pkg/deb')
-rw-r--r-- | apt-pkg/deb/deblistparser.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc index b708296d3..d23207f4a 100644 --- a/apt-pkg/deb/deblistparser.cc +++ b/apt-pkg/deb/deblistparser.cc @@ -456,7 +456,7 @@ const char *debListParser::ConvertRelation(const char *I,unsigned int &Op) * * The complete architecture, consisting of <kernel>-<cpu>. */ -static string CompleteArch(std::string& arch) { +static string CompleteArch(std::string const &arch) { if (arch == "armel") return "linux-arm"; if (arch == "armhf") return "linux-arm"; if (arch == "lpia") return "linux-i386"; @@ -495,9 +495,13 @@ const char *debListParser::ParseDepends(const char *Start,const char *Stop, Package.assign(Start,I - Start); // We don't want to confuse library users which can't handle MultiArch + string const arch = _config->Find("APT::Architecture"); if (StripMultiArch == true) { size_t const found = Package.rfind(':'); - if (found != string::npos) + if (found != string::npos && + (strcmp(Package.c_str() + found, ":any") == 0 || + strcmp(Package.c_str() + found, ":native") == 0 || + strcmp(Package.c_str() + found + 1, arch.c_str()) == 0)) Package = Package.substr(0,found); } @@ -538,7 +542,6 @@ const char *debListParser::ParseDepends(const char *Start,const char *Stop, if (ParseArchFlags == true) { - string arch = _config->Find("APT::Architecture"); string completeArch = CompleteArch(arch); // Parse an architecture |