summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2015-07-20 13:34:25 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2015-08-10 17:27:59 +0200
commitcc480836c739e36dc0c741fa333248c0a8150ec7 (patch)
treea1cd0149e5d0724990b5fbb99523dc454f334f7c
parent7f8c0eed6983db7b8959f1498fc8bc80c98d719e (diff)
drop obsolete explicit :none handling in pkgCacheGen
We archieve the same without the special handling now, so drop this code. Makes supporting this abdomination a little longer bearable as well. Git-Dch: Ignore
-rw-r--r--apt-pkg/deb/deblistparser.cc3
-rw-r--r--apt-pkg/pkgcachegen.cc50
2 files changed, 2 insertions, 51 deletions
diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc
index c7c4ffe77..a908057d7 100644
--- a/apt-pkg/deb/deblistparser.cc
+++ b/apt-pkg/deb/deblistparser.cc
@@ -69,7 +69,8 @@ string debListParser::Package() {
// ---------------------------------------------------------------------
/* This will return the Architecture of the package this section describes */
string debListParser::Architecture() {
- return Section.FindS("Architecture");
+ std::string const Arch = Section.FindS("Architecture");
+ return Arch.empty() ? "none" : Arch;
}
/*}}}*/
// ListParser::ArchitectureAll /*{{{*/
diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc
index 654f82baa..07a21d27f 100644
--- a/apt-pkg/pkgcachegen.cc
+++ b/apt-pkg/pkgcachegen.cc
@@ -229,22 +229,6 @@ bool pkgCacheGenerator::MergeList(ListParser &List,
continue;
}
- if (Arch.empty() == true)
- {
- // use the pseudo arch 'none' for arch-less packages
- Arch = "none";
- /* We might built a SingleArchCache here, which we don't want to blow up
- just for these :none packages to a proper MultiArchCache, so just ensure
- that we have always a native package structure first for SingleArch */
- pkgCache::PkgIterator NP;
- Dynamic<pkgCache::PkgIterator> DynPkg(NP);
- if (NewPackage(NP, PackageName, _config->Find("APT::Architecture")) == false)
- // TRANSLATOR: The first placeholder is a package name,
- // the other two should be copied verbatim as they include debug info
- return _error->Error(_("Error occurred while processing %s (%s%d)"),
- PackageName.c_str(), "NewPackage", 0);
- }
-
// Get a pointer to the package structure
pkgCache::PkgIterator Pkg;
Dynamic<pkgCache::PkgIterator> DynPkg(Pkg);
@@ -440,40 +424,6 @@ bool pkgCacheGenerator::MergeListVersion(ListParser &List, pkgCache::PkgIterator
return _error->Error(_("Error occurred while processing %s (%s%d)"),
Pkg.Name(), "AddImplicitDepends", 1);
}
- /* :none packages are packages without an architecture. They are forbidden by
- debian-policy, so usually they will only be in (old) dpkg status files -
- and dpkg will complain about them - and are pretty rare. We therefore do
- usually not create conflicts while the parent is created, but only if a :none
- package (= the target) appears. This creates incorrect dependencies on :none
- for architecture-specific dependencies on the package we copy from, but we
- will ignore this bug as architecture-specific dependencies are only allowed
- in jessie and until then the :none packages should be extinct (hopefully).
- In other words: This should work long enough to allow graceful removal of
- these packages, it is not supposed to allow users to keep using them … */
- if (strcmp(Pkg.Arch(), "none") == 0)
- {
- pkgCache::PkgIterator M = Grp.FindPreferredPkg();
- if (M.end() == false && Pkg != M)
- {
- pkgCache::DepIterator D = M.RevDependsList();
- Dynamic<pkgCache::DepIterator> DynD(D);
- for (; D.end() == false; ++D)
- {
- if ((D->Type != pkgCache::Dep::Conflicts &&
- D->Type != pkgCache::Dep::DpkgBreaks &&
- D->Type != pkgCache::Dep::Replaces) ||
- D.ParentPkg().Group() == Grp)
- continue;
-
- map_pointer_t *OldDepLast = NULL;
- pkgCache::VerIterator ConVersion = D.ParentVer();
- Dynamic<pkgCache::VerIterator> DynV(ConVersion);
- // duplicate the Conflicts/Breaks/Replaces for :none arch
- NewDepends(Pkg, ConVersion, D->Version,
- D->CompareOp, D->Type, OldDepLast);
- }
- }
- }
}
if (unlikely(AddImplicitDepends(Grp, Pkg, Ver) == false))
return _error->Error(_("Error occurred while processing %s (%s%d)"),