delete List;
List = new pkgOrderList(&Cache);
- static bool const NoImmConfigure = !_config->FindB("APT::Immediate-Configure",true);
+ NoImmConfigure = !_config->FindB("APT::Immediate-Configure",true);
+ ImmConfigureAll = _config->FindB("APT::Immediate-Configure-All",false);
+
+ if (Debug && ImmConfigureAll)
+ clog << "CreateOrderList(): Adding Immediate flag for all packages because of APT::Immediate-Configure-All" << endl;
// Generate the list of affected packages and sort it
- for (PkgIterator I = Cache.PkgBegin(); I.end() == false; I++)
+ for (PkgIterator I = Cache.PkgBegin(); I.end() == false; ++I)
{
// Ignore no-version packages
if (I->VersionList == 0)
bool const ConfigurePkgs = (conf == "all");
// Perform the configuring
- for (pkgOrderList::iterator I = OList.begin(); I != OList.end(); I++)
+ for (pkgOrderList::iterator I = OList.begin(); I != OList.end(); ++I)
{
PkgIterator Pkg(Cache,*I);
+
+ /* Check if the package has been configured, this can happen if SmartConfigure
+ calls its self */
+ if (List->IsFlag(Pkg,pkgOrderList::Configured)) continue;
- if (ConfigurePkgs == true && Configure(Pkg) == false)
+ if (ConfigurePkgs == true && SmartConfigure(Pkg, 0) == false) {
+ if (ImmConfigureAll)
+ _error->Error(_("Could not perform immediate configuration on '%s'. "
+ "Please see man 5 apt.conf under APT::Immediate-Configure for details. (%d)"),Pkg.Name(),1);
+ else
+ _error->Error("Internal error, packages left unconfigured. %s",Pkg.Name());
return false;
+ }
List->Flag(Pkg,pkgOrderList::Configured,pkgOrderList::States);
}
static std::string const conf = _config->Find("PackageManager::Configure","all");
static bool const ConfigurePkgs = (conf == "all" || conf == "smart");
- if (ConfigurePkgs == true)
- if (OList.OrderConfigure() == false)
- return false;
+ if (List->IsFlag(Pkg,pkgOrderList::Configured))
+ return _error->Error("Internal configure error on '%s'. ",Pkg.Name(),1);
- // Perform the configuring
- for (pkgOrderList::iterator I = OList.begin(); I != OList.end(); ++I)
- {
- PkgIterator Pkg(Cache,*I);
-
- if (ConfigurePkgs == true && Configure(Pkg) == false)
- return false;
-
- List->Flag(Pkg,pkgOrderList::Configured,pkgOrderList::States);
- }
+ if (ConfigurePkgs == true && Configure(Pkg) == false)
+ return false;
-
++
+ List->Flag(Pkg,pkgOrderList::Configured,pkgOrderList::States);
- if (Cache[Pkg].InstVerIter(Cache)->MultiArch == pkgCache::Version::Same)
+ if ((Cache[Pkg].InstVerIter(Cache)->MultiArch & pkgCache::Version::Same) == pkgCache::Version::Same)
for (PkgIterator P = Pkg.Group().PackageList();
P.end() == false; P = Pkg.Group().NextPkg(P))
{
return _error->Error("Couldn't configure pre-depend %s for %s, "
"probably a dependency cycle.",
End.TargetPkg().Name(),Pkg.Name());
- Start++;
+ ++Start;
}
- else
+ else
break;
}
// Check for reverse conflicts.
if (CheckRConflicts(Pkg,Pkg.RevDependsList(),
instVer.VerStr()) == false)
- return false;
+ return false;
for (PrvIterator P = instVer.ProvidesList();
- P.end() == false; P++)
- CheckRConflicts(Pkg,P.ParentPkg().RevDependsList(),P.ProvideVersion());
+ P.end() == false; ++P)
+ if (Pkg->Group != P.OwnerPkg()->Group)
+ CheckRConflicts(Pkg,P.ParentPkg().RevDependsList(),P.ProvideVersion());
- if (PkgLoop) return true;
++ if (PkgLoop)
++ return true;
+
List->Flag(Pkg,pkgOrderList::UnPacked,pkgOrderList::States);
- if (instVer->MultiArch == pkgCache::Version::Same)
+ if (Immediate == true && instVer->MultiArch == pkgCache::Version::Same)
+ {
+ /* Do lockstep M-A:same unpacking in two phases:
+ First unpack all installed architectures, then the not installed.
+ This way we avoid that M-A: enabled packages are installed before
+ their older non-M-A enabled packages are replaced by newer versions */
+ bool const installed = Pkg->CurrentVer != 0;
+ if (installed == true && Install(Pkg,FileNames[Pkg->ID]) == false)
+ return false;
+ for (PkgIterator P = Pkg.Group().PackageList();
+ P.end() == false; P = Pkg.Group().NextPkg(P))
+ {
+ if (P->CurrentVer == 0 || P == Pkg || List->IsFlag(P,pkgOrderList::UnPacked) == true ||
+ Cache[P].InstallVer == 0 || (P.CurrentVer() == Cache[P].InstallVer &&
+ (Cache[Pkg].iFlags & pkgDepCache::ReInstall) != pkgDepCache::ReInstall))
+ continue;
- if (SmartUnPack(P, false) == false)
++ if (SmartUnPack(P, false, Depth + 1) == false)
+ return false;
+ }
+ if (installed == false && Install(Pkg,FileNames[Pkg->ID]) == false)
+ return false;
for (PkgIterator P = Pkg.Group().PackageList();
- P.end() == false; P = Pkg.Group().NextPkg(P))
+ P.end() == false; P = Pkg.Group().NextPkg(P))
{
- if (Pkg == P || List->IsFlag(P,pkgOrderList::UnPacked) == true ||
- Cache[P].InstallVer == 0 || (P.CurrentVer() == Cache[P].InstallVer &&
- (Cache[Pkg].iFlags & pkgDepCache::ReInstall) != pkgDepCache::ReInstall))
- continue;
- SmartUnPack(P, false, Depth + 1);
+ if (P->CurrentVer != 0 || P == Pkg || List->IsFlag(P,pkgOrderList::UnPacked) == true ||
+ Cache[P].InstallVer == 0 || (P.CurrentVer() == Cache[P].InstallVer &&
+ (Cache[Pkg].iFlags & pkgDepCache::ReInstall) != pkgDepCache::ReInstall))
+ continue;
- if (SmartUnPack(P, false) == false)
++ if (SmartUnPack(P, false, Depth + 1) == false)
+ return false;
}
-
- if(Install(Pkg,FileNames[Pkg->ID]) == false)
+ }
+ else if (Install(Pkg,FileNames[Pkg->ID]) == false)
return false;
- // Perform immedate configuration of the package.
- if (Immediate == true &&
- List->IsFlag(Pkg,pkgOrderList::Immediate) == true)
- if (SmartConfigure(Pkg) == false)
- return _error->Error(_("Could not perform immediate configuration on '%s'. "
- "Please see man 5 apt.conf under APT::Immediate-Configure for details. (%d)"),Pkg.Name(),2);
+ if (Immediate == true) {
+ // Perform immedate configuration of the package.
+ if (SmartConfigure(Pkg, Depth + 1) == false)
+ _error->Warning(_("Could not perform immediate configuration on '%s'. "
+ "Please see man 5 apt.conf under APT::Immediate-Configure for details. (%d)"),Pkg.Name(),2);
+ }
return true;
}
clog << "Done ordering" << endl;
bool DoneSomething = false;
- for (pkgOrderList::iterator I = List->begin(); I != List->end(); I++)
+ for (pkgOrderList::iterator I = List->begin(); I != List->end(); ++I)
{
PkgIterator Pkg(Cache,*I);
-
+
if (List->IsNow(Pkg) == false)
{
- if (Debug == true)
- clog << "Skipping already done " << Pkg.Name() << endl;
+ if (!List->IsFlag(Pkg,pkgOrderList::Configured) && !NoImmConfigure) {
+ if (SmartConfigure(Pkg, 0) == false && Debug)
+ _error->Warning("Internal Error, Could not configure %s",Pkg.Name());
+ // FIXME: The above warning message might need changing
+ } else {
+ if (Debug == true)
+ clog << "Skipping already done " << Pkg.Name() << endl;
+ }
continue;
+
}
if (List->IsMissing(Pkg) == true)
+apt (0.8.16~exp6) experimental; urgency=low
+
++ [ Christopher Baines ]
++ * enable APT in unpack/configure ordering to handle loops as well
++ as tight dependencies between immediate packages better
++ enabling also the possibility to mark all packages as immediate
++ (at least Closes: #353290, #540227, #559733, #621836, #639290)
++
+ [ David Kalnischkies ]
+ * [abi-break] Support large files in the complete toolset. Indexes of this
+ size are pretty unlikely for now, but we need it for deb
+ packages which could become bigger than 4GB now (LP: #815895)
+ * merged the debian-sid branch
+
+ [ Michael Vogt ]
+ * bump ABI version
+
+ -- Michael Vogt <mvo@debian.org> Wed, 14 Sep 2011 13:26:23 +0200
+
+apt (0.8.16~exp5) experimental; urgency=low
+
+ * merged the latest debian-sid fixes
+ * apt-pkg/makefile:
+ - install sha256.h compat header
+ * apt-pkg/pkgcachegen.{cc,h}:
+ - use ref-to-ptr semantic in NewDepends() to ensure that the
+ libapt does not segfault if the cache is remapped in between
+ (LP: #812862)
+ - fix crash when P.Arch() was used but the cache got remapped
+ * apt-pkg/acquire-item.{cc,h}:
+ - do not check for a "Package" tag in optional index targets
+ like the translations index
+ * apt-pkg/acquire.cc:
+ - fix potential divide-by-zero
+ * methods/mirror.cc:
+ - include the architecture(s) in the query string as well so
+ that the server can make better decisions
+
+ -- Michael Vogt <mvo@debian.org> Mon, 15 Aug 2011 14:52:54 +0200
+
+apt (0.8.16~exp4) experimental; urgency=low
+
+ [ Julian Andres Klode ]
+ * apt-pkg/pkgcache.h:
+ - [ABI break] Add pkgCache::Header::CacheFileSize, storing the cache size
+ * apt-pkg/pkgcachegen.cc:
+ - Write the file size to the cache
+ * apt-pkg/pkgcache.cc:
+ - Check that cache is at least CacheFileSize bytes large (LP: #16467)
+
+ [ Michael Vogt ]
+ * merged latest fixes from debian-sid
+ * apt-pkg/cdrom.{cc,h}:
+ - cleanup old ABI break avoidance hacks
+ * [ABI break] apt-pkg/acquire-item.{cc,h}:
+ - cleanup around OptionalIndexTarget and SubIndexTarget
+ * [ABI break] merged patch from Jonathan Thomas to have a new
+ RecordField() function in the pkgRecorder parser. Many thanks
+ Thomas
+ * [ABI break] merge patch from Jonathan Thomas to speed up the
+ depcache by caching the install-recommends and install-suggests
+ values
+ * apt-pkg/contrib/fileutl.{cc,h}:
+ - add GetModificationTime() helper
+ * apt-pkg/pkgcachegen.cc:
+ - regenerate the cache if the sources.list changes to ensure
+ that changes in the ordering there will be honored by apt
+ * apt-pkg/sourcelist.{cc,h}:
+ - add pkgSourceList::GetLastModifiedTime() helper
+
+ -- Michael Vogt <mvo@debian.org> Thu, 28 Jul 2011 16:57:08 +0200
+
+apt (0.8.16~exp3) experimental; urgency=low
+
+ [ David Kalnischkies ]
+ * apt-pkg/pkgcache.h:
+ - readd All{Foreign,Allowed} as suggested by Julian to
+ remain strictly API compatible
+ * apt-pkg/acquire*.{cc,h}:
+ - try even harder to support really big files in the fetcher by
+ converting (hopefully) everything to 'long long' (Closes: #632271)
+ * ftparchive/writer.cc:
+ - generate all checksums in one run over the file for Release
+ * cmdline/apt-get.cc:
+ - add an --assume-no option for testing to say 'no' to everything
+ * apt-pkg/deb/debmetaindex.cc:
+ - add trusted=yes option to mark unsigned (local) repository as trusted
+ based on a patch from Ansgar Burchardt, thanks a lot! (Closes: #596498)
+
+ [ Michael Vogt ]
+ * merge fixes from the debian/unstable upload
+ * merge lp:~mvo/apt/sha512-template to get fixes for the
+ sha1/md5 verifiation (closes: #632520)
+
+ -- Michael Vogt <mvo@debian.org> Fri, 15 Jul 2011 09:56:17 +0200
+
+apt (0.8.16~exp2) experimental; urgency=low
+
+ [ David Kalnischkies ]
+ * [ABI-Break] Implement EDSP in libapt-pkg so that all front-ends which
+ use the internal resolver can now be used also with external
+ ones as the usage is hidden in between the old API
+ * provide two edsp solvers in apt-utils:
+ - 'dump' to quickly output a complete scenario and
+ - 'apt' to use the internal as an external resolver
+ * apt-pkg/pkgcache.h:
+ - clean up mess with the "all" handling in MultiArch to
+ fix LP: #733741 cleanly for everyone now
+ * apt-pkg/depcache.cc:
+ - use a boolean instead of an int for Add/Remove in AddStates
+ similar to how it works with AddSizes
+ - let the Mark methods return if their marking was successful
+ - if a Breaks can't be upgraded, remove it. If it or a Conflict
+ can't be removed the installation of the breaker fails.
+ * cmdline/apt-get.cc:
+ - do not discard the error messages from the resolver and instead
+ only show the general 'Broken packages' message if nothing else
+
+ [ Stefano Zacchiroli ]
+ * doc/external-dependency-solver-protocol.txt:
+ - describe EDSP and the configuration interface around it
+
+ [ Michael Vogt ]
+ * [ABI-Break] merge lp:~mvo/apt/sha512-template to add support for sha512
+ * [ABI-Break] merge lp:~mvo/apt/dpointer to support easier extending
+ without breaking the ABI
+ * increase ABI version and update package names
+
+ -- Michael Vogt <mvo@debian.org> Wed, 29 Jun 2011 13:57:28 +0200
+
+apt (0.8.16~exp1) experimental; urgency=low
+
+ * merged with the debian/unstable upload
+
+ -- Michael Vogt <mvo@debian.org> Wed, 29 Jun 2011 12:40:31 +0200
+
+apt (0.8.15.7) unstable; urgency=low
+
+ [ David Kalnischkies ]
+ * apt-pkg/packagemanager.cc, apt-pkg/pkgcache.cc:
+ - ignore "self"-conflicts for all architectures of a package
+ instead of just for the architecture of the package look at
+ in the ordering of installations, too (LP: #802901)
+ - M-A:same lockstep unpack should operate on installed
+ packages first (LP: #835625)
+ * test/*
+ - reorganize the various testcases and helper we have and
+ integrate them better into the buildsystem
+ - run the test/libapt testcases at package build-time
+ * debian/apt.symbols:
+ - add the newly added symbols since 0.8.15.3
+ * cmdline/apt-get.cc:
+ - remove the binary caches in 'apt-get clean' as it is the first
+ thing recommend by many supporters in case of APT segfaults
+ - remove the caches in 'apt-get update', too, as they will be
+ invalid in most cases anyway
+ * apt-pkg/acquire-item.cc:
+ - if no Release.gpg file is found try to verify with hashes,
+ but do not fail if a hash can't be found
+ * apt-pkg/acquire.cc:
+ - non-existing directories are by definition clean
+ * cmdline/apt-key:
+ - if command is 'add' do not error out if the specified
+ keyring doesn't exist, it will be created by gpg
+ * apt-pkg/orderlist.cc:
+ - prefer visiting packages marked for deletion in VisitProvides
+ if we are operating on a negative dependency so that we can
+ deal early with the fallout of this remove
+ * apt-pkg/indexrecords.cc:
+ - fix Acquire::Max-ValidTime option by interpreting it really
+ as seconds as specified in the manpage and not as days
+ - add an Acquire::Min-ValidTime option (Closes: #640122)
+ * doc/apt.conf.5.xml:
+ - reword Acquire::Max-ValidTime documentation to make clear
+ that it doesn't provide the new Min-ValidTime functionality
+
+ -- Michael Vogt <mvo@debian.org> Mon, 12 Sep 2011 16:38:46 +0200
+
+apt (0.8.15.6) unstable; urgency=low
+
+ [ Michael Vogt ]
+ * apt-pkg/contrib/fileutl.{cc,h}:
+ - add GetModificationTime() helper
+ * apt-pkg/pkgcachegen.cc:
+ - regenerate the cache if the sources.list changes to ensure
+ that changes in the ordering there will be honored by apt
+ * apt-pkg/sourcelist.{cc,h}:
+ - add pkgSourceList::GetLastModifiedTime() helper
+ * apt-pkg/pkgcachegen.{cc,h}:
+ - use ref-to-ptr semantic in NewDepends() to ensure that the
+ libapt does not segfault if the cache is remapped in between
+ (LP: #812862)
+ - fix crash when P.Arch() was used but the cache got remapped
+ * test/integration/test-hashsum-verification:
+ - add regression test for hashsum verification
+ * apt-pkg/acquire-item.cc:
+ - if no Release.gpg file is found, still load the hashes for
+ verification (closes: #636314) and add test
+
+ [ David Kalnischkies ]
+ * lots of cppcheck fixes
+
+ -- Michael Vogt <mvo@debian.org> Mon, 15 Aug 2011 09:20:35 +0200
+
+apt (0.8.15.5) unstable; urgency=low
+
+ [ David Kalnischkies ]
+ * apt-pkg/deb/deblistparser.cc:
+ - do not assume that the last char on a line is a \n (Closes: #633350)
+
+ -- Michael Vogt <mvo@debian.org> Thu, 28 Jul 2011 16:49:15 +0200
+
+apt (0.8.15.4) unstable; urgency=low
+
+ [ David Miller ]
+ * 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)
+
+ [ Michael Vogt ]
+ * 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/*
+
+ -- Michael Vogt <mvo@debian.org> Tue, 26 Jul 2011 12:12:27 +0200
+
+apt (0.8.15.3) unstable; urgency=low
+
+ [ Michael Vogt ]
+ * apt-pkg/acquire-item.cc:
+ - improve error message for a expired Release file
+ * apt-pkg/algorithms.cc:
+ - Hold back packages that would enter "policy-broken" state on upgrade
+ when doing a "apt-get upgrade"
+ * cmdline/apt-get.cc:
+ - fix missing download progress in apt-get download
+
+ [ David Kalnischkies ]
+ * apt-pkg/pkgcachegen.cc:
+ - fallback to memory if file is not writeable even if access()
+ told us the opposite before (e.g. in fakeroot 1.16) (Closes: #630591)
+ * doc/sources.list.5.xml:
+ - document available [options] for sources.list entries (Closes: 632441)
+ * doc/apt.conf.5.xml:
+ - document APT::Architectures list (Closes: #612102)
+ * cmdline/apt-get.cc:
+ - restore all important dependencies for garbage packages (LP: #806274)
+ - do not require unused partial dirs in 'source' (Closes: #633510)
+ - buildconflicts effect all architectures
+ - implement MultiarchCross for build-dep and source (Closes: #632221)
+ * apt-pkg/init.cc:
+ - use CndSet in pkgInitConfig (Closes: #629617)
+ * apt-pkg/depcache.cc:
+ - change default of APT::AutoRemove::SuggestsImportant to true
+ * 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
+
+ -- Michael Vogt <mvo@debian.org> Mon, 25 Jul 2011 15:04:43 +0200
+
+apt (0.8.15.2) unstable; urgency=high
+
+ * fix from David Kalnischkies for the InRelease gpg verification
+ code (LP: #784473)
+
+ -- Michael Vogt <mvo@debian.org> Tue, 12 Jul 2011 11:54:47 +0200
+
apt (0.8.15.1) unstable; urgency=low
[ David Kalnischkies ]