summaryrefslogtreecommitdiff
path: root/apt-pkg/deb/dpkgpm.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2012-09-09 16:03:52 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2012-09-09 16:03:52 +0200
commitc919ad6e4d0de48acb60f2a1371ade9bfb0451f8 (patch)
treef814cdfc029498db53928c06e619c91683b3f115 /apt-pkg/deb/dpkgpm.cc
parent601c2c8ec3d33a1e787af75f20b51d1131cb6d74 (diff)
handle packages without a mandatory architecture (debian-policy ยง5.3)
by introducing a pseudo-architecture 'none' so that the small group of users with these packages can get right of them without introducing too much hassle for other users (Closes: #686346)
Diffstat (limited to 'apt-pkg/deb/dpkgpm.cc')
-rw-r--r--apt-pkg/deb/dpkgpm.cc8
1 files changed, 6 insertions, 2 deletions
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());