diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2012-09-11 14:32:24 +0200 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2012-09-11 14:32:24 +0200 |
commit | ad6946e73ca11f79ffd306b511883131dc7babe6 (patch) | |
tree | d6d27694adae0663ab0ee0526e69d07242483415 /apt-pkg/deb | |
parent | 4c81d32aada5b78fff4724efb1e039dd429c09f3 (diff) | |
parent | 8ec008808cd6083a633685a732dfe9b8a58a89da (diff) |
merged from lp:~donkult/apt/sid
Diffstat (limited to 'apt-pkg/deb')
-rw-r--r-- | apt-pkg/deb/deblistparser.cc | 22 | ||||
-rw-r--r-- | apt-pkg/deb/dpkgpm.cc | 8 |
2 files changed, 24 insertions, 6 deletions
diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc index 12c6ab4c9..b84bd6fdd 100644 --- a/apt-pkg/deb/deblistparser.cc +++ b/apt-pkg/deb/deblistparser.cc @@ -645,6 +645,8 @@ bool debListParser::ParseDepends(pkgCache::VerIterator &Ver, a != Architectures.end(); ++a) if (NewDepends(Ver,Package,*a,Version,Op,Type) == false) return false; + if (NewDepends(Ver,Package,"none",Version,Op,Type) == false) + return false; } else if (MultiArchEnabled == true && found != string::npos && strcmp(Package.c_str() + found, ":any") != 0) @@ -658,8 +660,18 @@ bool debListParser::ParseDepends(pkgCache::VerIterator &Ver, if (NewDepends(Ver,Package,Arch,Version,Op,Type) == false) return false; } - else if (NewDepends(Ver,Package,pkgArch,Version,Op,Type) == false) - return false; + else + { + if (NewDepends(Ver,Package,pkgArch,Version,Op,Type) == false) + return false; + if ((Type == pkgCache::Dep::Conflicts || + Type == pkgCache::Dep::DpkgBreaks || + Type == pkgCache::Dep::Replaces) && + NewDepends(Ver, Package, + (pkgArch != "none") ? "none" : _config->Find("APT::Architecture"), + Version,Op,Type) == false) + return false; + } if (Start == Stop) break; } @@ -753,13 +765,15 @@ bool debListParser::Step() drop the whole section. A missing arch tag only happens (in theory) inside the Status file, so that is a positive return */ string const Architecture = Section.FindS("Architecture"); - if (Architecture.empty() == true) - return true; if (Arch.empty() == true || Arch == "any" || MultiArchEnabled == false) { if (APT::Configuration::checkArchitecture(Architecture) == true) return true; + /* parse version stanzas without an architecture only in the status file + (and as misfortune bycatch flat-archives) */ + if ((Arch.empty() == true || Arch == "any") && Architecture.empty() == true) + return true; } else { diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index ae9143e0d..c9df41d3a 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -1131,7 +1131,9 @@ bool pkgDPkgPM::Go(int OutStatusFd) if (I->Op == Item::Configure && disappearedPkgs.find(I->Pkg.Name()) != disappearedPkgs.end()) continue; // We keep this here to allow "smooth" transitions from e.g. multiarch dpkg/ubuntu to dpkg/debian - if (dpkgMultiArch == false && (I->Pkg.Arch() == nativeArch || !strcmp(I->Pkg.Arch(), "all"))) + if (dpkgMultiArch == false && (I->Pkg.Arch() == nativeArch || + strcmp(I->Pkg.Arch(), "all") == 0 || + strcmp(I->Pkg.Arch(), "none") == 0)) { char const * const name = I->Pkg.Name(); ADDARG(name); @@ -1148,7 +1150,9 @@ bool pkgDPkgPM::Go(int OutStatusFd) } else PkgVer = Cache[I->Pkg].InstVerIter(Cache); - if (PkgVer.end() == false) + if (strcmp(I->Pkg.Arch(), "none") == 0) + ; // never arch-qualify a package without an arch + else if (PkgVer.end() == false) name.append(":").append(PkgVer.Arch()); else _error->Warning("Can not find PkgVer for '%s'", name.c_str()); |