Browse Source

Remove the "pseudopackage" handling of Architecture: all packages for

Multi-Arch; instead, Arch: all packages only satisfy dependencies for
the native arch, except where the Arch: all package is declared
Multi-Arch: foreign.  (Closes: #613584)

This has the sideeffect that arch:all packages internally show up as
coming from the native arch - so packages with the architecture "all"
doesn't exist any longer in the pkgcache
debian/1.8.y
David Kalnischkies 13 years ago
parent
commit
28166356f3
  1. 56
      README.MultiArch
  2. 64
      apt-pkg/algorithms.cc
  3. 8
      apt-pkg/cacheiterators.h
  4. 4
      apt-pkg/cacheset.h
  5. 84
      apt-pkg/deb/deblistparser.cc
  6. 304
      apt-pkg/depcache.cc
  7. 8
      apt-pkg/depcache.h
  8. 4
      apt-pkg/orderlist.cc
  9. 35
      apt-pkg/packagemanager.cc
  10. 18
      apt-pkg/pkgcache.cc
  11. 4
      apt-pkg/pkgcache.h
  12. 49
      apt-pkg/pkgcachegen.cc
  13. 7
      apt-pkg/policy.cc
  14. 10
      cmdline/apt-cache.cc
  15. 13
      cmdline/apt-get.cc
  16. 2
      debian/apt.symbols
  17. 6
      debian/changelog
  18. 4
      test/integration/test-bug-549968-install-depends-of-not-installed
  19. 8
      test/integration/test-bug-590438-broken-provides-thanks-to-remove-order
  20. 16
      test/integration/test-bug-593360-modifiers-in-names
  21. 77
      test/integration/test-bug-612099-multiarch-conflicts
  22. 30
      test/integration/test-release-candidate-switching

56
README.MultiArch

@ -47,67 +47,17 @@ and also to MultiArch as a Group consists of possible many packages which
all have the same name and are therefore out of interest for pkgnames.
Caused by the paragraph "Dependencies involving Architecture: all packages"
in the MultiArch spec we have a second major conceptional change
which could even break existing applications, but we hope for the best…
An Architecture: all package is internally split into pseudo packages
for all MultiArch Architectures and additional a package with the
architecture "all" with no dependencies which is a dependency of all
these architecture depending packages. While the architecture depending
packages are mainly used for dependency resolution (a package of arch A which
depends on an arch all package assumes that the dependencies of this package
are also from arch A. Packages also sometimes change from any to all or v.v.)
the arch "all" package is used for scheduling download/installation of the
underlying "real" package. Note that the architecture depending packages can
be detected with Pseudo() while the "all" package reports exactly this arch
as package architecture and as pseudo architecture of the versions of this pkg.
Beware: All versions of a "real" architecture all package will be report "all"
as their architecture if asked with Arch() regardless if they are the "all" or
the architecture depending packages. If you want to know the architecture this
pseudo package was created for call Arch(true). Also, while the spec say that
arch:all packages are not allowed to have a MultiArch flag APT assigns a
special value to them: MultiArch: all.
As you might guess this arch:all handling has a few problems (but we think so
far that the problems are minor compared to the problems we would have with
other implementations.)
APT doesn't know which pseudo packages of such an arch all package are
"installed" (to satisfy dependencies), so APT will generate a Cache in which
all these pseudo packages are installed (e.g. apt-cache policy will display
them all as installed). Later in the DepCache step it will "remove"
all pseudo packages whose dependencies are not satisfied.
The expense is that if the package state is broken APT could come to the
conclusion to "remove" too many pseudo packages, but in a stable environment
APT should never end up in a broken system state…
Given all these internal changes it is quite interesting that the actual
implementation of MultiArch is trivial: Some implicit dependencies and a few
more provides are all changes needed to get it working. Especially noteworthy
is that it wasn't needed to change the resolver in any way and other parts only
need to be told about ignoring pseudo packages or using GrpIterator instead of
PkgIterator, so chances are good that libapt-applications will proceed to work
without or at least only require minor changes, but your mileage may vary…
need to be told about using GrpIterator instead of PkgIterator, so chances are
good that libapt-applications will proceed to work without or at least only
require minor changes, but your mileage may vary…
Known Issues and/or noteworthy stuff:
* The implementation is mostly untested, so it is very likely that APT will
eat your kids if you aren't as lucky as the author of these patches.
* the (install)size of a pseudo package is always NULL - if you want to know
the (install)size you need to get the info from the arch "all" package.
* It is maybe confusing, but the arch "all" package does have the same versions
and in general roughly the same information with one subtil difference:
It doesn't have any dependency, regardless of the type. The pseudo packages
depend on this package.
* apt-cache policy foobar on installed architecture all package foobar will
report all architecture depending packages as installed. Displaying here the
correct information would require to build the complete DepCache…
* [BUG] An installed package which changes the architecture from any to all
(and v.v.) shows up in the NEW packages section instead of UPGRADE.
* [TODO] Investigate the DepCache pseudo-package killer heuristic:
e.g. add more safety guards…
* [FIXME] a few corner cases/missing features marked as FIXME in the code
[0] https://wiki.ubuntu.com/MultiarchSpec

64
apt-pkg/algorithms.cc

@ -90,21 +90,6 @@ bool pkgSimulate::Install(PkgIterator iPkg,string /*File*/)
Describe(Pkg,cout,true,true);
Sim.MarkInstall(Pkg,false);
if (strcmp(Pkg.Arch(),"all") == 0)
{
pkgCache::GrpIterator G = Pkg.Group();
pkgCache::GrpIterator iG = iPkg.Group();
for (pkgCache::PkgIterator P = G.FindPkg("any"); P.end() != true; P = G.NextPkg(P))
{
if (strcmp(P.Arch(), "all") == 0)
continue;
if (iG.FindPkg(P.Arch())->CurrentVer == 0)
continue;
Flags[P->ID] = 1;
Sim.MarkInstall(P, false);
}
}
// Look for broken conflicts+predepends.
for (PkgIterator I = Sim.PkgBegin(); I.end() == false; I++)
{
@ -150,40 +135,6 @@ bool pkgSimulate::Configure(PkgIterator iPkg)
Flags[Pkg->ID] = 2;
if (strcmp(Pkg.Arch(),"all") == 0)
{
pkgCache::GrpIterator G = Pkg.Group();
for (pkgCache::PkgIterator P = G.FindPkg("any"); P.end() != true; P = G.NextPkg(P))
{
if (strcmp(P.Arch(), "all") == 0)
continue;
if (Flags[P->ID] == 1)
Flags[P->ID] = 2;
}
}
if (Sim[Pkg].InstBroken() == true)
{
/* We don't call Configure for Pseudo packages and if the 'all' is already installed
the simulation will think the pseudo package is not installed, so if something is
broken we walk over the dependencies and search for not installed pseudo packages */
for (pkgCache::DepIterator D = Sim[Pkg].InstVerIter(Sim).DependsList(); D.end() == false; D++)
{
if (Sim.IsImportantDep(D) == false ||
(Sim[D] & pkgDepCache::DepInstall) != 0)
continue;
pkgCache::PkgIterator T = D.TargetPkg();
if (T.end() == true || T->CurrentVer != 0 || Flags[T->ID] != 0)
continue;
pkgCache::PkgIterator A = T.Group().FindPkg("all");
if (A.end() == true || A->VersionList == 0 || A->CurrentVer == 0 ||
Cache.VS().CheckDep(A.CurVersion(), pkgCache::Dep::Equals, T.CandVersion()) == false)
continue;
Sim.MarkInstall(T, false);
Flags[T->ID] = 2;
}
}
if (Sim[Pkg].InstBroken() == true)
{
cout << "Conf " << Pkg.FullName(false) << " broken" << endl;
@ -235,21 +186,6 @@ bool pkgSimulate::Remove(PkgIterator iPkg,bool Purge)
Flags[Pkg->ID] = 3;
Sim.MarkDelete(Pkg);
if (strcmp(Pkg.Arch(),"all") == 0)
{
pkgCache::GrpIterator G = Pkg.Group();
pkgCache::GrpIterator iG = iPkg.Group();
for (pkgCache::PkgIterator P = G.FindPkg("any"); P.end() != true; P = G.NextPkg(P))
{
if (strcmp(P.Arch(), "all") == 0)
continue;
if (iG.FindPkg(P.Arch())->CurrentVer == 0)
continue;
Flags[P->ID] = 3;
Sim.MarkDelete(P);
}
}
if (Purge == true)
cout << "Purg ";
else

8
apt-pkg/cacheiterators.h

@ -206,13 +206,9 @@ class pkgCache::VerIterator : public Iterator<Version, VerIterator> {
inline const char *VerStr() const {return S->VerStr == 0?0:Owner->StrP + S->VerStr;};
inline const char *Section() const {return S->Section == 0?0:Owner->StrP + S->Section;};
inline const char *Arch() const {
if(S->MultiArch == pkgCache::Version::All)
return "all";
return S->ParentPkg == 0?0:Owner->StrP + ParentPkg()->Arch;
};
inline const char *Arch(bool const pseudo) const {
if(pseudo == false)
return Arch();
__deprecated inline const char *Arch(bool const pseudo) const {
return S->ParentPkg == 0?0:Owner->StrP + ParentPkg()->Arch;
};
inline PkgIterator ParentPkg() const {return PkgIterator(*Owner,Owner->PkgP + S->ParentPkg);};
@ -227,7 +223,7 @@ class pkgCache::VerIterator : public Iterator<Version, VerIterator> {
string RelStr() const;
bool Automatic() const;
bool Pseudo() const;
__deprecated bool Pseudo() const;
VerFileIterator NewestFile() const;
inline VerIterator(pkgCache &Owner,Version *Trg = 0) : Iterator<Version, VerIterator>(Owner, Trg) {

4
apt-pkg/cacheset.h

@ -257,7 +257,7 @@ public: /*{{{*/
inline const char *VerStr() const { return (**this).VerStr(); };
inline const char *Section() const { return (**this).Section(); };
inline const char *Arch() const { return (**this).Arch(); };
inline const char *Arch(bool const pseudo) const { return (**this).Arch(pseudo); };
__deprecated inline const char *Arch(bool const pseudo) const { return (**this).Arch(); };
inline pkgCache::PkgIterator ParentPkg() const { return (**this).ParentPkg(); };
inline pkgCache::DescIterator DescriptionList() const { return (**this).DescriptionList(); };
inline pkgCache::DescIterator TranslatedDescription() const { return (**this).TranslatedDescription(); };
@ -268,7 +268,7 @@ public: /*{{{*/
inline const char *PriorityType() const { return (**this).PriorityType(); };
inline string RelStr() const { return (**this).RelStr(); };
inline bool Automatic() const { return (**this).Automatic(); };
inline bool Pseudo() const { return (**this).Pseudo(); };
__deprecated inline bool Pseudo() const { return false; };
inline pkgCache::VerFileIterator NewestFile() const { return (**this).NewestFile(); };
};
/*}}}*/

84
apt-pkg/deb/deblistparser.cc

@ -67,23 +67,12 @@ string debListParser::Package() {
/*}}}*/
// ListParser::Architecture - Return the package arch /*{{{*/
// ---------------------------------------------------------------------
/* This will return the Architecture of the package this section describes
Note that architecture "all" packages will get the architecture of the
Packages file parsed here. */
/* This will return the Architecture of the package this section describes */
string debListParser::Architecture() {
string const Result = Section.FindS("Architecture");
if (Result.empty() == true || Result == "all")
{
if (Arch.empty() == true)
/* FIXME: this is a problem for installed arch all
packages as we don't know from which arch this
package was installed - and therefore which
dependency this package resolves. */
return _config->Find("APT::Architecture");
else
return Arch;
}
return Result;
std::string const Arch = Section.FindS("Architecture");
if (Arch.empty() == true)
return _config->Find("APT::Architecture");
return Arch;
}
/*}}}*/
// ListParser::ArchitectureAll /*{{{*/
@ -112,27 +101,30 @@ bool debListParser::NewVersion(pkgCache::VerIterator &Ver)
Ver->Section = UniqFindTagWrite("Section");
// Parse multi-arch
if (Section.FindS("Architecture") == "all")
/* Arch all packages can't have a Multi-Arch field,
but we need a special treatment for them nonetheless */
Ver->MultiArch = pkgCache::Version::All;
else
{
string const MultiArch = Section.FindS("Multi-Arch");
if (MultiArch.empty() == true)
Ver->MultiArch = pkgCache::Version::None;
else if (MultiArch == "same")
Ver->MultiArch = pkgCache::Version::Same;
else if (MultiArch == "foreign")
Ver->MultiArch = pkgCache::Version::Foreign;
else if (MultiArch == "allowed")
Ver->MultiArch = pkgCache::Version::Allowed;
else
string const MultiArch = Section.FindS("Multi-Arch");
if (MultiArch.empty() == true)
Ver->MultiArch = pkgCache::Version::None;
else if (MultiArch == "same") {
// Parse multi-arch
if (Section.FindS("Architecture") == "all")
{
_error->Warning("Unknown Multi-Arch type »%s« for package »%s«",
MultiArch.c_str(), Section.FindS("Package").c_str());
/* Arch all packages can't be Multi-Arch: same */
_error->Warning("Architecture: all package '%s' can't be Multi-Arch: same",
Section.FindS("Package").c_str());
Ver->MultiArch = pkgCache::Version::None;
}
else
Ver->MultiArch = pkgCache::Version::Same;
}
else if (MultiArch == "foreign")
Ver->MultiArch = pkgCache::Version::Foreign;
else if (MultiArch == "allowed")
Ver->MultiArch = pkgCache::Version::Allowed;
else
{
_error->Warning("Unknown Multi-Arch type '%s' for package '%s'",
MultiArch.c_str(), Section.FindS("Package").c_str());
Ver->MultiArch = pkgCache::Version::None;
}
// Archive Size
@ -150,24 +142,6 @@ bool debListParser::NewVersion(pkgCache::VerIterator &Ver)
Ver->Priority = pkgCache::State::Extra;
}
if (Ver->MultiArch == pkgCache::Version::All)
{
/* We maintain a "pseudo" arch=all package for architecture all versions
on which these versions can depend on. This pseudo package is many used
for downloading/installing: The other pseudo-packages will degenerate
to a NOP in the download/install step - this package will ensure that
it is downloaded only one time and installed only one time -- even if
the architecture bound versions coming in and out on regular basis. */
if (strcmp(Ver.Arch(true),"all") == 0)
return true;
else if (MultiArchEnabled == true)
{
// our pseudo packages have no size to not confuse the fetcher
Ver->Size = 0;
Ver->InstalledSize = 0;
}
}
if (ParseDepends(Ver,"Depends",pkgCache::Dep::Depends) == false)
return false;
if (ParseDepends(Ver,"Pre-Depends",pkgCache::Dep::PreDepends) == false)
@ -644,7 +618,7 @@ bool debListParser::ParseDepends(pkgCache::VerIterator &Ver,
return true;
string Package;
string const pkgArch = Ver.Arch(true);
string const pkgArch = Ver.Arch();
string Version;
unsigned int Op;
@ -683,7 +657,7 @@ bool debListParser::ParseProvides(pkgCache::VerIterator &Ver)
{
string Package;
string Version;
string const Arch = Ver.Arch(true);
string const Arch = Ver.Arch();
unsigned int Op;
while (1)
@ -768,7 +742,7 @@ bool debListParser::Step()
if (Architecture == Arch)
return true;
if (Architecture == "all")
if (Architecture == "all" && Arch == _config->Find("APT::Architecture"))
return true;
}

304
apt-pkg/depcache.cc

@ -705,107 +705,6 @@ void pkgDepCache::UpdateVerState(PkgIterator Pkg)
}
}
/*}}}*/
// DepCache::RemovePseudoInstalledPkg - MultiArch helper for Update() /*{{{*/
// ---------------------------------------------------------------------
/* We "install" arch all packages for all archs if it is installed. Many
of these will be broken. This method will look at these broken Pkg and
"remove" it. */
bool pkgDepCache::RemovePseudoInstalledPkg(PkgIterator &Pkg, std::set<unsigned long> &recheck) {
if (unlikely(Pkg->CurrentVer == 0))
return false;
VerIterator V = Pkg.CurrentVer();
if (V->MultiArch != Version::All)
return false;
// Never ever kill an "all" package - they have no dependency so they can't be broken
if (strcmp(Pkg.Arch(),"all") == 0)
return false;
unsigned char const CurDepState = VersionState(V.DependsList(),DepInstall,DepInstMin,DepInstPolicy);
if ((CurDepState & DepInstMin) == DepInstMin) {
// okay, the package isn't broken, but is the package also required?
// If it has no real dependencies, no installed rdepends and doesn't
// provide something of value, we will kill it as not required.
// These pseudopackages have otherwise interesting effects if they get
// a new dependency in a newer version…
for (pkgCache::DepIterator D = V.DependsList();
D.end() != true; ++D)
if (D.IsCritical() == true && D.ParentPkg()->Group != Pkg->Group)
return false;
for (DepIterator D = Pkg.RevDependsList(); D.end() != true; ++D)
{
if (D.IsCritical() == false)
continue;
PkgIterator const P = D.ParentPkg();
if (P->Group == Pkg->Group)
continue;
if (P->CurrentVer != 0)
return false;
}
for (PrvIterator Prv = V.ProvidesList(); Prv.end() != true; Prv++)
for (DepIterator d = Prv.ParentPkg().RevDependsList();
d.end() != true; ++d)
{
PkgIterator const P = d.ParentPkg();
if (P->CurrentVer != 0 &&
P->Group != Pkg->Group)
return false;
}
}
// Dependencies for this arch all package are not statisfied
// so we installed it only for our convenience: get right of it now.
RemoveSizes(Pkg);
RemoveStates(Pkg);
Pkg->CurrentVer = 0;
PkgState[Pkg->ID].InstallVer = 0;
AddStates(Pkg);
Update(Pkg);
AddSizes(Pkg);
// After the remove previously satisfied pseudo pkg could be now
// no longer satisfied, so we need to recheck the reverse dependencies
for (DepIterator d = Pkg.RevDependsList(); d.end() != true; ++d)
{
PkgIterator const P = d.ParentPkg();
if (P->CurrentVer != 0)
recheck.insert(P.Index());
}
for (DepIterator d = V.DependsList(); d.end() != true; ++d)
{
PkgIterator const P = d.TargetPkg();
for (PrvIterator Prv = P.ProvidesList(); Prv.end() != true; ++Prv)
{
PkgIterator const O = Prv.OwnerPkg();
if (O->CurrentVer != 0)
recheck.insert(O.Index());
}
if (P->CurrentVer != 0)
recheck.insert(P.Index());
}
for (PrvIterator Prv = V.ProvidesList(); Prv.end() != true; Prv++)
{
for (DepIterator d = Prv.ParentPkg().RevDependsList();
d.end() != true; ++d)
{
PkgIterator const P = d.ParentPkg();
if (P->CurrentVer == 0)
continue;
recheck.insert(P.Index());
}
}
return true;
}
/*}}}*/
// DepCache::Update - Figure out all the state information /*{{{*/
// ---------------------------------------------------------------------
/* This will figure out the state of all the packages and all the
@ -820,12 +719,8 @@ void pkgDepCache::Update(OpProgress *Prog)
iBrokenCount = 0;
iBadCount = 0;
std::set<unsigned long> recheck;
// Perform the depends pass
int Done = 0;
bool const checkMultiArch = APT::Configuration::getArchitectures().size() > 1;
unsigned long killed = 0;
for (PkgIterator I = PkgBegin(); I.end() != true; I++,Done++)
{
if (Prog != 0 && Done%20 == 0)
@ -858,69 +753,6 @@ void pkgDepCache::Update(OpProgress *Prog)
AddSizes(I);
UpdateVerState(I);
AddStates(I);
if (checkMultiArch != true || I->CurrentVer == 0)
continue;
VerIterator const V = I.CurrentVer();
if (V->MultiArch != Version::All)
continue;
recheck.insert(I.Index());
--Done; // no progress if we need to recheck the package
}
if (checkMultiArch == true) {
/* FIXME: recheck breaks proper progress reporting as we don't know
how many packages we need to recheck. To lower the effect
a bit we increase with a kill, but we should do something more clever */
while(recheck.empty() == false)
for (std::set<unsigned long>::const_iterator p = recheck.begin();
p != recheck.end();) {
if (Prog != 0 && Done%20 == 0)
Prog->Progress(Done);
PkgIterator P = PkgIterator(*Cache, Cache->PkgP + *p);
if (RemovePseudoInstalledPkg(P, recheck) == true) {
++killed;
++Done;
}
recheck.erase(p++);
}
/* Okay, we have killed a great amount of pseudopackages -
we have killed so many that we have now arch "all" packages
without an installed pseudo package, but we NEED an installed
pseudo package, so we will search now for a pseudo package
we can install without breaking everything. */
for (GrpIterator G = Cache->GrpBegin(); G.end() != true; ++G)
{
PkgIterator P = G.FindPkg("all");
if (P.end() == true)
continue;
if (P->CurrentVer == 0)
continue;
bool installed = false;
for (P = G.FindPkg("any"); P.end() != true; P = G.NextPkg(P))
{
if (strcmp(P.Arch(), "all") == 0)
continue;
if (P->CurrentVer == 0)
continue;
installed = true;
break;
}
if (installed == false)
recheck.insert(G.Index());
}
while (recheck.empty() != true)
{
std::set<unsigned long>::const_iterator g = recheck.begin();
unsigned long const G = *g;
recheck.erase(g);
if (unlikely(ReInstallPseudoForGroup(G, recheck) == false))
_error->Warning(_("Internal error, group '%s' has no installable pseudo package"), GrpIterator(*Cache, Cache->GrpP + G).Name());
}
}
if (Prog != 0)
@ -929,80 +761,6 @@ void pkgDepCache::Update(OpProgress *Prog)
readStateFile(Prog);
}
/*}}}*/
// DepCache::ReInstallPseudoForGroup - MultiArch helper for Update() /*{{{*/
// ---------------------------------------------------------------------
/* RemovePseudoInstalledPkg() is very successful. It even kills packages
to an amount that no pseudo package is left, but we need a pseudo package
for upgrading senarios so we need to reinstall one pseudopackage which
doesn't break everything. Thankfully we can't have architecture depending
negative dependencies so this problem is already eliminated */
bool pkgDepCache::ReInstallPseudoForGroup(pkgCache::PkgIterator const &P, std::set<unsigned long> &recheck)
{
if (P->CurrentVer != 0)
return true;
// recursive call for packages which provide this package
for (pkgCache::PrvIterator Prv = P.ProvidesList(); Prv.end() != true; ++Prv)
ReInstallPseudoForGroup(Prv.OwnerPkg(), recheck);
// check if we actually need to look at this group
unsigned long const G = P->Group;
std::set<unsigned long>::const_iterator Pi = recheck.find(G);
if (Pi == recheck.end())
return true;
recheck.erase(Pi); // remove here, so we can't fall into an endless loop
if (unlikely(ReInstallPseudoForGroup(G, recheck) == false))
{
recheck.insert(G);
return false;
}
return true;
}
bool pkgDepCache::ReInstallPseudoForGroup(unsigned long const &G, std::set<unsigned long> &recheck)
{
std::vector<std::string> static const Archs = APT::Configuration::getArchitectures();
pkgCache::GrpIterator Grp(*Cache, Cache->GrpP + G);
if (unlikely(Grp.end() == true))
return false;
for (std::vector<std::string>::const_iterator a = Archs.begin();
a != Archs.end(); ++a)
{
pkgCache::PkgIterator P = Grp.FindPkg(*a);
if (P.end() == true)
continue;
pkgCache::VerIterator allV = Grp.FindPkg("all").CurrentVer();
for (VerIterator V = P.VersionList(); V.end() != true; ++V)
{
// search for the same version as the all package
if (allV->Hash != V->Hash || strcmp(allV.VerStr(),V.VerStr()) != 0)
continue;
unsigned char const CurDepState = VersionState(V.DependsList(),DepInstall,DepInstMin,DepInstPolicy);
// If it is broken, try to install dependencies first before retry
if ((CurDepState & DepInstMin) != DepInstMin)
{
for (pkgCache::DepIterator D = V.DependsList(); D.end() != true; ++D)
{
if (D->Type != pkgCache::Dep::PreDepends && D->Type != pkgCache::Dep::Depends)
continue;
ReInstallPseudoForGroup(D.TargetPkg(), recheck);
}
unsigned char const CurDepState = VersionState(V.DependsList(),DepInstall,DepInstMin,DepInstPolicy);
// if package ist still broken… try another arch
if ((CurDepState & DepInstMin) != DepInstMin)
break;
}
// dependencies satisfied: reinstall the package
RemoveSizes(P);
RemoveStates(P);
P->CurrentVer = V.Index();
PkgState[P->ID].InstallVer = V;
AddStates(P);
Update(P);
AddSizes(P);
return true;
}
}
return false;
}
/*}}}*/
// DepCache::Update - Update the deps list of a package /*{{{*/
// ---------------------------------------------------------------------
/* This is a helper for update that only does the dep portion of the scan.
@ -1165,18 +923,6 @@ void pkgDepCache::MarkDelete(PkgIterator const &Pkg, bool rPurge,
Update(Pkg);
AddSizes(Pkg);
// if we remove the pseudo package, we also need to remove the "real"
if (Pkg->CurrentVer != 0 && Pkg.CurrentVer().Pseudo() == true)
MarkDelete(Pkg.Group().FindPkg("all"), rPurge, Depth+1, FromUser);
else if (rPurge == true && Pkg->CurrentVer == 0 &&
Pkg->CurrentState != pkgCache::State::NotInstalled &&
strcmp(Pkg.Arch(), "all") != 0)
{
PkgIterator const allPkg = Pkg.Group().FindPkg("all");
if (allPkg.end() == false && allPkg->CurrentVer == 0 &&
allPkg->CurrentState != pkgCache::State::NotInstalled)
MarkDelete(allPkg, rPurge, Depth+1, FromUser);
}
}
/*}}}*/
// DepCache::IsDeleteOk - check if it is ok to remove this package /*{{{*/
@ -1276,10 +1022,6 @@ void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst,
Update(Pkg);
AddSizes(Pkg);
// always trigger the install of the all package for a pseudo package
if (P.CandidateVerIter(*Cache).Pseudo() == true)
MarkInstall(Pkg.Group().FindPkg("all"), AutoInst, Depth, FromUser, ForceImportantDeps);
if (AutoInst == false)
return;
@ -1499,7 +1241,7 @@ void pkgDepCache::SetReInstall(PkgIterator const &Pkg,bool To)
AddStates(Pkg);
AddSizes(Pkg);
if (unlikely(Pkg.CurrentVer().end() == true) || Pkg.CurrentVer().Pseudo() == false)
if (unlikely(Pkg.CurrentVer().end() == true))
return;
SetReInstall(Pkg.Group().FindPkg("all"), To);
@ -1510,7 +1252,6 @@ void pkgDepCache::SetReInstall(PkgIterator const &Pkg,bool To)
/* */
void pkgDepCache::SetCandidateVersion(VerIterator TargetVer, bool const &Pseudo)
{
pkgCache::PkgIterator Pkg = TargetVer.ParentPkg();
StateCache &P = PkgState[Pkg->ID];
@ -1531,27 +1272,6 @@ void pkgDepCache::SetCandidateVersion(VerIterator TargetVer, bool const &Pseudo)
Update(Pkg);
AddSizes(Pkg);
if (TargetVer.Pseudo() == false || Pseudo == false)
return;
// the version was pseudo: set all other pseudos also
pkgCache::GrpIterator Grp = Pkg.Group();
for (Pkg = Grp.FindPkg("any"); Pkg.end() == false; ++Pkg)
{
StateCache &P = PkgState[Pkg->ID];
if (TargetVer.SimilarVer(P.CandidateVerIter(*this)) == true ||
(P.CandidateVerIter(*this).Pseudo() == false &&
strcmp(Pkg.Arch(), "all") != 0))
continue;
for (pkgCache::VerIterator Ver = Pkg.VersionList(); Ver.end() == false; ++Ver)
{
if (TargetVer.SimilarVer(Ver) == false)
continue;
SetCandidateVersion(Ver, false);
break;
}
}
}
/*}}}*/
// DepCache::SetCandidateRelease - Change the candidate version /*{{{*/
@ -1967,28 +1687,6 @@ void pkgDepCache::MarkPackage(const pkgCache::PkgIterator &pkg,
if(ver.end() == true)
return;
// If the version belongs to a Multi-Arch all package
// we will mark all others in this Group with this version also
if (ver->MultiArch == pkgCache::Version::All &&
strcmp(ver.Arch(true), "all") == 0)
{
GrpIterator G = pkg.Group();
const char* const VerStr = ver.VerStr();
for (PkgIterator P = G.FindPkg("any");
P.end() != true; P = G.NextPkg(P))
{
for (VerIterator V = P.VersionList();
V.end() != true; ++V)
{
if (ver->Hash != V->Hash ||
strcmp(VerStr, V.VerStr()) != 0)
continue;
MarkPackage(P, V, follow_recommends, follow_suggests);
break;
}
}
}
for(DepIterator d = ver.DependsList(); !d.end(); ++d)
{
if(d->Type == Dep::Depends ||

8
apt-pkg/depcache.h

@ -395,6 +395,7 @@ class pkgDepCache : protected pkgCache::Namespace
bool ForceImportantDeps = false);
void SetReInstall(PkgIterator const &Pkg,bool To);
// FIXME: Remove the unused boolean parameter on abi break
void SetCandidateVersion(VerIterator TargetVer, bool const &Pseudo = true);
bool SetCandidateRelease(pkgCache::VerIterator TargetVer,
std::string const &TargetRel);
@ -481,9 +482,10 @@ class pkgDepCache : protected pkgCache::Namespace
private:
// Helper for Update(OpProgress) to remove pseudoinstalled arch all packages
bool RemovePseudoInstalledPkg(PkgIterator &Pkg, std::set<unsigned long> &recheck);
bool ReInstallPseudoForGroup(unsigned long const &Grp, std::set<unsigned long> &recheck);
bool ReInstallPseudoForGroup(pkgCache::PkgIterator const &P, std::set<unsigned long> &recheck);
// FIXME: they are private so shouldn't affect abi, but just in case…
__deprecated bool RemovePseudoInstalledPkg(PkgIterator &Pkg, std::set<unsigned long> &recheck) { return true; };
__deprecated bool ReInstallPseudoForGroup(unsigned long const &Grp, std::set<unsigned long> &recheck) { return true; };
__deprecated bool ReInstallPseudoForGroup(pkgCache::PkgIterator const &P, std::set<unsigned long> &recheck) { return true; };
};
#endif

4
apt-pkg/orderlist.cc

@ -128,10 +128,6 @@ bool pkgOrderList::IsMissing(PkgIterator Pkg)
if (FileList[Pkg->ID].empty() == false)
return false;
// Missing Pseudo packages are missing if the real package is missing
if (pkgCache::VerIterator(Cache, Cache[Pkg].CandidateVer).Pseudo() == true)
return IsMissing(Pkg.Group().FindPkg("all"));
return true;
}
/*}}}*/

35
apt-pkg/packagemanager.cc

@ -81,9 +81,6 @@ bool pkgPackageManager::GetArchives(pkgAcquire *Owner,pkgSourceList *Sources,
if (List->IsNow(Pkg) == false)
continue;
if (pkgCache::VerIterator(Cache, Cache[Pkg].CandidateVer).Pseudo() == true)
continue;
new pkgAcqArchive(Owner,Sources,Recs,Cache[Pkg].InstVerIter(Cache),
FileNames[Pkg->ID]);
}
@ -281,9 +278,7 @@ bool pkgPackageManager::ConfigureAll()
{
PkgIterator Pkg(Cache,*I);
if (ConfigurePkgs == true &&
pkgCache::VerIterator(Cache, Cache[Pkg].CandidateVer).Pseudo() == false &&
Configure(Pkg) == false)
if (ConfigurePkgs == true && Configure(Pkg) == false)
return false;
List->Flag(Pkg,pkgOrderList::Configured,pkgOrderList::States);
@ -318,9 +313,7 @@ bool pkgPackageManager::SmartConfigure(PkgIterator Pkg)
{
PkgIterator Pkg(Cache,*I);
if (ConfigurePkgs == true &&
pkgCache::VerIterator(Cache, Cache[Pkg].CandidateVer).Pseudo() == false &&
Configure(Pkg) == false)
if (ConfigurePkgs == true && Configure(Pkg) == false)
return false;
List->Flag(Pkg,pkgOrderList::Configured,pkgOrderList::States);
@ -473,10 +466,7 @@ bool pkgPackageManager::SmartRemove(PkgIterator Pkg)
List->Flag(Pkg,pkgOrderList::Configured,pkgOrderList::States);
if (pkgCache::VerIterator(Cache, Cache[Pkg].CandidateVer).Pseudo() == false)
return Remove(Pkg,(Cache[Pkg].iFlags & pkgDepCache::Purge) == pkgDepCache::Purge);
else
return SmartRemove(Pkg.Group().FindPkg("all"));
return Remove(Pkg,(Cache[Pkg].iFlags & pkgDepCache::Purge) == pkgDepCache::Purge);
return true;
}
/*}}}*/
@ -592,22 +582,9 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg)
P.end() == false; P++)
CheckRConflicts(Pkg,P.ParentPkg().RevDependsList(),P.ProvideVersion());
if (pkgCache::VerIterator(Cache, Cache[Pkg].CandidateVer).Pseudo() == false)
{
if(Install(Pkg,FileNames[Pkg->ID]) == false)
return false;
} else {
// Pseudo packages will not be unpacked - instead we will do this
// for the "real" package, but only once and if it is already
// configured we don't need to unpack it again…
PkgIterator const P = Pkg.Group().FindPkg("all");
if (List->IsFlag(P,pkgOrderList::UnPacked) != true &&
List->IsFlag(P,pkgOrderList::Configured) != true &&
P.State() != pkgCache::PkgIterator::NeedsNothing) {
if (SmartUnPack(P) == false)
return false;
}
}
if(Install(Pkg,FileNames[Pkg->ID]) == false)
return false;
List->Flag(Pkg,pkgOrderList::UnPacked,pkgOrderList::States);
// Perform immedate configuration of the package.

18
apt-pkg/pkgcache.cc

@ -737,22 +737,8 @@ bool pkgCache::VerIterator::Automatic() const
return false;
}
/*}}}*/
// VerIterator::Pseudo - Check if this version is a pseudo one /*{{{*/
// ---------------------------------------------------------------------
/* Sometimes you have the need to express dependencies with versions
which doesn't really exist or exist multiply times for "different"
packages. We need these versions for dependency resolution but they
are a problem everytime we need to download/install something. */
bool pkgCache::VerIterator::Pseudo() const
{
if (S->MultiArch == pkgCache::Version::All &&
strcmp(Arch(true),"all") != 0)
{
GrpIterator const Grp = ParentPkg().Group();
return (Grp->LastPackage != Grp->FirstPackage);
}
return false;
}
// VerIterator::Pseudo - deprecated no-op method /*{{{*/
bool pkgCache::VerIterator::Pseudo() const { return false; }
/*}}}*/
// VerIterator::NewestFile - Return the newest file version relation /*{{{*/
// ---------------------------------------------------------------------

4
apt-pkg/pkgcache.h

@ -505,8 +505,8 @@ struct pkgCache::Version
Foreign means that this version can fulfill dependencies even
if it is built for another architecture as the requester.
Same indicates that builds for different architectures can
be co-installed on the system and All is the marker for a
version with the Architecture: all. */
be co-installed on the system */
// FIXME: remove All on abi break
enum {None, All, Foreign, Same, Allowed} MultiArch;
/** \brief references all the PackageFile's that this version came from

49
apt-pkg/pkgcachegen.cc

@ -178,23 +178,17 @@ bool pkgCacheGenerator::MergeList(ListParser &List,
if (PackageName.empty() == true)
return false;
/* As we handle Arch all packages as architecture bounded
we add all information to every (simulated) arch package */
std::vector<string> genArch;
if (List.ArchitectureAll() == true) {
genArch = APT::Configuration::getArchitectures();
if (genArch.size() != 1)
genArch.push_back("all");
} else
genArch.push_back(List.Architecture());
for (std::vector<string>::const_iterator arch = genArch.begin();
arch != genArch.end(); ++arch)
{
/* Treat Arch all packages as the same as the native arch. */
string Arch;
if (List.ArchitectureAll() == true)
Arch = _config->Find("APT::Architecture");
else
Arch = List.Architecture();
// Get a pointer to the package structure
pkgCache::PkgIterator Pkg;
Dynamic<pkgCache::PkgIterator> DynPkg(Pkg);
if (NewPackage(Pkg, PackageName, *arch) == false)
if (NewPackage(Pkg, PackageName, Arch) == false)
return _error->Error(_("Error occurred while processing %s (NewPackage)"),PackageName.c_str());
Counter++;
if (Counter % 100 == 0 && Progress != 0)
@ -351,7 +345,6 @@ bool pkgCacheGenerator::MergeList(ListParser &List,
if ((*LastDesc == 0 && _error->PendingError()) || NewFileDesc(Desc,List) == false)
return _error->Error(_("Error occurred while processing %s (NewFileDesc2)"),PackageName.c_str());
}
}
FoundFileDeps |= List.HasFileDeps();
@ -650,10 +643,7 @@ bool pkgCacheGenerator::FinishCache(OpProgress *Progress)
- MultiArch: same Co-Installable if they have the same version
- Architecture: all Need to be Co-Installable for internal reasons
- All others conflict with all other group members */
bool const coInstall = ((V->MultiArch == pkgCache::Version::All && strcmp(Arch, "all") != 0) ||
V->MultiArch == pkgCache::Version::Same);
if (V->MultiArch == pkgCache::Version::All && allPkg.end() == true)
allPkg = G.FindPkg("all");
bool const coInstall = (V->MultiArch == pkgCache::Version::Same);
for (vector<string>::const_iterator A = archs.begin(); A != archs.end(); ++A)
{
if (*A == Arch)
@ -675,24 +665,11 @@ bool pkgCacheGenerator::FinishCache(OpProgress *Progress)
NewDepends(D, V, V.VerStr(),
pkgCache::Dep::NotEquals, pkgCache::Dep::DpkgBreaks,
OldDepLast);
if (V->MultiArch == pkgCache::Version::All)
{
// Depend on ${self}:all which does depend on nothing
NewDepends(allPkg, V, V.VerStr(),
pkgCache::Dep::Equals, pkgCache::Dep::Depends,
OldDepLast);
}
} else {
// Conflicts: ${self}:other
if (strcmp(Arch, "all") == 0) {
NewDepends(D, V, V.VerStr(),
pkgCache::Dep::NotEquals, pkgCache::Dep::Conflicts,
OldDepLast);
} else {
NewDepends(D, V, "",
pkgCache::Dep::NoOp, pkgCache::Dep::Conflicts,
OldDepLast);
}
NewDepends(D, V, "",
pkgCache::Dep::NoOp, pkgCache::Dep::Conflicts,
OldDepLast);
}
}
}
@ -810,7 +787,7 @@ bool pkgCacheGenerator::ListParser::NewProvides(pkgCache::VerIterator &Ver,
pkgCache &Cache = Owner->Cache;
// We do not add self referencing provides
if (Ver.ParentPkg().Name() == PkgName && PkgArch == Ver.Arch(true))
if (Ver.ParentPkg().Name() == PkgName && PkgArch == Ver.Arch())
return true;
// Get a structure

7
apt-pkg/policy.cc

@ -152,13 +152,6 @@ pkgCache::VerIterator pkgPolicy::GetCandidateVer(pkgCache::PkgIterator const &Pk
{
/* Lets see if this version is the installed version */
bool instVer = (Pkg.CurrentVer() == Ver);
if (Ver.Pseudo() == true && instVer == false)
{
pkgCache::PkgIterator const allPkg = Ver.ParentPkg().Group().FindPkg("all");
if (allPkg->CurrentVer != 0 && allPkg.CurrentVer()->Hash == Ver->Hash &&
strcmp(allPkg.CurVersion(), Ver.VerStr()) == 0)
instVer = true;
}
for (pkgCache::VerFileIterator VF = Ver.FileList(); VF.end() == false; VF++)
{

10
cmdline/apt-cache.cc

@ -1519,7 +1519,6 @@ bool Policy(CommandLine &CmdL)
return true;
}
string const myArch = _config->Find("APT::Architecture");
char const * const msgInstalled = _(" Installed: ");
char const * const msgCandidate = _(" Candidate: ");
short const InstalledLessCandidate =
@ -1532,14 +1531,8 @@ bool Policy(CommandLine &CmdL)
// Print out detailed information for each package
APT::CacheSetHelper helper(true, GlobalError::NOTICE);
APT::PackageSet pkgset = APT::PackageSet::FromCommandLine(CacheFile, CmdL.FileList + 1, helper);
for (APT::PackageSet::const_iterator I = pkgset.begin(); I != pkgset.end(); ++I)
for (APT::PackageSet::const_iterator Pkg = pkgset.begin(); Pkg != pkgset.end(); ++Pkg)
{
pkgCache::PkgIterator Pkg = I.Group().FindPkg("any");
for (; Pkg.end() != true; Pkg = I.Group().NextPkg(Pkg)) {
if (strcmp(Pkg.Arch(),"all") == 0)
continue;
cout << Pkg.FullName(true) << ":" << endl;
// Installed version
@ -1588,7 +1581,6 @@ bool Policy(CommandLine &CmdL)
Indx->Describe(true).c_str());
}
}
}
}
return true;

