From 09fab2442c2ab9a503841d3dcd56b3c0c3efb502 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 9 Apr 2009 04:36:34 +0200 Subject: * apt-pkg/contrib/strutl.cc: - fix TimeToStr i18n (LP: #289807) * [ABI break] merge support for http redirects, thanks to Jeff Licquia and Anthony Towns * [ABI break] use int for the package IDs (thanks to Steve Cotton) * apt-pkg/pkgcache.cc: - do not run "dpkg --configure pkg" if pkg is in trigger-awaited state (LP: #322955) * methods/https.cc: - add Acquire::https::AllowRedirect support * Clarify the --help for 'purge' (LP: #243948) * cmdline/apt-get.cc - fix "apt-get source pkg" if there is a binary package and a source package of the same name but from different packages (LP: #330103) * cmdline/acqprogress.cc: - Call pkgAcquireStatus::Pulse even if quiet, so that we still get dlstatus messages on the status-fd (LP: #290234). --- apt-pkg/pkgcache.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'apt-pkg/pkgcache.cc') diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc index 8eb62089a..4fbf42c4b 100644 --- a/apt-pkg/pkgcache.cc +++ b/apt-pkg/pkgcache.cc @@ -275,8 +275,12 @@ pkgCache::PkgIterator::OkState pkgCache::PkgIterator::State() const if (Pkg->CurrentState == pkgCache::State::UnPacked || Pkg->CurrentState == pkgCache::State::HalfConfigured || - Pkg->CurrentState == pkgCache::State::TriggersPending || - Pkg->CurrentState == pkgCache::State::TriggersAwaited) + //we don't need to care for triggers awaiting packages + //dpkg will deal with them automatically when the + //trigger pending action is run (those packages are usually + //in half-configured or triggers-pending state) + //Pkg->CurrentState == pkgCache::State::TriggersAwaited + Pkg->CurrentState == pkgCache::State::TriggersPending) return NeedsConfigure; if (Pkg->CurrentState == pkgCache::State::HalfInstalled || -- cgit v1.2.3-70-g09d2 From efc487fbd46905f5f3efc4f31d7df15625bcbecf Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 7 May 2009 12:04:21 +0200 Subject: [apt-pkg] allow also codenames for specifying a release * MatchType::Release checks first for archive than for codename equality * new n= option in apt_preference to be able to pin based on a codeName --- apt-pkg/cacheiterators.h | 1 + apt-pkg/deb/deblistparser.cc | 2 + apt-pkg/pkgcache.cc | 2 + apt-pkg/pkgcache.h | 1 + apt-pkg/versionmatch.cc | 37 +++++++++++------- apt-pkg/versionmatch.h | 21 +++++++---- doc/apt-get.8.xml | 9 ++++- doc/apt.conf.5.xml | 2 +- doc/apt_preferences.5.xml | 90 ++++++++++++++++++++++++++++++++++++++++++-- 9 files changed, 138 insertions(+), 27 deletions(-) (limited to 'apt-pkg/pkgcache.cc') diff --git a/apt-pkg/cacheiterators.h b/apt-pkg/cacheiterators.h index 08eafca0f..63f9de8fc 100644 --- a/apt-pkg/cacheiterators.h +++ b/apt-pkg/cacheiterators.h @@ -333,6 +333,7 @@ class pkgCache::PkgFileIterator inline const char *Component() const {return File->Component == 0?0:Owner->StrP + File->Component;}; inline const char *Version() const {return File->Version == 0?0:Owner->StrP + File->Version;}; inline const char *Origin() const {return File->Origin == 0?0:Owner->StrP + File->Origin;}; + inline const char *Codename() const {return File->Codename ==0?0:Owner->StrP + File->Codename;}; inline const char *Label() const {return File->Label == 0?0:Owner->StrP + File->Label;}; inline const char *Site() const {return File->Site == 0?0:Owner->StrP + File->Site;}; inline const char *Architecture() const {return File->Architecture == 0?0:Owner->StrP + File->Architecture;}; diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc index 896d4d6d8..d8be66cba 100644 --- a/apt-pkg/deb/deblistparser.cc +++ b/apt-pkg/deb/deblistparser.cc @@ -637,6 +637,8 @@ bool debListParser::LoadReleaseInfo(pkgCache::PkgFileIterator FileI, FileI->Version = WriteUniqString(Start,Stop - Start); if (Section.Find("Origin",Start,Stop) == true) FileI->Origin = WriteUniqString(Start,Stop - Start); + if (Section.Find("Codename",Start,Stop) == true) + FileI->Codename = WriteUniqString(Start,Stop - Start); if (Section.Find("Label",Start,Stop) == true) FileI->Label = WriteUniqString(Start,Stop - Start); if (Section.Find("Architecture",Start,Stop) == true) diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc index 4fbf42c4b..f5303682c 100644 --- a/apt-pkg/pkgcache.cc +++ b/apt-pkg/pkgcache.cc @@ -607,6 +607,8 @@ string pkgCache::PkgFileIterator::RelStr() Res = Res + (Res.empty() == true?"o=":",o=") + Origin(); if (Archive() != 0) Res = Res + (Res.empty() == true?"a=":",a=") + Archive(); + if (Codename() != 0) + Res = Res + (Res.empty() == true?"n=":",n=") + Codename(); if (Label() != 0) Res = Res + (Res.empty() == true?"l=":",l=") + Label(); if (Component() != 0) diff --git a/apt-pkg/pkgcache.h b/apt-pkg/pkgcache.h index 759e9a225..af63443a6 100644 --- a/apt-pkg/pkgcache.h +++ b/apt-pkg/pkgcache.h @@ -223,6 +223,7 @@ struct pkgCache::PackageFile // Names map_ptrloc FileName; // Stringtable map_ptrloc Archive; // Stringtable + map_ptrloc Codename; // Stringtable map_ptrloc Component; // Stringtable map_ptrloc Version; // Stringtable map_ptrloc Origin; // Stringtable diff --git a/apt-pkg/versionmatch.cc b/apt-pkg/versionmatch.cc index 5c25c2f7b..b4d1d4696 100644 --- a/apt-pkg/versionmatch.cc +++ b/apt-pkg/versionmatch.cc @@ -63,8 +63,8 @@ pkgVersionMatch::pkgVersionMatch(string Data,MatchType Type) : Type(Type) if (isdigit(Data[0])) RelVerStr = Data; else - RelArchive = Data; - + RelRelease = Data; + if (RelVerStr.length() > 0 && RelVerStr.end()[-1] == '*') { RelVerPrefixMatch = true; @@ -87,19 +87,21 @@ pkgVersionMatch::pkgVersionMatch(string Data,MatchType Type) : Type(Type) { if (strlen(Fragments[J]) < 3) continue; - + if (stringcasecmp(Fragments[J],Fragments[J]+2,"v=") == 0) RelVerStr = Fragments[J]+2; else if (stringcasecmp(Fragments[J],Fragments[J]+2,"o=") == 0) RelOrigin = Fragments[J]+2; else if (stringcasecmp(Fragments[J],Fragments[J]+2,"a=") == 0) RelArchive = Fragments[J]+2; + else if (stringcasecmp(Fragments[J],Fragments[J]+2,"n=") == 0) + RelCodename = Fragments[J]+2; else if (stringcasecmp(Fragments[J],Fragments[J]+2,"l=") == 0) RelLabel = Fragments[J]+2; else if (stringcasecmp(Fragments[J],Fragments[J]+2,"c=") == 0) RelComponent = Fragments[J]+2; } - + if (RelVerStr.end()[-1] == '*') { RelVerPrefixMatch = true; @@ -169,15 +171,16 @@ bool pkgVersionMatch::FileMatch(pkgCache::PkgFileIterator File) { if (MatchAll == true) return true; - + /* cout << RelVerStr << ',' << RelOrigin << ',' << RelArchive << ',' << RelLabel << endl; cout << File.Version() << ',' << File.Origin() << ',' << File.Archive() << ',' << File.Label() << endl;*/ - + if (RelVerStr.empty() == true && RelOrigin.empty() == true && RelArchive.empty() == true && RelLabel.empty() == true && + RelRelease.empty() == true && RelCodename.empty() == true && RelComponent.empty() == true) return false; - + if (RelVerStr.empty() == false) if (File->Version == 0 || MatchVer(File.Version(),RelVerStr,RelVerPrefixMatch) == false) @@ -187,11 +190,19 @@ bool pkgVersionMatch::FileMatch(pkgCache::PkgFileIterator File) stringcasecmp(RelOrigin,File.Origin()) != 0) return false; if (RelArchive.empty() == false) - { - if (File->Archive == 0 || + if (File->Archive == 0 || stringcasecmp(RelArchive,File.Archive()) != 0) - return false; - } + return false; + if (RelCodename.empty() == false) + if (File->Codename == 0 || + stringcasecmp(RelCodename,File.Codename()) != 0) + return false; + if (RelRelease.empty() == false) + if ((File->Archive == 0 || + stringcasecmp(RelRelease,File.Archive()) != 0) && + (File->Codename == 0 || + stringcasecmp(RelRelease,File.Codename()) != 0)) + return false; if (RelLabel.empty() == false) if (File->Label == 0 || stringcasecmp(RelLabel,File.Label()) != 0) @@ -202,7 +213,7 @@ bool pkgVersionMatch::FileMatch(pkgCache::PkgFileIterator File) return false; return true; } - + if (Type == Origin) { if (OrSite.empty() == false) { @@ -213,7 +224,7 @@ bool pkgVersionMatch::FileMatch(pkgCache::PkgFileIterator File) return false; return (OrSite == File.Site()); /* both strings match */ } - + return false; } /*}}}*/ diff --git a/apt-pkg/versionmatch.h b/apt-pkg/versionmatch.h index fe264aa46..a8f3c84ac 100644 --- a/apt-pkg/versionmatch.h +++ b/apt-pkg/versionmatch.h @@ -3,29 +3,32 @@ // $Id: versionmatch.h,v 1.4 2001/05/29 03:07:12 jgg Exp $ /* ###################################################################### - Version Matching - + Version Matching + This module takes a matching string and a type and locates the version record that satisfies the constraint described by the matching string. Version: 1.2* Release: o=Debian,v=2.1*,c=main Release: v=2.1* + Release: a=testing + Release: n=squeeze Release: * Origin: ftp.debian.org - + Release may be a complex type that can specify matches for any of: Version (v= with prefix) Origin (o=) - Archive (a=) + Archive (a=) eg, unstable, testing, stable + Codename (n=) e.g. etch, lenny, squeeze, sid Label (l=) Component (c=) If there are no equals signs in the string then it is scanned in short - form - if it starts with a number it is Version otherwise it is an - Archive. - + form - if it starts with a number it is Version otherwise it is an + Archive or a Codename. + Release may be a '*' to match all releases. - + ##################################################################### */ /*}}}*/ #ifndef PKGLIB_VERSIONMATCH_H @@ -47,6 +50,8 @@ class pkgVersionMatch string RelVerStr; bool RelVerPrefixMatch; string RelOrigin; + string RelRelease; + string RelCodename; string RelArchive; string RelLabel; string RelComponent; diff --git a/doc/apt-get.8.xml b/doc/apt-get.8.xml index c1b3470ef..c63b2a6c6 100644 --- a/doc/apt-get.8.xml +++ b/doc/apt-get.8.xml @@ -53,6 +53,9 @@ target_release_number_expression + + target_release_codename + @@ -71,6 +74,9 @@ /target_release_name + + /target_release_codename + @@ -455,7 +461,8 @@ of this option. In short, this option lets you have simple control over which distribution packages will be retrieved from. Some common examples might be - or . + , + or . Configuration Item: APT::Default-Release; see also the &apt-preferences; manual page. diff --git a/doc/apt.conf.5.xml b/doc/apt.conf.5.xml index 74966c5b3..fb2be9a28 100644 --- a/doc/apt.conf.5.xml +++ b/doc/apt.conf.5.xml @@ -110,7 +110,7 @@ DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt";}; Default-Release Default release to install packages from if more than one - version available. Contains release name or release version. Examples: 'stable', 'testing', 'unstable', '4.0', '5.0*'. Release codenames ('etch', 'lenny' etc.) are not allowed now. See also &apt-preferences;. + version available. Contains release name, codename or release version. Examples: 'stable', 'testing', 'unstable', 'lenny', 'squeeze', '4.0', '5.0*'. See also &apt-preferences;. Ignore-Hold diff --git a/doc/apt_preferences.5.xml b/doc/apt_preferences.5.xml index 162c2f00e..ff63f1dd3 100644 --- a/doc/apt_preferences.5.xml +++ b/doc/apt_preferences.5.xml @@ -14,7 +14,7 @@ &apt-email; &apt-product; - 29 February 2004 + 04 May 2009 @@ -190,6 +190,15 @@ Pin: release a=unstable Pin-Priority: 50 +The following record assigns a high priority to all package versions +belonging to any distribution whose Codename is "squeeze". + + +Package: * +Pin: release n=squeeze +Pin-Priority: 900 + + The following record assigns a high priority to all package versions belonging to any release whose Archive name is "stable" and whose release Version number is "3.0". @@ -327,10 +336,11 @@ file are relevant for setting APT priorities: -the Archive: line +the Archive: or Suite: line names the archive to which all the packages in the directory tree belong. For example, the line -"Archive: stable" +"Archive: stable" or +"Suite: stable" specifies that all of the packages in the directory tree below the parent of the Release file are in a stable archive. Specifying this value in the APT preferences file @@ -342,6 +352,22 @@ Pin: release a=stable + +the Codename: line +names the codename to which all the packages +in the directory tree belong. For example, the line +"Codename: squeeze" +specifies that all of the packages in the directory +tree below the parent of the Release file belong to a version named +squeeze. Specifying this value in the APT preferences file +would require the line: + + +Pin: release n=squeeze + + + + the Version: line names the release version. For example, the @@ -522,7 +548,64 @@ version. apt-get install package/unstable + + + + +Tracking the evolution of a codename release + +The following APT preferences file will cause APT to assign a +priority higher than the default (500) to all package versions belonging +to a specified codename of a distribution and a prohibitively low priority to +package versions belonging to other Debian distributions, +codenames and archives. +Note that with this APT preference APT will follow the migration of a release +from the archive testing to stable and +later oldstable. If you want to follow for example the progress +in testing notwithstanding the codename changes you should use +the example configurations above. + + +Explanation: Uninstall or do not install any Debian-originated package versions +Explanation: other than those in the distribution codenamed with squeeze or sid +Package: * +Pin: release n=squeeze +Pin-Priority: 900 + +Explanation: Debian unstable is always codenamed with sid +Package: * +Pin: release a=sid +Pin-Priority: 800 + +Package: * +Pin: release o=Debian +Pin-Priority: -10 + + + +With a suitable &sources-list; file and the above preferences file, +any of the following commands will cause APT to upgrade to the +latest version(s) in the release codenamed with squeeze. + + +apt-get install package-name +apt-get upgrade +apt-get dist-upgrade + + + +The following command will cause APT to upgrade the specified +package to the latest version from the sid distribution. +Thereafter, apt-get upgrade will upgrade +the package to the most recent squeeze version if that is +more recent than the installed version, otherwise, to the most recent +sid version if that is more recent than the installed +version. + +apt-get install package/sid + + @@ -535,4 +618,3 @@ apt-get install package/unstable &manbugs; - -- cgit v1.2.3-70-g09d2 From f8ae7e8b3c5585888cbc0516b35131acec14ff05 Mon Sep 17 00:00:00 2001 From: "jak@debian.org" <> Date: Mon, 15 Jun 2009 14:57:01 +0200 Subject: Introduce support for the Enhances field. (Closes: #137583) --- apt-pkg/deb/deblistparser.cc | 2 ++ apt-pkg/pkgcache.cc | 4 ++-- apt-pkg/pkgcache.h | 2 +- debian/changelog | 1 + 4 files changed, 6 insertions(+), 3 deletions(-) (limited to 'apt-pkg/pkgcache.cc') diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc index 896d4d6d8..74fa6fab4 100644 --- a/apt-pkg/deb/deblistparser.cc +++ b/apt-pkg/deb/deblistparser.cc @@ -109,6 +109,8 @@ bool debListParser::NewVersion(pkgCache::VerIterator Ver) return false; if (ParseDepends(Ver,"Replaces",pkgCache::Dep::Replaces) == false) return false; + if (ParseDepends(Ver,"Enhances",pkgCache::Dep::Enhances) == false) + return false; // Obsolete. if (ParseDepends(Ver,"Optional",pkgCache::Dep::Suggests) == false) diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc index 4fbf42c4b..7a0d7376d 100644 --- a/apt-pkg/pkgcache.cc +++ b/apt-pkg/pkgcache.cc @@ -49,7 +49,7 @@ pkgCache::Header::Header() /* Whenever the structures change the major version should be bumped, whenever the generator changes the minor version should be bumped. */ - MajorVersion = 7; + MajorVersion = 8; MinorVersion = 0; Dirty = false; @@ -223,7 +223,7 @@ const char *pkgCache::DepType(unsigned char Type) { const char *Types[] = {"",_("Depends"),_("PreDepends"),_("Suggests"), _("Recommends"),_("Conflicts"),_("Replaces"), - _("Obsoletes"),_("Breaks")}; + _("Obsoletes"),_("Breaks"), _("Enhances")}; if (Type < sizeof(Types)/sizeof(*Types)) return Types[Type]; return ""; diff --git a/apt-pkg/pkgcache.h b/apt-pkg/pkgcache.h index 759e9a225..f2c032eb4 100644 --- a/apt-pkg/pkgcache.h +++ b/apt-pkg/pkgcache.h @@ -70,7 +70,7 @@ class pkgCache struct Dep { enum DepType {Depends=1,PreDepends=2,Suggests=3,Recommends=4, - Conflicts=5,Replaces=6,Obsoletes=7,DpkgBreaks=8}; + Conflicts=5,Replaces=6,Obsoletes=7,DpkgBreaks=8,Enhances=9}; enum DepCompareOp {Or=0x10,NoOp=0,LessEq=0x1,GreaterEq=0x2,Less=0x3, Greater=0x4,Equals=0x5,NotEquals=0x6}; }; diff --git a/debian/changelog b/debian/changelog index ea935f144..ecba3f215 100644 --- a/debian/changelog +++ b/debian/changelog @@ -24,6 +24,7 @@ apt (0.7.22) UNRELEASED; urgency=low [ Julian Andres Klode ] * apt-pkg/contrib/configuration.cc: Fix a small memory leak in ReadConfigFile. + * Introduce support for the Enhances field. (Closes: #137583) -- Christian Perrier Wed, 22 Apr 2009 10:13:54 +0200 -- cgit v1.2.3-70-g09d2 From af29ffb44d95dfb0f7b0c1835e2e501313f74723 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 29 Jun 2009 18:00:54 +0200 Subject: * add depth information to the debug output and show what depends type triggers a autoinst (closes: #458389) * add debug::pkgDepCache::Marker with more detailed debug output (closes: #87520) --- apt-pkg/cacheiterators.h | 13 +- apt-pkg/depcache.cc | 47 +++++-- apt-pkg/depcache.h | 10 +- apt-pkg/pkgcache.cc | 51 ++++++++ debian/changelog | 4 + doc/apt.conf.5.xml | 21 ++++ doc/examples/configure-index | 1 + po/apt-all.pot | 293 +++++++++++++++++++++++++------------------ 8 files changed, 298 insertions(+), 142 deletions(-) (limited to 'apt-pkg/pkgcache.cc') diff --git a/apt-pkg/cacheiterators.h b/apt-pkg/cacheiterators.h index 63f9de8fc..cf79b3a6b 100644 --- a/apt-pkg/cacheiterators.h +++ b/apt-pkg/cacheiterators.h @@ -80,7 +80,13 @@ class pkgCache::PkgIterator inline PrvIterator ProvidesList() const; inline unsigned long Index() const {return Pkg - Owner->PkgP;}; OkState State() const; - + + //Nice printable representation + friend std::ostream& operator<<(std::ostream& out, pkgCache::PkgIterator Pkg); + + const char *CandVersion() const; + const char *CurVersion() const; + // Constructors inline PkgIterator(pkgCache &Owner,Package *Trg) : Pkg(Trg), Owner(&Owner), HashIndex(0) @@ -111,7 +117,10 @@ class pkgCache::VerIterator inline bool operator ==(const VerIterator &B) const {return Ver == B.Ver;}; inline bool operator !=(const VerIterator &B) const {return Ver != B.Ver;}; int CompareVer(const VerIterator &B) const; - + + // Testing + inline bool IsGood() const { return Ver && Owner && ! end();}; + // Accessors inline Version *operator ->() {return Ver;}; inline Version const *operator ->() const {return Ver;}; diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index 2411bfe89..e9ef9cedc 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -47,6 +47,13 @@ ConfigValueInSubTree(const char* SubTree, const char *needle) return false; } +std::string OutputInDepth(const unsigned long Depth) +{ + std::string output = ""; + for(unsigned long d=Depth; d > 0; d--) + output += " "; + return output; +} pkgDepCache::ActionGroup::ActionGroup(pkgDepCache &cache) : cache(cache), released(false) @@ -83,6 +90,8 @@ pkgDepCache::ActionGroup::~ActionGroup() pkgDepCache::pkgDepCache(pkgCache *pCache,Policy *Plcy) : group_level(0), Cache(pCache), PkgState(0), DepState(0) { + DebugMarker = _config->FindB("Debug::pkgDepCache::Marker", false); + DebugAutoInstall = _config->FindB("Debug::pkgDepCache::AutoInstall", false); delLocalPolicy = 0; LocalPolicy = Plcy; if (LocalPolicy == 0) @@ -705,7 +714,8 @@ void pkgDepCache::Update(PkgIterator const &Pkg) // DepCache::MarkKeep - Put the package in the keep state /*{{{*/ // --------------------------------------------------------------------- /* */ -void pkgDepCache::MarkKeep(PkgIterator const &Pkg, bool Soft, bool FromUser) +void pkgDepCache::MarkKeep(PkgIterator const &Pkg, bool Soft, bool FromUser, + unsigned long Depth) { // Simplifies other routines. if (Pkg.end() == true) @@ -746,6 +756,9 @@ void pkgDepCache::MarkKeep(PkgIterator const &Pkg, bool Soft, bool FromUser) P.Flags &= ~Flag::Auto; #endif + if (DebugMarker == true) + std::clog << OutputInDepth(Depth) << "MarkKeep " << Pkg << std::endl; + RemoveSizes(Pkg); RemoveStates(Pkg); @@ -765,7 +778,8 @@ void pkgDepCache::MarkKeep(PkgIterator const &Pkg, bool Soft, bool FromUser) // DepCache::MarkDelete - Put the package in the delete state /*{{{*/ // --------------------------------------------------------------------- /* */ -void pkgDepCache::MarkDelete(PkgIterator const &Pkg, bool rPurge) +void pkgDepCache::MarkDelete(PkgIterator const &Pkg, bool rPurge, + unsigned long Depth) { // Simplifies other routines. if (Pkg.end() == true) @@ -787,6 +801,9 @@ void pkgDepCache::MarkDelete(PkgIterator const &Pkg, bool rPurge) if (Pkg->VersionList == 0) return; + if (DebugMarker == true) + std::clog << OutputInDepth(Depth) << "MarkDelete " << Pkg << std::endl; + RemoveSizes(Pkg); RemoveStates(Pkg); @@ -826,7 +843,7 @@ void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst, P.CandidateVer == (Version *)Pkg.CurrentVer())) { if (P.CandidateVer == (Version *)Pkg.CurrentVer() && P.InstallVer == 0) - MarkKeep(Pkg, false, FromUser); + MarkKeep(Pkg, false, FromUser, Depth+1); return; } @@ -868,6 +885,9 @@ void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst, if (AutoInst == false) return; + if (DebugMarker == true) + std::clog << OutputInDepth(Depth) << "MarkInstall " << Pkg << std::endl; + DepIterator Dep = P.InstVerIter(*this).DependsList(); for (; Dep.end() != true;) { @@ -937,12 +957,12 @@ void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst, } } if(isNewImportantDep) - if(_config->FindB("Debug::pkgDepCache::AutoInstall",false) == true) - std::clog << "new important dependency: " + if(DebugAutoInstall == true) + std::clog << OutputInDepth(Depth) << "new important dependency: " << Start.TargetPkg().Name() << std::endl; if(isPreviouslySatisfiedImportantDep) - if(_config->FindB("Debug::pkgDepCache::AutoInstall", false) == true) - std::clog << "previously satisfied important dependency on " + if(DebugAutoInstall == true) + std::clog << OutputInDepth(Depth) << "previously satisfied important dependency on " << Start.TargetPkg().Name() << std::endl; // skip important deps if the package is already installed @@ -993,15 +1013,16 @@ void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst, if (InstPkg.end() == false) { - if(_config->FindB("Debug::pkgDepCache::AutoInstall",false) == true) - std::clog << "Installing " << InstPkg.Name() - << " as dep of " << Pkg.Name() + if(DebugAutoInstall == true) + std::clog << OutputInDepth(Depth) << "Installing " << InstPkg.Name() + << " as " << Start.DepType() << " of " << Pkg.Name() << std::endl; // now check if we should consider it a automatic dependency or not if(Pkg.Section() && ConfigValueInSubTree("APT::Never-MarkAuto-Sections", Pkg.Section())) { - if(_config->FindB("Debug::pkgDepCache::AutoInstall",false) == true) - std::clog << "Setting NOT as auto-installed (direct dep of pkg in APT::Never-MarkAuto-Sections)" << std::endl; + if(DebugAutoInstall == true) + std::clog << OutputInDepth(Depth) << "Setting NOT as auto-installed (direct " + << Start.DepType() << " of pkg in APT::Never-MarkAuto-Sections)" << std::endl; MarkInstall(InstPkg,true,Depth + 1, true); } else @@ -1028,7 +1049,7 @@ void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst, PkgIterator Pkg = Ver.ParentPkg(); if (Start->Type != Dep::DpkgBreaks) - MarkDelete(Pkg); + MarkDelete(Pkg,false,Depth + 1); else if (PkgState[Pkg->ID].CandidateVer != *I) MarkInstall(Pkg,true,Depth + 1, false, ForceImportantDeps); diff --git a/apt-pkg/depcache.h b/apt-pkg/depcache.h index f41ad17e9..2d33e21d7 100644 --- a/apt-pkg/depcache.h +++ b/apt-pkg/depcache.h @@ -294,7 +294,10 @@ class pkgDepCache : protected pkgCache::Namespace unsigned long iBrokenCount; unsigned long iPolicyBrokenCount; unsigned long iBadCount; - + + bool DebugMarker; + bool DebugAutoInstall; + Policy *delLocalPolicy; // For memory clean up.. Policy *LocalPolicy; @@ -387,8 +390,9 @@ class pkgDepCache : protected pkgCache::Namespace */ // @{ void MarkKeep(PkgIterator const &Pkg, bool Soft = false, - bool FromUser = true); - void MarkDelete(PkgIterator const &Pkg,bool Purge = false); + bool FromUser = true, unsigned long Depth = 0); + void MarkDelete(PkgIterator const &Pkg, bool Purge = false, + unsigned long Depth = 0); void MarkInstall(PkgIterator const &Pkg,bool AutoInst = true, unsigned long Depth = 0, bool FromUser = true, bool ForceImportantDeps = false); diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc index 81a254483..4e10093a8 100644 --- a/apt-pkg/pkgcache.cc +++ b/apt-pkg/pkgcache.cc @@ -21,6 +21,7 @@ /*}}}*/ // Include Files /*{{{*/ #include +#include #include #include #include @@ -290,6 +291,56 @@ pkgCache::PkgIterator::OkState pkgCache::PkgIterator::State() const return NeedsNothing; } /*}}}*/ +// PkgIterator::CandVersion - Returns the candidate version string /*{{{*/ +// --------------------------------------------------------------------- +/* Return string representing of the candidate version. */ +const char * +pkgCache::PkgIterator::CandVersion() const +{ + //TargetVer is empty, so don't use it. + VerIterator version = pkgPolicy::pkgPolicy(Owner).GetCandidateVer(*this); + if (version.IsGood()) + return version.VerStr(); + return 0; +}; + /*}}}*/ +// PkgIterator::CurVersion - Returns the current version string /*{{{*/ +// --------------------------------------------------------------------- +/* Return string representing of the current version. */ +const char * +pkgCache::PkgIterator::CurVersion() const +{ + VerIterator version = CurrentVer(); + if (version.IsGood()) + return CurrentVer().VerStr(); + return 0; +}; + /*}}}*/ +// ostream operator to handle string representation of a package /*{{{*/ +// --------------------------------------------------------------------- +/* Output name < cur.rent.version -> candid.ate.version | new.est.version > (section) + Note that the characters <|>() are all literal above. Versions will be ommited + if they provide no new information (e.g. there is no newer version than candidate) + If no version and/or section can be found "none" is used. */ +std::ostream& +operator<<(ostream& out, pkgCache::PkgIterator Pkg) +{ + if (Pkg.end() == true) + return out << "invalid package"; + + string current = string(Pkg.CurVersion() == 0 ? "none" : Pkg.CurVersion()); + string candidate = string(Pkg.CandVersion() == 0 ? "none" : Pkg.CandVersion()); + string newest = string(Pkg.VersionList().end() ? "none" : Pkg.VersionList().VerStr()); + + out << Pkg.Name() << " < " << current; + if (current != candidate) + out << " -> " << candidate; + if ( newest != "none" && candidate != newest) + out << " | " << newest; + out << " > ( " << string(Pkg.Section()==0?"none":Pkg.Section()) << " )"; + return out; +} + /*}}}*/ // DepIterator::IsCritical - Returns true if the dep is important /*{{{*/ // --------------------------------------------------------------------- /* Currently critical deps are defined as depends, predepends and diff --git a/debian/changelog b/debian/changelog index f1cb7bd0c..bb75ad8af 100644 --- a/debian/changelog +++ b/debian/changelog @@ -22,6 +22,10 @@ apt (0.7.22) UNRELEASED; urgency=low (closes: #189866) * [ABI break] Allow pinning by codename (closes: #97564) * support running "--simulate" as user + * add depth information to the debug output and show what depends + type triggers a autoinst (closes: #458389) + * add debug::pkgDepCache::Marker with more detailed debug output + (closes: #87520) [ Julian Andres Klode ] * apt-pkg/contrib/configuration.cc: Fix a small memory leak in diff --git a/doc/apt.conf.5.xml b/doc/apt.conf.5.xml index fb2be9a28..841bb8f66 100644 --- a/doc/apt.conf.5.xml +++ b/doc/apt.conf.5.xml @@ -679,6 +679,27 @@ DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt";}; + + Debug::pkgDepCache::Marker + + + Generate debug messages describing which package is marked + as keep/install/remove while the ProblemResolver does his work. + Each addition or deletion may trigger additional actions; + they are shown indented two additional space under the original entry. + The format for each line is MarkKeep, + MarkDelete or MarkInstall followed by + package-name <a.b.c -> d.e.f | x.y.z> (section) + where a.b.c is the current version of the package, + d.e.f is the version considered for installation and + x.y.z is a newer version, but not considered for installation + (because of a low pin score). The later two can be omitted if there is none or if + it is the same version as the installed. + section is the name of the section the package appears in. + + + + Debug::pkgInitConfig diff --git a/doc/examples/configure-index b/doc/examples/configure-index index 5f29a2d3f..dd8d667db 100644 --- a/doc/examples/configure-index +++ b/doc/examples/configure-index @@ -289,6 +289,7 @@ Debug { pkgProblemResolver "false"; pkgDepCache::AutoInstall "false"; // what packages apt install to satify dependencies + pkgDepCache::Marker "false"; pkgAcquire "false"; pkgAcquire::Worker "false"; pkgAcquire::Auth "false"; diff --git a/po/apt-all.pot b/po/apt-all.pot index ec87b27a3..2aa99cfa2 100644 --- a/po/apt-all.pot +++ b/po/apt-all.pot @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-11-12 22:07+0100\n" +"POT-Creation-Date: 2009-06-29 17:01+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -156,7 +156,7 @@ msgstr "" #: cmdline/apt-cache.cc:1714 cmdline/apt-cdrom.cc:138 cmdline/apt-config.cc:70 #: cmdline/apt-extracttemplates.cc:225 ftparchive/apt-ftparchive.cc:547 -#: cmdline/apt-get.cc:2573 cmdline/apt-sortpkgs.cc:144 +#: cmdline/apt-get.cc:2582 cmdline/apt-sortpkgs.cc:144 #, c-format msgid "%s %s for %s compiled on %s %s\n" msgstr "" @@ -554,7 +554,7 @@ msgstr "" msgid "Y" msgstr "" -#: cmdline/apt-get.cc:146 cmdline/apt-get.cc:1651 +#: cmdline/apt-get.cc:146 cmdline/apt-get.cc:1658 #, c-format msgid "Regex compilation error - %s" msgstr "" @@ -713,11 +713,11 @@ msgstr "" msgid "Internal error, Ordering didn't finish" msgstr "" -#: cmdline/apt-get.cc:809 cmdline/apt-get.cc:1992 cmdline/apt-get.cc:2025 +#: cmdline/apt-get.cc:809 cmdline/apt-get.cc:1999 cmdline/apt-get.cc:2032 msgid "Unable to lock the download directory" msgstr "" -#: cmdline/apt-get.cc:819 cmdline/apt-get.cc:2073 cmdline/apt-get.cc:2319 +#: cmdline/apt-get.cc:819 cmdline/apt-get.cc:2080 cmdline/apt-get.cc:2326 #: apt-pkg/cachefile.cc:65 msgid "The list of sources could not be read." msgstr "" @@ -746,7 +746,7 @@ msgstr "" msgid "After this operation, %sB disk space will be freed.\n" msgstr "" -#: cmdline/apt-get.cc:864 cmdline/apt-get.cc:2168 +#: cmdline/apt-get.cc:864 cmdline/apt-get.cc:2175 #, c-format msgid "Couldn't determine free space in %s" msgstr "" @@ -780,7 +780,7 @@ msgstr "" msgid "Do you want to continue [Y/n]? " msgstr "" -#: cmdline/apt-get.cc:984 cmdline/apt-get.cc:2216 apt-pkg/algorithms.cc:1349 +#: cmdline/apt-get.cc:984 cmdline/apt-get.cc:2223 apt-pkg/algorithms.cc:1349 #, c-format msgid "Failed to fetch %s %s\n" msgstr "" @@ -789,7 +789,7 @@ msgstr "" msgid "Some files failed to download" msgstr "" -#: cmdline/apt-get.cc:1003 cmdline/apt-get.cc:2225 +#: cmdline/apt-get.cc:1003 cmdline/apt-get.cc:2232 msgid "Download complete and in download only mode" msgstr "" @@ -881,29 +881,34 @@ msgstr "" msgid "Selected version %s (%s) for %s\n" msgstr "" -#: cmdline/apt-get.cc:1338 +#: cmdline/apt-get.cc:1307 +#, c-format +msgid "No source package '%s' picking '%s' instead\n" +msgstr "" + +#: cmdline/apt-get.cc:1345 msgid "The update command takes no arguments" msgstr "" -#: cmdline/apt-get.cc:1351 +#: cmdline/apt-get.cc:1358 msgid "Unable to lock the list directory" msgstr "" -#: cmdline/apt-get.cc:1403 +#: cmdline/apt-get.cc:1410 msgid "We are not supposed to delete stuff, can't start AutoRemover" msgstr "" -#: cmdline/apt-get.cc:1435 +#: cmdline/apt-get.cc:1442 msgid "" "The following packages were automatically installed and are no longer " "required:" msgstr "" -#: cmdline/apt-get.cc:1437 +#: cmdline/apt-get.cc:1444 msgid "Use 'apt-get autoremove' to remove them." msgstr "" -#: cmdline/apt-get.cc:1442 +#: cmdline/apt-get.cc:1449 msgid "" "Hmm, seems like the AutoRemover destroyed something which really\n" "shouldn't happen. Please file a bug report against apt." @@ -919,49 +924,49 @@ msgstr "" #. "that package should be filed.") << endl; #. } #. -#: cmdline/apt-get.cc:1445 cmdline/apt-get.cc:1735 +#: cmdline/apt-get.cc:1452 cmdline/apt-get.cc:1742 msgid "The following information may help to resolve the situation:" msgstr "" -#: cmdline/apt-get.cc:1449 +#: cmdline/apt-get.cc:1456 msgid "Internal Error, AutoRemover broke stuff" msgstr "" -#: cmdline/apt-get.cc:1468 +#: cmdline/apt-get.cc:1475 msgid "Internal error, AllUpgrade broke stuff" msgstr "" -#: cmdline/apt-get.cc:1523 +#: cmdline/apt-get.cc:1530 #, c-format msgid "Couldn't find task %s" msgstr "" -#: cmdline/apt-get.cc:1638 cmdline/apt-get.cc:1674 +#: cmdline/apt-get.cc:1645 cmdline/apt-get.cc:1681 #, c-format msgid "Couldn't find package %s" msgstr "" -#: cmdline/apt-get.cc:1661 +#: cmdline/apt-get.cc:1668 #, c-format msgid "Note, selecting %s for regex '%s'\n" msgstr "" -#: cmdline/apt-get.cc:1692 +#: cmdline/apt-get.cc:1699 #, c-format msgid "%s set to manually installed.\n" msgstr "" -#: cmdline/apt-get.cc:1705 +#: cmdline/apt-get.cc:1712 msgid "You might want to run `apt-get -f install' to correct these:" msgstr "" -#: cmdline/apt-get.cc:1708 +#: cmdline/apt-get.cc:1715 msgid "" "Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a " "solution)." msgstr "" -#: cmdline/apt-get.cc:1720 +#: cmdline/apt-get.cc:1727 msgid "" "Some packages could not be installed. This may mean that you have\n" "requested an impossible situation or if you are using the unstable\n" @@ -969,152 +974,152 @@ msgid "" "or been moved out of Incoming." msgstr "" -#: cmdline/apt-get.cc:1738 +#: cmdline/apt-get.cc:1745 msgid "Broken packages" msgstr "" -#: cmdline/apt-get.cc:1767 +#: cmdline/apt-get.cc:1774 msgid "The following extra packages will be installed:" msgstr "" -#: cmdline/apt-get.cc:1856 +#: cmdline/apt-get.cc:1863 msgid "Suggested packages:" msgstr "" -#: cmdline/apt-get.cc:1857 +#: cmdline/apt-get.cc:1864 msgid "Recommended packages:" msgstr "" -#: cmdline/apt-get.cc:1885 +#: cmdline/apt-get.cc:1892 msgid "Calculating upgrade... " msgstr "" -#: cmdline/apt-get.cc:1888 methods/ftp.cc:702 methods/connect.cc:112 +#: cmdline/apt-get.cc:1895 methods/ftp.cc:702 methods/connect.cc:112 msgid "Failed" msgstr "" -#: cmdline/apt-get.cc:1893 +#: cmdline/apt-get.cc:1900 msgid "Done" msgstr "" -#: cmdline/apt-get.cc:1960 cmdline/apt-get.cc:1968 +#: cmdline/apt-get.cc:1967 cmdline/apt-get.cc:1975 msgid "Internal error, problem resolver broke stuff" msgstr "" -#: cmdline/apt-get.cc:2068 +#: cmdline/apt-get.cc:2075 msgid "Must specify at least one package to fetch source for" msgstr "" -#: cmdline/apt-get.cc:2098 cmdline/apt-get.cc:2337 +#: cmdline/apt-get.cc:2105 cmdline/apt-get.cc:2344 #, c-format msgid "Unable to find a source package for %s" msgstr "" -#: cmdline/apt-get.cc:2147 +#: cmdline/apt-get.cc:2154 #, c-format msgid "Skipping already downloaded file '%s'\n" msgstr "" -#: cmdline/apt-get.cc:2175 +#: cmdline/apt-get.cc:2182 #, c-format msgid "You don't have enough free space in %s" msgstr "" -#: cmdline/apt-get.cc:2181 +#: cmdline/apt-get.cc:2188 #, c-format msgid "Need to get %sB/%sB of source archives.\n" msgstr "" -#: cmdline/apt-get.cc:2184 +#: cmdline/apt-get.cc:2191 #, c-format msgid "Need to get %sB of source archives.\n" msgstr "" -#: cmdline/apt-get.cc:2190 +#: cmdline/apt-get.cc:2197 #, c-format msgid "Fetch source %s\n" msgstr "" -#: cmdline/apt-get.cc:2221 +#: cmdline/apt-get.cc:2228 msgid "Failed to fetch some archives." msgstr "" -#: cmdline/apt-get.cc:2249 +#: cmdline/apt-get.cc:2256 #, c-format msgid "Skipping unpack of already unpacked source in %s\n" msgstr "" -#: cmdline/apt-get.cc:2261 +#: cmdline/apt-get.cc:2268 #, c-format msgid "Unpack command '%s' failed.\n" msgstr "" -#: cmdline/apt-get.cc:2262 +#: cmdline/apt-get.cc:2269 #, c-format msgid "Check if the 'dpkg-dev' package is installed.\n" msgstr "" -#: cmdline/apt-get.cc:2279 +#: cmdline/apt-get.cc:2286 #, c-format msgid "Build command '%s' failed.\n" msgstr "" -#: cmdline/apt-get.cc:2298 +#: cmdline/apt-get.cc:2305 msgid "Child process failed" msgstr "" -#: cmdline/apt-get.cc:2314 +#: cmdline/apt-get.cc:2321 msgid "Must specify at least one package to check builddeps for" msgstr "" -#: cmdline/apt-get.cc:2342 +#: cmdline/apt-get.cc:2349 #, c-format msgid "Unable to get build-dependency information for %s" msgstr "" -#: cmdline/apt-get.cc:2362 +#: cmdline/apt-get.cc:2369 #, c-format msgid "%s has no build depends.\n" msgstr "" -#: cmdline/apt-get.cc:2414 +#: cmdline/apt-get.cc:2421 #, c-format msgid "" "%s dependency for %s cannot be satisfied because the package %s cannot be " "found" msgstr "" -#: cmdline/apt-get.cc:2467 +#: cmdline/apt-get.cc:2474 #, c-format msgid "" "%s dependency for %s cannot be satisfied because no available versions of " "package %s can satisfy version requirements" msgstr "" -#: cmdline/apt-get.cc:2503 +#: cmdline/apt-get.cc:2510 #, c-format msgid "Failed to satisfy %s dependency for %s: Installed package %s is too new" msgstr "" -#: cmdline/apt-get.cc:2528 +#: cmdline/apt-get.cc:2537 #, c-format msgid "Failed to satisfy %s dependency for %s: %s" msgstr "" -#: cmdline/apt-get.cc:2542 +#: cmdline/apt-get.cc:2551 #, c-format msgid "Build-dependencies for %s could not be satisfied." msgstr "" -#: cmdline/apt-get.cc:2546 +#: cmdline/apt-get.cc:2555 msgid "Failed to process build dependencies" msgstr "" -#: cmdline/apt-get.cc:2578 +#: cmdline/apt-get.cc:2587 msgid "Supported modules:" msgstr "" -#: cmdline/apt-get.cc:2619 +#: cmdline/apt-get.cc:2628 msgid "" "Usage: apt-get [options] command\n" " apt-get [options] install|remove pkg1 [pkg2 ...]\n" @@ -1130,7 +1135,7 @@ msgid "" " install - Install new packages (pkg is libc6 not libc6.deb)\n" " remove - Remove packages\n" " autoremove - Remove automatically all unused packages\n" -" purge - Remove and purge packages\n" +" purge - Remove packages and config files\n" " source - Download source archives\n" " build-dep - Configure build-dependencies for source packages\n" " dist-upgrade - Distribution upgrade, see apt-get(8)\n" @@ -1158,6 +1163,14 @@ msgid "" " This APT has Super Cow Powers.\n" msgstr "" +#: cmdline/apt-get.cc:2795 +msgid "" +"NOTE: This is only a simulation!\n" +" apt-get needs root privileges for real execution.\n" +" Keep also in mind that locking is deactivated,\n" +" so don't depend on the relevance to the real current situation!" +msgstr "" + #: cmdline/acqprogress.cc:55 msgid "Hit " msgstr "" @@ -1373,7 +1386,7 @@ msgstr "" msgid "File %s/%s overwrites the one in the package %s" msgstr "" -#: apt-inst/extract.cc:464 apt-pkg/contrib/configuration.cc:821 +#: apt-inst/extract.cc:464 apt-pkg/contrib/configuration.cc:822 #: apt-pkg/contrib/cdromutl.cc:150 apt-pkg/sourcelist.cc:320 #: apt-pkg/acquire.cc:418 apt-pkg/clean.cc:34 #, c-format @@ -1666,7 +1679,7 @@ msgstr "" msgid "Unable to accept connection" msgstr "" -#: methods/ftp.cc:864 methods/http.cc:960 methods/rsh.cc:303 +#: methods/ftp.cc:864 methods/http.cc:991 methods/rsh.cc:303 msgid "Problem hashing file" msgstr "" @@ -1750,38 +1763,38 @@ msgstr "" msgid "Unable to connect to %s %s:" msgstr "" -#: methods/gpgv.cc:65 +#: methods/gpgv.cc:71 #, c-format msgid "Couldn't access keyring: '%s'" msgstr "" -#: methods/gpgv.cc:101 +#: methods/gpgv.cc:107 msgid "E: Argument list from Acquire::gpgv::Options too long. Exiting." msgstr "" -#: methods/gpgv.cc:205 +#: methods/gpgv.cc:223 msgid "" "Internal error: Good signature, but could not determine key fingerprint?!" msgstr "" -#: methods/gpgv.cc:210 +#: methods/gpgv.cc:228 msgid "At least one invalid signature was encountered." msgstr "" -#: methods/gpgv.cc:214 +#: methods/gpgv.cc:232 #, c-format msgid "Could not execute '%s' to verify signature (is gpgv installed?)" msgstr "" -#: methods/gpgv.cc:219 +#: methods/gpgv.cc:237 msgid "Unknown error executing gpgv" msgstr "" -#: methods/gpgv.cc:250 +#: methods/gpgv.cc:271 methods/gpgv.cc:278 msgid "The following signatures were invalid:\n" msgstr "" -#: methods/gpgv.cc:257 +#: methods/gpgv.cc:285 msgid "" "The following signatures couldn't be verified because the public key is not " "available:\n" @@ -1797,80 +1810,80 @@ msgstr "" msgid "Read error from %s process" msgstr "" -#: methods/http.cc:377 +#: methods/http.cc:379 msgid "Waiting for headers" msgstr "" -#: methods/http.cc:523 +#: methods/http.cc:525 #, c-format msgid "Got a single header line over %u chars" msgstr "" -#: methods/http.cc:531 +#: methods/http.cc:533 msgid "Bad header line" msgstr "" -#: methods/http.cc:550 methods/http.cc:557 +#: methods/http.cc:552 methods/http.cc:559 msgid "The HTTP server sent an invalid reply header" msgstr "" -#: methods/http.cc:586 +#: methods/http.cc:588 msgid "The HTTP server sent an invalid Content-Length header" msgstr "" -#: methods/http.cc:601 +#: methods/http.cc:603 msgid "The HTTP server sent an invalid Content-Range header" msgstr "" -#: methods/http.cc:603 +#: methods/http.cc:605 msgid "This HTTP server has broken range support" msgstr "" -#: methods/http.cc:627 +#: methods/http.cc:629 msgid "Unknown date format" msgstr "" -#: methods/http.cc:774 +#: methods/http.cc:782 msgid "Select failed" msgstr "" -#: methods/http.cc:779 +#: methods/http.cc:787 msgid "Connection timed out" msgstr "" -#: methods/http.cc:802 +#: methods/http.cc:810 msgid "Error writing to output file" msgstr "" -#: methods/http.cc:833 +#: methods/http.cc:841 msgid "Error writing to file" msgstr "" -#: methods/http.cc:861 +#: methods/http.cc:869 msgid "Error writing to the file" msgstr "" -#: methods/http.cc:875 +#: methods/http.cc:883 msgid "Error reading from server. Remote end closed connection" msgstr "" -#: methods/http.cc:877 +#: methods/http.cc:885 msgid "Error reading from server" msgstr "" -#: methods/http.cc:945 apt-pkg/contrib/mmap.cc:196 +#: methods/http.cc:976 apt-pkg/contrib/mmap.cc:196 msgid "Failed to truncate file" msgstr "" -#: methods/http.cc:1105 +#: methods/http.cc:1141 msgid "Bad header data" msgstr "" -#: methods/http.cc:1122 methods/http.cc:1177 +#: methods/http.cc:1158 methods/http.cc:1213 msgid "Connection failed" msgstr "" -#: methods/http.cc:1229 +#: methods/http.cc:1305 msgid "Internal error" msgstr "" @@ -1890,7 +1903,31 @@ msgid "" "Current value: %lu. (man 5 apt.conf)" msgstr "" -#: apt-pkg/contrib/strutl.cc:1014 +#. d means days, h means hours, min means minutes, s means seconds +#: apt-pkg/contrib/strutl.cc:335 +#, c-format +msgid "%lid %lih %limin %lis" +msgstr "" + +#. h means hours, min means minutes, s means seconds +#: apt-pkg/contrib/strutl.cc:342 +#, c-format +msgid "%lih %limin %lis" +msgstr "" + +#. min means minutes, s means seconds +#: apt-pkg/contrib/strutl.cc:349 +#, c-format +msgid "%limin %lis" +msgstr "" + +#. s means seconds +#: apt-pkg/contrib/strutl.cc:354 +#, c-format +msgid "%lis" +msgstr "" + +#: apt-pkg/contrib/strutl.cc:1018 #, c-format msgid "Selection %s not found" msgstr "" @@ -1905,42 +1942,42 @@ msgstr "" msgid "Opening configuration file %s" msgstr "" -#: apt-pkg/contrib/configuration.cc:662 +#: apt-pkg/contrib/configuration.cc:663 #, c-format msgid "Syntax error %s:%u: Block starts with no name." msgstr "" -#: apt-pkg/contrib/configuration.cc:681 +#: apt-pkg/contrib/configuration.cc:682 #, c-format msgid "Syntax error %s:%u: Malformed tag" msgstr "" -#: apt-pkg/contrib/configuration.cc:698 +#: apt-pkg/contrib/configuration.cc:699 #, c-format msgid "Syntax error %s:%u: Extra junk after value" msgstr "" -#: apt-pkg/contrib/configuration.cc:738 +#: apt-pkg/contrib/configuration.cc:739 #, c-format msgid "Syntax error %s:%u: Directives can only be done at the top level" msgstr "" -#: apt-pkg/contrib/configuration.cc:745 +#: apt-pkg/contrib/configuration.cc:746 #, c-format msgid "Syntax error %s:%u: Too many nested includes" msgstr "" -#: apt-pkg/contrib/configuration.cc:749 apt-pkg/contrib/configuration.cc:754 +#: apt-pkg/contrib/configuration.cc:750 apt-pkg/contrib/configuration.cc:755 #, c-format msgid "Syntax error %s:%u: Included from here" msgstr "" -#: apt-pkg/contrib/configuration.cc:758 +#: apt-pkg/contrib/configuration.cc:759 #, c-format msgid "Syntax error %s:%u: Unsupported directive '%s'" msgstr "" -#: apt-pkg/contrib/configuration.cc:809 +#: apt-pkg/contrib/configuration.cc:810 #, c-format msgid "Syntax error %s:%u: Extra junk at end of file" msgstr "" @@ -2083,101 +2120,105 @@ msgstr "" msgid "Problem syncing the file" msgstr "" -#: apt-pkg/pkgcache.cc:132 +#: apt-pkg/pkgcache.cc:133 msgid "Empty package cache" msgstr "" -#: apt-pkg/pkgcache.cc:138 +#: apt-pkg/pkgcache.cc:139 msgid "The package cache file is corrupted" msgstr "" -#: apt-pkg/pkgcache.cc:143 +#: apt-pkg/pkgcache.cc:144 msgid "The package cache file is an incompatible version" msgstr "" -#: apt-pkg/pkgcache.cc:148 +#: apt-pkg/pkgcache.cc:149 #, c-format msgid "This APT does not support the versioning system '%s'" msgstr "" -#: apt-pkg/pkgcache.cc:153 +#: apt-pkg/pkgcache.cc:154 msgid "The package cache was built for a different architecture" msgstr "" -#: apt-pkg/pkgcache.cc:224 +#: apt-pkg/pkgcache.cc:225 msgid "Depends" msgstr "" -#: apt-pkg/pkgcache.cc:224 +#: apt-pkg/pkgcache.cc:225 msgid "PreDepends" msgstr "" -#: apt-pkg/pkgcache.cc:224 +#: apt-pkg/pkgcache.cc:225 msgid "Suggests" msgstr "" -#: apt-pkg/pkgcache.cc:225 +#: apt-pkg/pkgcache.cc:226 msgid "Recommends" msgstr "" -#: apt-pkg/pkgcache.cc:225 +#: apt-pkg/pkgcache.cc:226 msgid "Conflicts" msgstr "" -#: apt-pkg/pkgcache.cc:225 +#: apt-pkg/pkgcache.cc:226 msgid "Replaces" msgstr "" -#: apt-pkg/pkgcache.cc:226 +#: apt-pkg/pkgcache.cc:227 msgid "Obsoletes" msgstr "" -#: apt-pkg/pkgcache.cc:226 +#: apt-pkg/pkgcache.cc:227 msgid "Breaks" msgstr "" -#: apt-pkg/pkgcache.cc:237 +#: apt-pkg/pkgcache.cc:227 +msgid "Enhances" +msgstr "" + +#: apt-pkg/pkgcache.cc:238 msgid "important" msgstr "" -#: apt-pkg/pkgcache.cc:237 +#: apt-pkg/pkgcache.cc:238 msgid "required" msgstr "" -#: apt-pkg/pkgcache.cc:237 +#: apt-pkg/pkgcache.cc:238 msgid "standard" msgstr "" -#: apt-pkg/pkgcache.cc:238 +#: apt-pkg/pkgcache.cc:239 msgid "optional" msgstr "" -#: apt-pkg/pkgcache.cc:238 +#: apt-pkg/pkgcache.cc:239 msgid "extra" msgstr "" -#: apt-pkg/depcache.cc:121 apt-pkg/depcache.cc:150 +#: apt-pkg/depcache.cc:130 apt-pkg/depcache.cc:159 msgid "Building dependency tree" msgstr "" -#: apt-pkg/depcache.cc:122 +#: apt-pkg/depcache.cc:131 msgid "Candidate versions" msgstr "" -#: apt-pkg/depcache.cc:151 +#: apt-pkg/depcache.cc:160 msgid "Dependency generation" msgstr "" -#: apt-pkg/depcache.cc:172 apt-pkg/depcache.cc:191 apt-pkg/depcache.cc:195 +#: apt-pkg/depcache.cc:181 apt-pkg/depcache.cc:200 apt-pkg/depcache.cc:204 msgid "Reading state information" msgstr "" -#: apt-pkg/depcache.cc:219 +#: apt-pkg/depcache.cc:228 #, c-format msgid "Failed to open StateFile %s" msgstr "" -#: apt-pkg/depcache.cc:225 +#: apt-pkg/depcache.cc:234 #, c-format msgid "Failed to write temporary StateFile %s" msgstr "" @@ -2309,7 +2350,7 @@ msgstr "" msgid "Method %s did not start correctly" msgstr "" -#: apt-pkg/acquire-worker.cc:399 +#: apt-pkg/acquire-worker.cc:413 #, c-format msgid "Please insert the disc labeled: '%s' in the drive '%s' and press enter." msgstr "" @@ -2340,16 +2381,16 @@ msgstr "" msgid "You may want to run apt-get update to correct these problems" msgstr "" -#: apt-pkg/policy.cc:267 +#: apt-pkg/policy.cc:281 msgid "Invalid record in the preferences file, no Package header" msgstr "" -#: apt-pkg/policy.cc:289 +#: apt-pkg/policy.cc:303 #, c-format msgid "Did not understand pin type %s" msgstr "" -#: apt-pkg/policy.cc:297 +#: apt-pkg/policy.cc:311 msgid "No priority (or zero) specified for pin" msgstr "" @@ -2660,10 +2701,14 @@ msgstr "" msgid "Completely removed %s" msgstr "" -#: apt-pkg/deb/dpkgpm.cc:791 +#: apt-pkg/deb/dpkgpm.cc:789 msgid "Can not write log, openpty() failed (/dev/pts not mounted?)\n" msgstr "" +#: apt-pkg/deb/debsystem.cc:100 +msgid "Not locked" +msgstr "" + #: methods/rred.cc:219 msgid "Could not patch file" msgstr "" -- cgit v1.2.3-70-g09d2 From c6aa14e46842b0059c1648125562793e5edd08ee Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 24 Aug 2009 11:20:27 +0200 Subject: * apt-pkg/pkgcache.cc: - do not set internel "needs-configure" state for packages in triggers-pending state. dpkg will deal with the trigger and it if does it before we trigger it, dpkg will error out (LP: #414631) --- apt-pkg/pkgcache.cc | 12 ++++++------ debian/changelog | 7 +++++++ 2 files changed, 13 insertions(+), 6 deletions(-) (limited to 'apt-pkg/pkgcache.cc') diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc index 2a9756c45..b0ce6e598 100644 --- a/apt-pkg/pkgcache.cc +++ b/apt-pkg/pkgcache.cc @@ -275,13 +275,13 @@ pkgCache::PkgIterator::OkState pkgCache::PkgIterator::State() const return NeedsUnpack; if (Pkg->CurrentState == pkgCache::State::UnPacked || - Pkg->CurrentState == pkgCache::State::HalfConfigured || - //we don't need to care for triggers awaiting packages - //dpkg will deal with them automatically when the - //trigger pending action is run (those packages are usually - //in half-configured or triggers-pending state) + Pkg->CurrentState == pkgCache::State::HalfConfigured) + // we leave triggers alone complettely. dpkg deals with + // them in a hard-to-predict manner and if they get + // resolved by dpkg before apt run dpkg --configure on + // the TriggersPending package dpkg returns a error //Pkg->CurrentState == pkgCache::State::TriggersAwaited - Pkg->CurrentState == pkgCache::State::TriggersPending) + //Pkg->CurrentState == pkgCache::State::TriggersPending) return NeedsConfigure; if (Pkg->CurrentState == pkgCache::State::HalfInstalled || diff --git a/debian/changelog b/debian/changelog index 2131b8077..6692191d1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,6 +7,13 @@ apt (0.7.22.3) UNRELEASED; urgency=low and '{http,ftp}_proxy' environment variables are used only if options mentioned above are not specified. (Closes: #445985, #157759, #320184, #365880, #479617) + + [ Michael Vogt ] + * apt-pkg/pkgcache.cc: + - do not set internel "needs-configure" state for packages in + triggers-pending state. dpkg will deal with the trigger and + it if does it before we trigger it, dpkg will error out + (LP: #414631) -- Michael Vogt Wed, 19 Aug 2009 11:14:15 +0200 -- cgit v1.2.3-70-g09d2