From: David Kalnischkies Date: Thu, 18 Mar 2010 22:54:12 +0000 (+0100) Subject: merge MultiArch-ABI. We don't support MultiArch yet (as most other tools), X-Git-Tag: 0.8.0~9^2~64^2~20 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/c67dc114eafe034b8223ce3df6474f7c25f150a8 merge MultiArch-ABI. We don't support MultiArch yet (as most other tools), but we support the usage of the new ABI so libapt users can start to prepare for MultiArch (Closes: #536029) --- c67dc114eafe034b8223ce3df6474f7c25f150a8 diff --cc apt-pkg/depcache.cc index e9fb5f76a,ffa4fe71c..75f69ee11 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@@ -236,62 -249,53 +249,71 @@@ bool pkgDepCache::writeStateFile(OpProg const char *nullreorderlist[] = {0}; while(tagfile.Step(section)) { string const pkgname = section.FindS("Package"); + string pkgarch = section.FindS("Architecture"); + if (pkgarch.empty() == true) + pkgarch = "native"; // Silently ignore unknown packages and packages with no actual // version. - pkgCache::PkgIterator pkg=Cache->FindPkg(pkgname); + pkgCache::PkgIterator pkg = Cache->FindPkg(pkgname, pkgarch); if(pkg.end() || pkg.VersionList().end()) continue; - bool const newAuto = (PkgState[pkg->ID].Flags & Flag::Auto); + StateCache const &P = PkgState[pkg->ID]; + bool newAuto = (P.Flags & Flag::Auto); + // skip not installed or now-removed ones if requested + if (InstalledOnly && ( + (pkg->CurrentVer == 0 && P.Mode != ModeInstall) || + (pkg->CurrentVer != 0 && P.Mode == ModeDelete))) + { + // The section is obsolete if it contains no other tag + unsigned int const count = section.Count(); + if (count < 2 || - (count == 2 && section.Exists("Auto-Installed"))) ++ (count == 2 && section.Exists("Auto-Installed")) || ++ (count == 3 && section.Exists("Auto-Installed") && section.Exists("Architecture"))) + continue; + else + newAuto = false; + } if(_config->FindB("Debug::pkgAutoRemove",false)) std::clog << "Update existing AutoInstall info: " - << pkgname << std::endl; - TFRewriteData rewrite[2]; - rewrite[0].Tag = "Auto-Installed"; - rewrite[0].Rewrite = newAuto ? "1" : "0"; + << pkg.FullName() << std::endl; + TFRewriteData rewrite[3]; + rewrite[0].Tag = "Architecture"; + rewrite[0].Rewrite = pkg.Arch(); rewrite[0].NewTag = 0; - rewrite[1].Tag = 0; + rewrite[1].Tag = "Auto-Installed"; + rewrite[1].Rewrite = newAuto ? "1" : "0"; + rewrite[1].NewTag = 0; + rewrite[2].Tag = 0; TFRewrite(OutFile, section, nullreorderlist, rewrite); fprintf(OutFile,"\n"); - pkgs_seen.insert(pkgname); + pkgs_seen.insert(pkg.FullName()); } // then write the ones we have not seen yet std::ostringstream ostr; for(pkgCache::PkgIterator pkg=Cache->PkgBegin(); !pkg.end(); pkg++) { - if(PkgState[pkg->ID].Flags & Flag::Auto) { + StateCache const &P = PkgState[pkg->ID]; + if(P.Flags & Flag::Auto) { - if (pkgs_seen.find(pkg.Name()) != pkgs_seen.end()) { + if (pkgs_seen.find(pkg.FullName()) != pkgs_seen.end()) { if(debug_autoremove) - std::clog << "Skipping already written " << pkg.Name() << std::endl; + std::clog << "Skipping already written " << pkg.FullName() << std::endl; continue; } // skip not installed ones if requested - if(InstalledOnly && pkg->CurrentVer == 0) + if (InstalledOnly && ( + (pkg->CurrentVer == 0 && P.Mode != ModeInstall) || + (pkg->CurrentVer != 0 && P.Mode == ModeDelete))) continue; + const char* const pkgarch = pkg.Arch(); + if (strcmp(pkgarch, "all") == 0) + continue; if(debug_autoremove) - std::clog << "Writing new AutoInstall: " - << pkg.Name() << std::endl; + std::clog << "Writing new AutoInstall: " << pkg.FullName() << std::endl; ostr.str(string("")); - ostr << "Package: " << pkg.Name() + ostr << "Package: " << pkg.Name() + << "\nArchitecture: " << pkgarch << "\nAuto-Installed: 1\n\n"; fprintf(OutFile,"%s",ostr.str().c_str()); - fprintf(OutFile,"\n"); } } fclose(OutFile); diff --cc apt-pkg/depcache.h index fd1f202be,ea605f199..6765d3e7c --- a/apt-pkg/depcache.h +++ b/apt-pkg/depcache.h @@@ -442,12 -445,9 +445,9 @@@ class pkgDepCache : protected pkgCache: virtual bool IsDeleteOk(const PkgIterator &Pkg,bool Purge = false, unsigned long Depth = 0, bool FromUser = true); - // This is for debuging - void Update(OpProgress *Prog = 0); - // read persistent states bool readStateFile(OpProgress *prog); - bool writeStateFile(OpProgress *prog, bool InstalledOnly=false); + bool writeStateFile(OpProgress *prog, bool InstalledOnly=true); // Size queries inline double UsrSize() {return iUsrSize;}; diff --cc cmdline/apt-get.cc index 849401b0c,4596c3d61..7875ae20f --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@@ -1095,20 -1106,10 +1106,20 @@@ bool TryToInstall(pkgCache::PkgIterato { if (AllowFail == true) ioprintf(c1out,_("Skipping %s, it is already installed and upgrade is not set.\n"), - Pkg.Name()); + Pkg.FullName(true).c_str()); return true; } - + + // Ignore request for install if package would be new + if (_config->FindB("APT::Get::Only-Upgrade", false) == true && + Pkg->CurrentVer == 0) + { + if (AllowFail == true) + ioprintf(c1out,_("Skipping %s, it is not installed and only upgrades are requested.\n"), + Pkg.Name()); + return true; + } + // Check if there is something at all to install pkgDepCache::StateCache &State = Cache[Pkg]; if (Remove == true && Pkg->CurrentVer == 0) diff --cc debian/changelog index bdafa70e8,8a4e2ac20..595285dbf --- a/debian/changelog +++ b/debian/changelog @@@ -1,72 -1,17 +1,78 @@@ apt (0.7.26) UNRELEASED; urgency=low + [ Christian Perrier ] + * German translation update. Closes: #571037 + * Spanish manpages translation update. Closes: #573293 + [ David Kalnischkies ] - * [BREAK] add possibility to download and use multiply - Translation files, configurable with Acquire::Translation - (Closes: #444222, #448216, #550564) + * [BREAK] merge MultiArch-ABI. We don't support MultiArch, + but we support the usage of the new ABI so libapt users + can start to prepare for MultiArch (Closes: #536029) + * Ignore :qualifiers after package name in build dependencies + in the library by default, but try to honour them in apt-get + as we have some sort of MultiArch support ready (Closes: #558103) + * Switch to dpkg-source 3.0 (native) format + * apt-pkg/depcache.cc: + - remove Auto-Installed information from extended_states + together with the package itself (Closes: #572364) + * cmdline/apt-mark: + - don't crash if no arguments are given (Closes: #570962) + * debian/control: + - remove some years old and obsolete Replaces + - add automake/conf build-depends/conflicts as recommend by + the autotools-dev README (Closes: #572615) + * apt-pkg/contrib/mmap.{h,cc}: + - add char[] fallback for filesystems without shared writable + mmap() like JFFS2. Thanks to Marius Vollmer for writing + and to Loïc Minier for pointing to the patch! (Closes: #314334) + * doc/apt_preferences.5.xml: + - fix two typos and be more verbose in the novice warning. + Thanks to Osamu Aoki for pointing it out! (Closes: #567669) + * apt-pkg/deb/dpkgpm.cc: + - fix error message construction in OpenLog() + - if available store the Commandline in the history + * cmdline/apt-get.cc: + - add a --only-upgrade flag to install command (Closes: #572259) + - fix memory leaks in error conditions in DoSource() + * apt-pkg/contrib/cmndline.cc: + - save Commandline in Commandline::AsString for logging + * apt-pkg/deb/debversion.cc: + - consider absent of debian revision equivalent to 0 (Closes: #573592) + * doc/makefile, doc/*: + - generate subdirectories for building the manpages in on the fly + depending on the po files we have. + * apt-pkg/pkgcachegen.cc: + - merge versions correctly even if multiple different versions + with the same version number are available. + Thanks to Magnus Holmgren for the patch! (Closes: #351056) + + [ Julian Andres Klode ] + * cmdline/apt-mark: + - Use the new python-apt API (and conflict with python-apt << 0.7.93.2). + * apt-inst/contrib/arfile.h: + - Add public ARArchive::Members() which returns the list of members. + * debian/rules: + - Fix the libraries name to be e.g. libapt-pkg4.9 instead of + libapt-pkg-4.9. + + -- David Kalnischkies Sun, 14 Mar 2010 16:47:07 +0100 + +apt (0.7.26~exp2) experimental; urgency=low + + * fix crash when LANGUAGE is not set + + -- Michael Vogt Thu, 18 Feb 2010 22:07:23 +0100 + +apt (0.7.26~exp1) experimental; urgency=low + + [ David Kalnischkies ] + * [BREAK] add possibility to download and use multiply + Translation files, configurable with Acquire::Translation + (Closes: #444222, #448216, #550564) + * Ignore :qualifiers after package name in build dependencies + for now as long we don't understand them (Closes: #558103) * apt-pkg/contrib/mmap.{cc,h}: - - extend it to have a growable flag - unused now but maybe… + - extend it to have a growable flag - unused now but maybe... * apt-pkg/pkgcache.h: - use long instead of short for {Ver,Desc}File size, patch from Víctor Manuel Jáquez Leal, thanks! (Closes: #538917) @@@ -1449,13 -1370,13 +1455,6 @@@ apt (0.7.6) unstable; urgency=lo -- Otavio Salvador Wed, 01 Aug 2007 19:49:51 -0300 --apt (0.7.6) unstable; urgency=low -- -- * Applied patch from Aurelien Jarno to fix wrong -- directory downloading on non-linux architectures (closes: #435597) -- -- -- Otavio Salvador Wed, 01 Aug 2007 19:49:51 -0300 -- apt (0.7.5) unstable; urgency=low [ Otavio Salvador ]