13
cmdline/apt-get.cc

@ -382,8 +382,6 @@ void ShowNew(ostream &out,CacheFile &Cache)
{
pkgCache::PkgIterator I(Cache,Cache.List[J]);
if (Cache[I].NewInstall() == true) {
if (Cache[I].CandidateVerIter(Cache).Pseudo() == true)
continue;
List += I.FullName(true) + " ";
VersionsList += string(Cache[I].CandVersion) + "\n";
}
@ -406,8 +404,6 @@ void ShowDel(ostream &out,CacheFile &Cache)
pkgCache::PkgIterator I(Cache,Cache.List[J]);
if (Cache[I].Delete() == true)
{
if (Cache[I].CandidateVerIter(Cache).Pseudo() == true)
continue;
if ((Cache[I].iFlags & pkgDepCache::Purge) == pkgDepCache::Purge)
List += I.FullName(true) + "* ";
else
@ -456,8 +452,6 @@ void ShowUpgraded(ostream &out,CacheFile &Cache)
// Not interesting
if (Cache[I].Upgrade() == false || Cache[I].NewInstall() == true)
continue;
if (Cache[I].CandidateVerIter(Cache).Pseudo() == true)
continue;
List += I.FullName(true) + " ";
VersionsList += string(Cache[I].CurVersion) + " => " + Cache[I].CandVersion + "\n";
@ -479,8 +473,6 @@ bool ShowDowngraded(ostream &out,CacheFile &Cache)
// Not interesting
if (Cache[I].Downgrade() == false || Cache[I].NewInstall() == true)
continue;
if (Cache[I].CandidateVerIter(Cache).Pseudo() == true)
continue;
List += I.FullName(true) + " ";
VersionsList += string(Cache[I].CurVersion) + " => " + Cache[I].CandVersion + "\n";
@ -584,9 +576,6 @@ void Stats(ostream &out,pkgDepCache &Dep)
unsigned long ReInstall = 0;
for (pkgCache::PkgIterator I = Dep.PkgBegin(); I.end() == false; I++)
{
if (pkgCache::VerIterator(Dep, Dep[I].CandidateVer).Pseudo() == true)
continue;
if (Dep[I].NewInstall() == true)
Install++;
else
@ -1916,8 +1905,6 @@ bool DoInstall(CommandLine &CmdL)
if ((*Cache)[I].Install() == false)
continue;
pkgCache::VerIterator Cand = Cache[I].CandidateVerIter(Cache);
if (Cand.Pseudo() == true)
continue;
if (verset[MOD_INSTALL].find(Cand) != verset[MOD_INSTALL].end())
continue;

2
debian/apt.symbols

@ -277,7 +277,7 @@ libapt-pkg.so.4.10 libapt-pkg4.10
(c++)"pkgDepCache::DefaultRootSetFunc::InRootSet(pkgCache::PkgIterator const&)@Base" 0.8.0
(c++)"pkgDepCache::DefaultRootSetFunc::~DefaultRootSetFunc()@Base" 0.8.0
(c++)"pkgDepCache::MarkFollowsSuggests()@Base" 0.8.0
(c++)"pkgDepCache::SetCandidateVersion(pkgCache::VerIterator, bool const&)@Base" 0.8.0
(c++)"pkgDepCache::SetCandidateVersion(pkgCache::VerIterator)@Base" 0.8.0
(c++)"pkgDepCache::MarkFollowsRecommends()@Base" 0.8.0
(c++)"pkgDepCache::ReInstallPseudoForGroup(pkgCache::PkgIterator const&, std::set<unsigned long, std::less<unsigned long>, std::allocator<unsigned long> >&)@Base" 0.8.0
(c++)"pkgDepCache::ReInstallPseudoForGroup(unsigned long const&, std::set<unsigned long, std::less<unsigned long>, std::allocator<unsigned long> >&)@Base" 0.8.0

6
debian/changelog

@ -32,8 +32,12 @@ apt (0.8.11.6) UNRELEASED; urgency=low
* apt-pkg/deb/dpkgpm.cc:
- make sure that for multiarch packages, we are passing the full
qualified package name to dpkg for removals. (Closes: #614298)
* Remove the "pseudopackage" handling of Architecture: all packages for
Multi-Arch; instead, Arch: all packages only satisfy dependencies for
the native arch, except where the Arch: all package is declared
Multi-Arch: foreign. (Closes: #613584)
-- David Kalnischkies <kalnischkies@gmail.com> Mon, 07 Mar 2011 22:46:24 +0100
-- David Kalnischkies <kalnischkies@gmail.com> Tue, 08 Mar 2011 19:20:56 +0100
apt (0.8.11.5) unstable; urgency=low

4
test/integration/test-bug-549968-install-depends-of-not-installed

@ -22,5 +22,5 @@ Package extracoolstuff is not installed, so not removed
The following NEW packages will be installed:
coolstuff
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Inst coolstuff (1.0 unstable [all])
Conf coolstuff (1.0 unstable [all])' aptget install coolstuff extracoolstuff- -o Debug::pkgDepCache::Marker=1 -s
Inst coolstuff (1.0 unstable [i386])
Conf coolstuff (1.0 unstable [i386])' aptget install coolstuff extracoolstuff- -o Debug::pkgDepCache::Marker=1 -s

8
test/integration/test-bug-590438-broken-provides-thanks-to-remove-order

@ -62,13 +62,13 @@ predependsgawk2() {
echo "$pkgbasefile
Pre-Depends: $1
" >> rootdir/var/lib/dpkg/status
testequalor2 "Inst coolstuff (1-1 localhost [all])
Conf coolstuff (1-1 localhost [all])
testequalor2 "Inst coolstuff (1-1 localhost [i386])
Conf coolstuff (1-1 localhost [i386])
Inst gawk2 (1:3.1.7.dfsg-5 localhost [i386])
Conf gawk2 (1:3.1.7.dfsg-5 localhost [i386])
Remv mawk [1.3.3-15]" "Inst coolstuff (1-1 localhost [all])
Remv mawk [1.3.3-15]" "Inst coolstuff (1-1 localhost [i386])
Inst gawk2 (1:3.1.7.dfsg-5 localhost [i386])
Conf coolstuff (1-1 localhost [all])
Conf coolstuff (1-1 localhost [i386])
Conf gawk2 (1:3.1.7.dfsg-5 localhost [i386])
Remv mawk [1.3.3-15]" aptget install gawk2 mawk- -sqq -o PreDepends=$(echo "$1" | sed 's/ //g')
}

16
test/integration/test-bug-593360-modifiers-in-names

@ -36,29 +36,29 @@ Building dependency tree...
The following NEW packages will be installed:
apt
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Inst apt (0.8.8 localhost [all])
Conf apt (0.8.8 localhost [all])' aptget install apt -s
Inst apt (0.8.8 localhost [i386])
Conf apt (0.8.8 localhost [i386])' aptget install apt -s
testequal 'Reading package lists...
Building dependency tree...
The following NEW packages will be installed:
apt+
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Inst apt+ (0.8.8 localhost [all])
Conf apt+ (0.8.8 localhost [all])' aptget install apt+ -s
Inst apt+ (0.8.8 localhost [i386])
Conf apt+ (0.8.8 localhost [i386])' aptget install apt+ -s
testequal 'Reading package lists...
Building dependency tree...
The following NEW packages will be installed:
apt+
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Inst apt+ (0.8.8 localhost [all])
Conf apt+ (0.8.8 localhost [all])' aptget install apt++ -s
Inst apt+ (0.8.8 localhost [i386])
Conf apt+ (0.8.8 localhost [i386])' aptget install apt++ -s
testequal 'Reading package lists...
Building dependency tree...
The following NEW packages will be installed:
apt+
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Inst apt+ (0.8.8 localhost [all])
Conf apt+ (0.8.8 localhost [all])' aptget purge apt++ -s
Inst apt+ (0.8.8 localhost [i386])
Conf apt+ (0.8.8 localhost [i386])' aptget purge apt++ -s

77
test/integration/test-bug-612099-multiarch-conflicts

@ -59,29 +59,27 @@ Inst foobar:amd64 (1.0 stable [amd64])
Conf libc6:amd64 (1.0 stable [amd64])
Conf foobar:amd64 (1.0 stable [amd64])' aptget install foobar:amd64 -st stable
# FIXME: libc6:i386 is installed, we are switching to libc6:all
testequal 'Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
libc6
The following NEW packages will be installed:
foobar libc6
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Inst libc6 (2.0 testing, testing [all])
foobar
The following packages will be upgraded:
libc6
1 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Inst libc6 [1.0] (2.0 testing [i386])
Inst foobar (1.0 stable [i386])
Conf libc6 (2.0 testing, testing [all])
Conf libc6 (2.0 testing [i386])
Conf foobar (1.0 stable [i386])' aptget install foobar/stable libc6 -st testing
# FIXME: libc6:i386 is installed, we are switching to libc6:all
testequal 'Reading package lists...
Building dependency tree...
Reading state information...
The following NEW packages will be installed:
The following packages will be upgraded:
libc6
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Inst libc6 (2.0 testing, testing [all])
Conf libc6 (2.0 testing, testing [all])' aptget upgrade -t testing -s
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Inst libc6 [1.0] (2.0 testing [i386])
Conf libc6 (2.0 testing [i386])' aptget upgrade -t testing -s
aptget upgrade -y -qq 2>&1 > /dev/null
testdpkginstalled libc6
@ -91,31 +89,34 @@ Reading state information...
The following NEW packages will be installed:
foobar
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Inst foobar (1.0 stable [i386]) []
Inst foobar (1.0 stable [i386])
Conf foobar (1.0 stable [i386])' aptget install foobar/stable -st testing
testequal 'Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
libc6:amd64
The following packages will be REMOVED:
libc6
The following NEW packages will be installed:
foobar:amd64
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
foobar:amd64 libc6:amd64
0 upgraded, 2 newly installed, 1 to remove and 0 not upgraded.
Remv libc6 [2.0]
Inst libc6:amd64 (1.0 stable [amd64])
Inst foobar:amd64 (1.0 stable [amd64])
Conf libc6:amd64 (1.0 stable [amd64])
Conf foobar:amd64 (1.0 stable [amd64])' aptget install foobar:amd64/stable -st testing
# FIXME: the display is a strange (its a downgrade), but the handling itself correct
testequal "Reading package lists...
Building dependency tree...
Reading state information...
Selected version '1.0' (stable [i386]) for 'libc6'
The following packages will be REMOVED:
The following packages will be DOWNGRADED:
libc6
The following NEW packages will be installed:
libc6
0 upgraded, 1 newly installed, 2 to remove and 0 not upgraded.
Remv libc6 [2.0]
Inst libc6 (1.0 stable [i386])
0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 0 not upgraded.
Inst libc6 [2.0] (1.0 stable [i386])
Conf libc6 (1.0 stable [i386])" aptget install libc6/stable -s -q=0
@ -164,30 +165,25 @@ Conf libc6-same:amd64 (1.0 stable [amd64])' aptget install libc6-same:amd64 -s -
# FIXME: We should test installing libc6-same:amd64 here, but dpkg doesn't allow it currently
# FIXME: upgrade any to all as above
testequal 'Reading package lists...
Building dependency tree...
Reading state information...
The following NEW packages will be installed:
The following packages will be upgraded:
libc6-same
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Inst libc6-same (2.0 testing, testing [all])
Conf libc6-same (2.0 testing, testing [all])' aptget upgrade -t testing -s
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Inst libc6-same [1.0] (2.0 testing [i386])
Conf libc6-same (2.0 testing [i386])' aptget upgrade -t testing -s
aptget upgrade -y -qq 2>&1 > /dev/null
testdpkginstalled libc6-same
# FIXME: the display is a strange (its a downgrade), but the handling itself correct
testequal "Reading package lists...
Building dependency tree...
Reading state information...
Selected version '1.0' (stable [i386]) for 'libc6-same'
The following packages will be REMOVED:
The following packages will be DOWNGRADED:
libc6-same
The following NEW packages will be installed:
libc6-same
0 upgraded, 1 newly installed, 2 to remove and 0 not upgraded.
Remv libc6-same [2.0]
Inst libc6-same (1.0 stable [i386])
0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 0 not upgraded.
Inst libc6-same [2.0] (1.0 stable [i386])
Conf libc6-same (1.0 stable [i386])" aptget install libc6-same/stable -s -q=0
testequal 'Reading package lists...
@ -196,14 +192,21 @@ Reading state information...
The following NEW packages will be installed:
foobar-same
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Inst foobar-same (1.0 stable [i386]) []
Inst foobar-same (1.0 stable [i386])
Conf foobar-same (1.0 stable [i386])' aptget install foobar-same/stable -st testing
testequal 'Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
libc6-same:amd64
The following packages will be REMOVED:
libc6-same
The following NEW packages will be installed:
foobar-same:amd64
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
foobar-same:amd64 libc6-same:amd64
0 upgraded, 2 newly installed, 1 to remove and 0 not upgraded.
Remv libc6-same [2.0]
Inst libc6-same:amd64 (1.0 stable [amd64])
Inst foobar-same:amd64 (1.0 stable [amd64])
Conf libc6-same:amd64 (1.0 stable [amd64])
Conf foobar-same:amd64 (1.0 stable [amd64])' aptget install foobar-same:amd64/stable -st testing

30
test/integration/test-release-candidate-switching

@ -95,7 +95,7 @@ E: Trivial Only specified but this is not a trivial operation." aptget install a
testequal "Reading package lists...
Building dependency tree...
Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok'
Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because of 'amarok'
Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-common' because of 'amarok'
Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-utils' because of 'amarok'
The following extra packages will be installed:
amarok-common (2.3.2-2+exp)
@ -117,7 +117,7 @@ E: Trivial Only specified but this is not a trivial operation." aptget install a
testequal "Reading package lists...
Building dependency tree...
Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-null'
Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because of 'amarok-null'
Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-common' because of 'amarok-null'
Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-utils' because of 'amarok-null'
The following extra packages will be installed:
amarok-common (2.3.2-2+exp)
@ -140,7 +140,7 @@ E: Trivial Only specified but this is not a trivial operation." aptget install a
testequal "Reading package lists...
Building dependency tree...
Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok'
Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because of 'amarok'
Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-common' because of 'amarok'
Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-utils' because of 'amarok'
Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-null'
The following extra packages will be installed: