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/depcache.cc | 47 ++++++++++++++++++++++++++++++++++------------- 1 file changed, 34 insertions(+), 13 deletions(-) (limited to 'apt-pkg/depcache.cc') 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); -- cgit v1.2.3-70-g09d2 From 2d403b92011c6e4a317a48284e7c68952ce5ddcd Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 29 Jun 2009 18:20:58 +0200 Subject: add hook for auto-install (closes: #470035) --- apt-pkg/depcache.cc | 20 ++++++++++++++++++++ apt-pkg/depcache.h | 13 +++++++++++++ debian/changelog | 1 + 3 files changed, 34 insertions(+) (limited to 'apt-pkg/depcache.cc') diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index e9ef9cedc..fcc6f4a4e 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -853,6 +853,17 @@ void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst, // We dont even try to install virtual packages.. if (Pkg->VersionList == 0) return; + + /* if the user doesn't request directly the install we have to check + if this install will conflict with any rule a application + like apt-get or aptitude might has set (for the user) + e.g. forbidden versions, holds or other magic stuff */ + if(FromUser == false && !IsAutoInstallOk(Pkg, Depth)) + { + MarkKeep(Pkg, false, FromUser, Depth); + return; + } + /* Target the candidate version and remove the autoflag. We reset the autoflag below if this was called recursively. Otherwise the user should have the ability to de-auto a package by changing its state */ @@ -1059,6 +1070,15 @@ void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst, } } /*}}}*/ +// DepCache::IsAutoInstallOk - check if it is to install this package /*{{{*/ +// --------------------------------------------------------------------- +/* The default implementation is useless, but an application using this + library can override this method to control the MarkInstall behaviour */ +bool pkgDepCache::IsAutoInstallOk(const PkgIterator &Pkg, unsigned long Depth) +{ + return true; +} + /*}}}*/ // DepCache::SetReInstall - Set the reinstallation flag /*{{{*/ // --------------------------------------------------------------------- /* */ diff --git a/apt-pkg/depcache.h b/apt-pkg/depcache.h index 2d33e21d7..e6110ea19 100644 --- a/apt-pkg/depcache.h +++ b/apt-pkg/depcache.h @@ -396,6 +396,19 @@ class pkgDepCache : protected pkgCache::Namespace void MarkInstall(PkgIterator const &Pkg,bool AutoInst = true, unsigned long Depth = 0, bool FromUser = true, bool ForceImportantDeps = false); + + /** \return \b true if it's OK for MarkInstall to recursively + * install the given package automatically. + * + * \param Pkg the package that MarkInstall wants to install. + * + * \param Depth output depth used for the debugging messages + * + * The default implementation unconditionally returns \b true. + */ + virtual bool IsAutoInstallOk(const PkgIterator &Pkg, + unsigned long Depth = 0); + void SetReInstall(PkgIterator const &Pkg,bool To); void SetCandidateVersion(VerIterator TargetVer); diff --git a/debian/changelog b/debian/changelog index dd79639c6..aadaa0856 100644 --- a/debian/changelog +++ b/debian/changelog @@ -29,6 +29,7 @@ apt (0.7.22) UNRELEASED; urgency=low * add Debug::pkgProblemResolver::ShowScores and make the scores adjustable * do not write state file in simulate mode (closes: #433007) + * add hook for auto-install (closes: #470035) [ Julian Andres Klode ] * apt-pkg/contrib/configuration.cc: Fix a small memory leak in -- cgit v1.2.3-70-g09d2 From fa3b09450ed3da175f619ca77d9dceb9a6f81972 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 29 Jun 2009 18:23:07 +0200 Subject: merge r1797 from lp:~donkult/apt/experimental --- apt-pkg/contrib/strutl.cc | 11 +++++++++++ apt-pkg/contrib/strutl.h | 1 + apt-pkg/depcache.cc | 9 +-------- 3 files changed, 13 insertions(+), 8 deletions(-) (limited to 'apt-pkg/depcache.cc') diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc index a69cf01ec..61c582b85 100644 --- a/apt-pkg/contrib/strutl.cc +++ b/apt-pkg/contrib/strutl.cc @@ -387,6 +387,17 @@ string SubstVar(string Str,const struct SubstVar *Vars) return Str; } /*}}}*/ +// OutputInDepth - return a string with separator multiplied with depth /*{{{*/ +// --------------------------------------------------------------------- +/* Returns a string with the supplied separator depth + 1 times in it */ +std::string OutputInDepth(const unsigned long Depth, const char* Separator) +{ + std::string output = ""; + for(unsigned long d=Depth+1; d > 0; d--) + output.append(Separator); + return output; +} + /*}}}*/ // URItoFileName - Convert the uri into a unique file name /*{{{*/ // --------------------------------------------------------------------- /* This converts a URI into a safe filename. It quotes all unsafe characters diff --git a/apt-pkg/contrib/strutl.h b/apt-pkg/contrib/strutl.h index 53146ced7..2450bd421 100644 --- a/apt-pkg/contrib/strutl.h +++ b/apt-pkg/contrib/strutl.h @@ -48,6 +48,7 @@ string DeQuoteString(const string &Str); string SizeToStr(double Bytes); string TimeToStr(unsigned long Sec); string Base64Encode(const string &Str); +string OutputInDepth(const unsigned long Depth, const char* Separator=" "); string URItoFileName(const string &URI); string TimeRFC1123(time_t Date); bool StrToTime(const string &Val,time_t &Result); diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index fcc6f4a4e..9f734cca2 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -15,6 +15,7 @@ #include #include +#include #include #include #include @@ -47,14 +48,6 @@ 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) { -- cgit v1.2.3-70-g09d2 From d6ebeb21ddb3d8f3d485562cdac0e0878d50c936 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 29 Jun 2009 18:40:42 +0200 Subject: * support IsAutoInstallOk in the resolver too * honor the dpkg hold state in IsAutoInstallOk (closes: #64141) --- apt-pkg/algorithms.cc | 28 ++++++++++++++++++++-------- apt-pkg/depcache.cc | 2 +- debian/changelog | 4 ++++ 3 files changed, 25 insertions(+), 9 deletions(-) (limited to 'apt-pkg/depcache.cc') diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc index 4b1bb4430..db370a044 100644 --- a/apt-pkg/algorithms.cc +++ b/apt-pkg/algorithms.cc @@ -985,15 +985,27 @@ bool pkgProblemResolver::Resolve(bool BrokenFix) // Consider other options if (InOr == false) { - if (Debug == true) - clog << " Removing " << I.Name() << " rather than change " << Start.TargetPkg().Name() << endl; - Cache.MarkDelete(I); - if (Counter > 1) + if (Cache.IsAutoInstallOk(I) == true) { - if (Scores[Pkg->ID] > Scores[I->ID]) - Scores[I->ID] = Scores[Pkg->ID]; - } - } + if (Debug == true) + clog << " Removing " << I.Name() << " rather than change " << Start.TargetPkg().Name() << endl; + Cache.MarkDelete(I); + if (Counter > 1) + { + if (Scores[Pkg->ID] > Scores[I->ID]) + Scores[I->ID] = Scores[Pkg->ID]; + } + } else { + /* The dependency of the TargetPkg would be satisfiable with I but it is + forbidden to install I automatical, so anything we can do is hold + back the TargetPkg. + */ + if (Debug == true) + clog << " Hold back " << Start.TargetPkg().Name() << + " rather than change denied AutoInstall " << I.Name() << endl; + Cache.MarkKeep(Start.TargetPkg()); + } + } } } diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index 9f734cca2..8af6941cf 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -1069,7 +1069,7 @@ void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst, library can override this method to control the MarkInstall behaviour */ bool pkgDepCache::IsAutoInstallOk(const PkgIterator &Pkg, unsigned long Depth) { - return true; + return (Pkg->SelectedState != pkgCache::State::Hold); } /*}}}*/ // DepCache::SetReInstall - Set the reinstallation flag /*{{{*/ diff --git a/debian/changelog b/debian/changelog index aadaa0856..8610b6376 100644 --- a/debian/changelog +++ b/debian/changelog @@ -30,7 +30,11 @@ apt (0.7.22) UNRELEASED; urgency=low adjustable * do not write state file in simulate mode (closes: #433007) * add hook for auto-install (closes: #470035) + * support IsAutoInstallOk in the resolver too + [ Michael Vogt ] + * honor the dpkg hold state in IsAutoInstallOk (closes: #64141) + [ Julian Andres Klode ] * apt-pkg/contrib/configuration.cc: Fix a small memory leak in ReadConfigFile. -- cgit v1.2.3-70-g09d2 From d116d66834b77cc77750c89969c43e0ba9d5807e Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 30 Jun 2009 13:52:52 +0200 Subject: merge the AutoInstOk patch from debian-experimental --- apt-pkg/algorithms.cc | 2 +- apt-pkg/depcache.cc | 35 ++++++++++++++++------------------- apt-pkg/depcache.h | 26 ++++++++++++++------------ debian/changelog | 2 +- 4 files changed, 32 insertions(+), 33 deletions(-) (limited to 'apt-pkg/depcache.cc') diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc index db370a044..2ad064319 100644 --- a/apt-pkg/algorithms.cc +++ b/apt-pkg/algorithms.cc @@ -985,7 +985,7 @@ bool pkgProblemResolver::Resolve(bool BrokenFix) // Consider other options if (InOr == false) { - if (Cache.IsAutoInstallOk(I) == true) + if (Cache.AutoInstOk(I, Cache[I].CandidateVerIter(Cache),Start) == true) { if (Debug == true) clog << " Removing " << I.Name() << " rather than change " << Start.TargetPkg().Name() << endl; diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index 8af6941cf..b1b8f970f 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -846,17 +846,6 @@ void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst, // We dont even try to install virtual packages.. if (Pkg->VersionList == 0) return; - - /* if the user doesn't request directly the install we have to check - if this install will conflict with any rule a application - like apt-get or aptitude might has set (for the user) - e.g. forbidden versions, holds or other magic stuff */ - if(FromUser == false && !IsAutoInstallOk(Pkg, Depth)) - { - MarkKeep(Pkg, false, FromUser, Depth); - return; - } - /* Target the candidate version and remove the autoflag. We reset the autoflag below if this was called recursively. Otherwise the user should have the ability to de-auto a package by changing its state */ @@ -1015,7 +1004,8 @@ void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst, } } - if (InstPkg.end() == false) + if (InstPkg.end() == false && + AutoInstOk(InstPkg, (*this)[InstPkg].CandidateVerIter(*this), Start)) { if(DebugAutoInstall == true) std::clog << OutputInDepth(Depth) << "Installing " << InstPkg.Name() @@ -1053,21 +1043,28 @@ void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst, PkgIterator Pkg = Ver.ParentPkg(); if (Start->Type != Dep::DpkgBreaks) - MarkDelete(Pkg,false,Depth + 1); + { + if(AutoInstOk(Pkg, VerIterator(*this), Start)) + MarkDelete(Pkg); + } else - if (PkgState[Pkg->ID].CandidateVer != *I) + if (PkgState[Pkg->ID].CandidateVer != *I && + AutoInstOk(Pkg, VerIterator(*this, PkgState[Pkg->ID].CandidateVer), Start)) MarkInstall(Pkg,true,Depth + 1, false, ForceImportantDeps); } continue; } } } - /*}}}*/ -// DepCache::IsAutoInstallOk - check if it is to install this package /*{{{*/ + +// DepCache::AutoInstOk - check if it is to install this package /*{{{*/ // --------------------------------------------------------------------- -/* The default implementation is useless, but an application using this - library can override this method to control the MarkInstall behaviour */ -bool pkgDepCache::IsAutoInstallOk(const PkgIterator &Pkg, unsigned long Depth) +/* The default implementation just honors dpkg hold + But an application using this library can override this method + to control the MarkInstall behaviour */ +bool pkgDepCache::AutoInstOk(const PkgIterator &Pkg, + const VerIterator &v, + const DepIterator &d) { return (Pkg->SelectedState != pkgCache::State::Hold); } diff --git a/apt-pkg/depcache.h b/apt-pkg/depcache.h index e6110ea19..10f9c1091 100644 --- a/apt-pkg/depcache.h +++ b/apt-pkg/depcache.h @@ -363,6 +363,20 @@ class pkgDepCache : protected pkgCache::Namespace */ virtual bool MarkFollowsSuggests(); + /** \return \b true if it's OK for MarkInstall to recursively + * install the given version of the given package. + * + * \param p the package that MarkInstall wants to install. + * \param v the version being installed, or an end iterator + * if p is being removed. + * \param d the dependency being fixed. + * + * The default implementation unconditionally returns \b true. + */ + virtual bool AutoInstOk(const PkgIterator &p, + const VerIterator &v, + const DepIterator &d); + /** \brief Update the Marked and Garbage fields of all packages. * * This routine is implicitly invoked after all state manipulators @@ -397,18 +411,6 @@ class pkgDepCache : protected pkgCache::Namespace unsigned long Depth = 0, bool FromUser = true, bool ForceImportantDeps = false); - /** \return \b true if it's OK for MarkInstall to recursively - * install the given package automatically. - * - * \param Pkg the package that MarkInstall wants to install. - * - * \param Depth output depth used for the debugging messages - * - * The default implementation unconditionally returns \b true. - */ - virtual bool IsAutoInstallOk(const PkgIterator &Pkg, - unsigned long Depth = 0); - void SetReInstall(PkgIterator const &Pkg,bool To); void SetCandidateVersion(VerIterator TargetVer); diff --git a/debian/changelog b/debian/changelog index 8610b6376..333640b18 100644 --- a/debian/changelog +++ b/debian/changelog @@ -33,7 +33,7 @@ apt (0.7.22) UNRELEASED; urgency=low * support IsAutoInstallOk in the resolver too [ Michael Vogt ] - * honor the dpkg hold state in IsAutoInstallOk (closes: #64141) + * honor the dpkg hold state in AutoInstOk (closes: #64141) [ Julian Andres Klode ] * apt-pkg/contrib/configuration.cc: Fix a small memory leak in -- cgit v1.2.3-70-g09d2 From 92fcbfc16396d9a2fbde0edb0902d4ebe7ff0090 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 30 Jun 2009 21:37:30 +0200 Subject: add the various foldmarkers in apt-pkg & cmdline (no code change) --- apt-pkg/acquire-item.cc | 102 +++++------- apt-pkg/acquire-item.h | 44 ++--- apt-pkg/acquire-method.cc | 2 - apt-pkg/acquire.cc | 5 +- apt-pkg/acquire.h | 24 +-- apt-pkg/algorithms.cc | 3 - apt-pkg/algorithms.h | 8 +- apt-pkg/cachefile.cc | 3 - apt-pkg/cacheiterators.h | 36 ++--- apt-pkg/cdrom.cc | 18 +-- apt-pkg/cdrom.h | 9 +- apt-pkg/clean.cc | 1 - apt-pkg/contrib/hashes.cc | 11 +- apt-pkg/contrib/sha256.cc | 32 ++-- apt-pkg/depcache.cc | 54 +++---- apt-pkg/indexcopy.cc | 16 +- apt-pkg/indexcopy.h | 22 ++- apt-pkg/indexfile.cc | 1 - apt-pkg/indexrecords.cc | 14 +- apt-pkg/orderlist.cc | 10 +- apt-pkg/packagemanager.cc | 4 +- apt-pkg/pkgcache.h | 48 +++--- apt-pkg/pkgcachegen.cc | 1 - apt-pkg/pkgcachegen.h | 8 +- apt-pkg/pkgrecords.h | 8 +- apt-pkg/vendorlist.cc | 19 +-- cmdline/apt-cache.cc | 19 +-- cmdline/apt-cdrom.cc | 10 +- cmdline/apt-config.cc | 4 +- cmdline/apt-extracttemplates.cc | 4 +- cmdline/apt-get.cc | 18 +-- cmdline/apt-sortpkgs.cc | 8 +- debian/changelog | 1 + po/apt-all.pot | 348 ++++++++++++++++++++-------------------- 34 files changed, 420 insertions(+), 495 deletions(-) (limited to 'apt-pkg/depcache.cc') diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 09ea5da02..39ae327cb 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -131,9 +131,7 @@ void pkgAcquire::Item::Rename(string From,string To) } } /*}}}*/ - - -// AcqDiffIndex::AcqDiffIndex - Constructor +// AcqDiffIndex::AcqDiffIndex - Constructor /*{{{*/ // --------------------------------------------------------------------- /* Get the DiffIndex file first and see if there are patches availabe * If so, create a pkgAcqIndexDiffs fetcher that will get and apply the @@ -184,7 +182,7 @@ pkgAcqDiffIndex::pkgAcqDiffIndex(pkgAcquire *Owner, QueueURI(Desc); } - + /*}}}*/ // AcqIndex::Custom600Headers - Insert custom request headers /*{{{*/ // --------------------------------------------------------------------- /* The only header we use is the last-modified header. */ @@ -202,9 +200,8 @@ string pkgAcqDiffIndex::Custom600Headers() return "\nIndex-File: true\nLast-Modified: " + TimeRFC1123(Buf.st_mtime); } - - -bool pkgAcqDiffIndex::ParseDiffIndex(string IndexDiffFile) + /*}}}*/ +bool pkgAcqDiffIndex::ParseDiffIndex(string IndexDiffFile) /*{{{*/ { if(Debug) std::clog << "pkgAcqIndexDiffs::ParseIndexDiff() " << IndexDiffFile @@ -291,8 +288,8 @@ bool pkgAcqDiffIndex::ParseDiffIndex(string IndexDiffFile) std::clog << "Can't find a patch in the index file" << std::endl; return false; } - -void pkgAcqDiffIndex::Failed(string Message,pkgAcquire::MethodConfig *Cnf) + /*}}}*/ +void pkgAcqDiffIndex::Failed(string Message,pkgAcquire::MethodConfig *Cnf) /*{{{*/ { if(Debug) std::clog << "pkgAcqDiffIndex failed: " << Desc.URI << std::endl @@ -305,8 +302,8 @@ void pkgAcqDiffIndex::Failed(string Message,pkgAcquire::MethodConfig *Cnf) Status = StatDone; Dequeue(); } - -void pkgAcqDiffIndex::Done(string Message,unsigned long Size,string Md5Hash, + /*}}}*/ +void pkgAcqDiffIndex::Done(string Message,unsigned long Size,string Md5Hash, /*{{{*/ pkgAcquire::MethodConfig *Cnf) { if(Debug) @@ -335,10 +332,8 @@ void pkgAcqDiffIndex::Done(string Message,unsigned long Size,string Md5Hash, Dequeue(); return; } - - - -// AcqIndexDiffs::AcqIndexDiffs - Constructor + /*}}}*/ +// AcqIndexDiffs::AcqIndexDiffs - Constructor /*{{{*/ // --------------------------------------------------------------------- /* The package diff is added to the queue. one object is constructed * for each diff and the index @@ -372,9 +367,8 @@ pkgAcqIndexDiffs::pkgAcqIndexDiffs(pkgAcquire *Owner, QueueNextDiff(); } } - - -void pkgAcqIndexDiffs::Failed(string Message,pkgAcquire::MethodConfig *Cnf) + /*}}}*/ +void pkgAcqIndexDiffs::Failed(string Message,pkgAcquire::MethodConfig *Cnf) /*{{{*/ { if(Debug) std::clog << "pkgAcqIndexDiffs failed: " << Desc.URI << std::endl @@ -383,9 +377,8 @@ void pkgAcqIndexDiffs::Failed(string Message,pkgAcquire::MethodConfig *Cnf) ExpectedHash); Finish(); } - - -// helper that cleans the item out of the fetcher queue + /*}}}*/ +// Finish - helper that cleans the item out of the fetcher queue /*{{{*/ void pkgAcqIndexDiffs::Finish(bool allDone) { // we restore the original name, this is required, otherwise @@ -420,10 +413,8 @@ void pkgAcqIndexDiffs::Finish(bool allDone) Dequeue(); return; } - - - -bool pkgAcqIndexDiffs::QueueNextDiff() + /*}}}*/ +bool pkgAcqIndexDiffs::QueueNextDiff() /*{{{*/ { // calc sha1 of the just patched file @@ -469,10 +460,8 @@ bool pkgAcqIndexDiffs::QueueNextDiff() return true; } - - - -void pkgAcqIndexDiffs::Done(string Message,unsigned long Size,string Md5Hash, + /*}}}*/ +void pkgAcqIndexDiffs::Done(string Message,unsigned long Size,string Md5Hash, /*{{{*/ pkgAcquire::MethodConfig *Cnf) { if(Debug) @@ -543,8 +532,7 @@ void pkgAcqIndexDiffs::Done(string Message,unsigned long Size,string Md5Hash, return Finish(true); } } - - + /*}}}*/ // AcqIndex::AcqIndex - Constructor /*{{{*/ // --------------------------------------------------------------------- /* The package file is added to the queue and a second class is @@ -594,8 +582,7 @@ string pkgAcqIndex::Custom600Headers() return "\nIndex-File: true\nLast-Modified: " + TimeRFC1123(Buf.st_mtime); } /*}}}*/ - -void pkgAcqIndex::Failed(string Message,pkgAcquire::MethodConfig *Cnf) +void pkgAcqIndex::Failed(string Message,pkgAcquire::MethodConfig *Cnf) /*{{{*/ { bool descChanged = false; // no .bz2 found, retry with .gz @@ -630,8 +617,7 @@ void pkgAcqIndex::Failed(string Message,pkgAcquire::MethodConfig *Cnf) Item::Failed(Message,Cnf); } - - + /*}}}*/ // AcqIndex::Done - Finished a fetch /*{{{*/ // --------------------------------------------------------------------- /* This goes through a number of states.. On the initial fetch the @@ -735,7 +721,7 @@ void pkgAcqIndex::Done(string Message,unsigned long Size,string Hash, QueueURI(Desc); Mode = decompProg; } - + /*}}}*/ // AcqIndexTrans::pkgAcqIndexTrans - Constructor /*{{{*/ // --------------------------------------------------------------------- /* The Translation file is added to the queue */ @@ -744,7 +730,6 @@ pkgAcqIndexTrans::pkgAcqIndexTrans(pkgAcquire *Owner, : pkgAcqIndex(Owner, URI, URIDesc, ShortDesc, HashString(), "") { } - /*}}}*/ // AcqIndexTrans::Failed - Silence failure messages for missing files /*{{{*/ // --------------------------------------------------------------------- @@ -764,8 +749,7 @@ void pkgAcqIndexTrans::Failed(string Message,pkgAcquire::MethodConfig *Cnf) Item::Failed(Message,Cnf); } /*}}}*/ - -pkgAcqMetaSig::pkgAcqMetaSig(pkgAcquire *Owner, +pkgAcqMetaSig::pkgAcqMetaSig(pkgAcquire *Owner, /*{{{*/ string URI,string URIDesc,string ShortDesc, string MetaIndexURI, string MetaIndexURIDesc, string MetaIndexShortDesc, @@ -854,7 +838,7 @@ void pkgAcqMetaSig::Done(string Message,unsigned long Size,string MD5, } /*}}}*/ -void pkgAcqMetaSig::Failed(string Message,pkgAcquire::MethodConfig *Cnf) +void pkgAcqMetaSig::Failed(string Message,pkgAcquire::MethodConfig *Cnf)/*{{{*/ { string Final = _config->FindDir("Dir::State::lists") + URItoFileName(RealURI); @@ -890,8 +874,8 @@ void pkgAcqMetaSig::Failed(string Message,pkgAcquire::MethodConfig *Cnf) Item::Failed(Message,Cnf); } - -pkgAcqMetaIndex::pkgAcqMetaIndex(pkgAcquire *Owner, + /*}}}*/ +pkgAcqMetaIndex::pkgAcqMetaIndex(pkgAcquire *Owner, /*{{{*/ string URI,string URIDesc,string ShortDesc, string SigFile, const vector* IndexTargets, @@ -910,7 +894,6 @@ pkgAcqMetaIndex::pkgAcqMetaIndex(pkgAcquire *Owner, QueueURI(Desc); } - /*}}}*/ // pkgAcqMetaIndex::Custom600Headers - Insert custom request headers /*{{{*/ // --------------------------------------------------------------------- @@ -926,8 +909,8 @@ string pkgAcqMetaIndex::Custom600Headers() return "\nIndex-File: true\nLast-Modified: " + TimeRFC1123(Buf.st_mtime); } - -void pkgAcqMetaIndex::Done(string Message,unsigned long Size,string Hash, + /*}}}*/ +void pkgAcqMetaIndex::Done(string Message,unsigned long Size,string Hash, /*{{{*/ pkgAcquire::MethodConfig *Cfg) { Item::Done(Message,Size,Hash,Cfg); @@ -968,8 +951,8 @@ void pkgAcqMetaIndex::Done(string Message,unsigned long Size,string Hash, } } } - -void pkgAcqMetaIndex::RetrievalDone(string Message) + /*}}}*/ +void pkgAcqMetaIndex::RetrievalDone(string Message) /*{{{*/ { // We have just finished downloading a Release file (it is not // verified yet) @@ -1007,8 +990,8 @@ void pkgAcqMetaIndex::RetrievalDone(string Message) chmod(FinalFile.c_str(),0644); DestFile = FinalFile; } - -void pkgAcqMetaIndex::AuthDone(string Message) + /*}}}*/ +void pkgAcqMetaIndex::AuthDone(string Message) /*{{{*/ { // At this point, the gpgv method has succeeded, so there is a // valid signature from a key in the trusted keyring. We @@ -1041,8 +1024,8 @@ void pkgAcqMetaIndex::AuthDone(string Message) Rename(SigFile,VerifiedSigFile); chmod(VerifiedSigFile.c_str(),0644); } - -void pkgAcqMetaIndex::QueueIndexes(bool verify) + /*}}}*/ +void pkgAcqMetaIndex::QueueIndexes(bool verify) /*{{{*/ { for (vector ::const_iterator Target = IndexTargets->begin(); Target != IndexTargets->end(); @@ -1084,8 +1067,8 @@ void pkgAcqMetaIndex::QueueIndexes(bool verify) (*Target)->ShortDesc, ExpectedIndexHash); } } - -bool pkgAcqMetaIndex::VerifyVendor(string Message) + /*}}}*/ +bool pkgAcqMetaIndex::VerifyVendor(string Message) /*{{{*/ { // // Maybe this should be made available from above so we don't have // // to read and parse it every time? @@ -1171,9 +1154,8 @@ bool pkgAcqMetaIndex::VerifyVendor(string Message) return true; } - /*}}}*/ -// pkgAcqMetaIndex::Failed - no Release file present or no signature -// file present /*{{{*/ + /*}}}*/ +// pkgAcqMetaIndex::Failed - no Release file present or no signature file present /*{{{*/ // --------------------------------------------------------------------- /* */ void pkgAcqMetaIndex::Failed(string Message,pkgAcquire::MethodConfig *Cnf) @@ -1210,9 +1192,7 @@ void pkgAcqMetaIndex::Failed(string Message,pkgAcquire::MethodConfig *Cnf) // back to queueing Packages files without verification QueueIndexes(false); } - /*}}}*/ - // AcqArchive::AcqArchive - Constructor /*{{{*/ // --------------------------------------------------------------------- /* This just sets up the initial fetch environment and queues the first @@ -1495,14 +1475,13 @@ void pkgAcqArchive::Failed(string Message,pkgAcquire::MethodConfig *Cnf) } } /*}}}*/ -// AcqArchive::IsTrusted - Determine whether this archive comes from a -// trusted source /*{{{*/ +// AcqArchive::IsTrusted - Determine whether this archive comes from a trusted source /*{{{*/ // --------------------------------------------------------------------- bool pkgAcqArchive::IsTrusted() { return Trusted; } - + /*}}}*/ // AcqArchive::Finished - Fetching has finished, tidy up /*{{{*/ // --------------------------------------------------------------------- /* */ @@ -1514,7 +1493,6 @@ void pkgAcqArchive::Finished() StoreFilename = string(); } /*}}}*/ - // AcqFile::pkgAcqFile - Constructor /*{{{*/ // --------------------------------------------------------------------- /* The file is added to the queue */ diff --git a/apt-pkg/acquire-item.h b/apt-pkg/acquire-item.h index a48f7f7e5..36a926a0f 100644 --- a/apt-pkg/acquire-item.h +++ b/apt-pkg/acquire-item.h @@ -34,7 +34,7 @@ * \file acquire-item.h */ -/** \brief Represents the process by which a pkgAcquire object should +/** \brief Represents the process by which a pkgAcquire object should {{{ * retrieve a file or a collection of files. * * By convention, Item subclasses should insert themselves into the @@ -261,8 +261,8 @@ class pkgAcquire::Item */ virtual ~Item(); }; - -/** \brief Information about an index patch (aka diff). */ + /*}}}*/ +/** \brief Information about an index patch (aka diff). */ /*{{{*/ struct DiffInfo { /** The filename of the diff. */ string file; @@ -273,8 +273,8 @@ struct DiffInfo { /** The size of the diff. */ unsigned long size; }; - -/** \brief An item that is responsible for fetching an index file of + /*}}}*/ +/** \brief An item that is responsible for fetching an index file of {{{ * package list diffs and starting the package list's download. * * This item downloads the Index file and parses it, then enqueues @@ -348,8 +348,8 @@ class pkgAcqDiffIndex : public pkgAcquire::Item pkgAcqDiffIndex(pkgAcquire *Owner,string URI,string URIDesc, string ShortDesc, HashString ExpectedHash); }; - -/** \brief An item that is responsible for fetching all the patches + /*}}}*/ +/** \brief An item that is responsible for fetching all the patches {{{ * that need to be applied to a given package index file. * * After downloading and applying a single patch, this item will @@ -477,8 +477,8 @@ class pkgAcqIndexDiffs : public pkgAcquire::Item string ShortDesc, HashString ExpectedHash, vector diffs=vector()); }; - -/** \brief An acquire item that is responsible for fetching an index + /*}}}*/ +/** \brief An acquire item that is responsible for fetching an index {{{ * file (e.g., Packages or Sources). * * \sa pkgAcqDiffIndex, pkgAcqIndexDiffs, pkgAcqIndexTrans @@ -545,8 +545,8 @@ class pkgAcqIndex : public pkgAcquire::Item pkgAcqIndex(pkgAcquire *Owner,string URI,string URIDesc, string ShortDesc, HashString ExpectedHash, string compressExt=""); }; - -/** \brief An acquire item that is responsible for fetching a + /*}}}*/ +/** \brief An acquire item that is responsible for fetching a {{{ * translated index file. * * The only difference from pkgAcqIndex is that transient failures @@ -579,8 +579,8 @@ class pkgAcqIndexTrans : public pkgAcqIndex pkgAcqIndexTrans(pkgAcquire *Owner,string URI,string URIDesc, string ShortDesc); }; - -/** \brief Information about an index file. */ + /*}}}*/ +/** \brief Information about an index file. */ /*{{{*/ struct IndexTarget { /** \brief A URI from which the index file can be downloaded. */ @@ -597,8 +597,8 @@ struct IndexTarget */ string MetaKey; }; - -/** \brief An acquire item that downloads the detached signature + /*}}}*/ +/** \brief An acquire item that downloads the detached signature {{{ * of a meta-index (Release) file, then queues up the release * file itself. * @@ -660,8 +660,8 @@ class pkgAcqMetaSig : public pkgAcquire::Item const vector* IndexTargets, indexRecords* MetaIndexParser); }; - -/** \brief An item that is responsible for downloading the meta-index + /*}}}*/ +/** \brief An item that is responsible for downloading the meta-index {{{ * file (i.e., Release) itself and verifying its signature. * * Once the download and verification are complete, the downloads of @@ -756,8 +756,8 @@ class pkgAcqMetaIndex : public pkgAcquire::Item const vector* IndexTargets, indexRecords* MetaIndexParser); }; - -/** \brief An item that is responsible for fetching a package file. + /*}}}*/ +/** \brief An item that is responsible for fetching a package file. {{{ * * If the package file already exists in the cache, nothing will be * done. @@ -840,8 +840,8 @@ class pkgAcqArchive : public pkgAcquire::Item pkgRecords *Recs,pkgCache::VerIterator const &Version, string &StoreFilename); }; - -/** \brief Retrieve an arbitrary file to the current directory. + /*}}}*/ +/** \brief Retrieve an arbitrary file to the current directory. {{{ * * The file is retrieved even if it is accessed via a URL type that * normally is a NOP, such as "file". If the download fails, the @@ -902,7 +902,7 @@ class pkgAcqFile : public pkgAcquire::Item string Desc, string ShortDesc, const string &DestDir="", const string &DestFilename=""); }; - + /*}}}*/ /** @} */ #endif diff --git a/apt-pkg/acquire-method.cc b/apt-pkg/acquire-method.cc index acf1156dc..fe066741c 100644 --- a/apt-pkg/acquire-method.cc +++ b/apt-pkg/acquire-method.cc @@ -446,7 +446,6 @@ void pkgAcqMethod::Status(const char *Format,...) exit(100); } /*}}}*/ - // AcqMethod::Redirect - Send a redirect message /*{{{*/ // --------------------------------------------------------------------- /* This method sends the redirect message and also manipulates the queue @@ -478,7 +477,6 @@ void pkgAcqMethod::Redirect(const string &NewURI) QueueBack = I->Next; } /*}}}*/ - // AcqMethod::FetchResult::FetchResult - Constructor /*{{{*/ // --------------------------------------------------------------------- /* */ diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc index daea234d3..68ff393d0 100644 --- a/apt-pkg/acquire.cc +++ b/apt-pkg/acquire.cc @@ -484,7 +484,7 @@ double pkgAcquire::PartialPresent() Total += (*I)->PartialSize; return Total; } - + /*}}}*/ // Acquire::UriBegin - Start iterator for the uri list /*{{{*/ // --------------------------------------------------------------------- /* */ @@ -501,7 +501,6 @@ pkgAcquire::UriIterator pkgAcquire::UriEnd() return UriIterator(0); } /*}}}*/ - // Acquire::MethodConfig::MethodConfig - Constructor /*{{{*/ // --------------------------------------------------------------------- /* */ @@ -515,7 +514,6 @@ pkgAcquire::MethodConfig::MethodConfig() Next = 0; } /*}}}*/ - // Queue::Queue - Constructor /*{{{*/ // --------------------------------------------------------------------- /* */ @@ -727,7 +725,6 @@ void pkgAcquire::Queue::Bump() Cycle(); } /*}}}*/ - // AcquireStatus::pkgAcquireStatus - Constructor /*{{{*/ // --------------------------------------------------------------------- /* */ diff --git a/apt-pkg/acquire.h b/apt-pkg/acquire.h index eaadded55..6c130c1b3 100644 --- a/apt-pkg/acquire.h +++ b/apt-pkg/acquire.h @@ -30,7 +30,7 @@ ##################################################################### */ /*}}}*/ -/** \defgroup acquire Acquire system +/** \defgroup acquire Acquire system {{{ * * \brief The Acquire system is responsible for retrieving files from * local or remote URIs and postprocessing them (for instance, @@ -54,7 +54,7 @@ * once, but it is not clear what its behavior in this case is, and * no subclass of pkgAcquire::Item seems to actually use this * capability. - */ + */ /*}}}*/ /** \addtogroup acquire * @@ -78,7 +78,7 @@ using std::string; class pkgAcquireStatus; -/** \brief The core download scheduler. +/** \brief The core download scheduler. {{{ * * This class represents an ongoing download. It manages the lists * of active and pending downloads and handles setting up and tearing @@ -366,8 +366,8 @@ struct pkgAcquire::ItemDesc /** brief The underlying item which is to be downloaded. */ Item *Owner; }; - -/** \brief A single download queue in a pkgAcquire object. + /*}}}*/ +/** \brief A single download queue in a pkgAcquire object. {{{ * * \todo Why so many protected values? */ @@ -528,8 +528,8 @@ class pkgAcquire::Queue */ ~Queue(); }; - -/** \brief Iterates over all the URIs being fetched by a pkgAcquire object. */ + /*}}}*/ +/** \brief Iterates over all the URIs being fetched by a pkgAcquire object. {{{*/ class pkgAcquire::UriIterator { /** The next queue to iterate over. */ @@ -568,8 +568,8 @@ class pkgAcquire::UriIterator } } }; - -/** \brief Information about the properties of a single acquire method. */ + /*}}}*/ +/** \brief Information about the properties of a single acquire method. {{{*/ struct pkgAcquire::MethodConfig { /** \brief The next link on the acquire method list. @@ -621,8 +621,8 @@ struct pkgAcquire::MethodConfig */ MethodConfig(); }; - -/** \brief A monitor object for downloads controlled by the pkgAcquire class. + /*}}}*/ +/** \brief A monitor object for downloads controlled by the pkgAcquire class. {{{ * * \todo Why protected members? * @@ -762,7 +762,7 @@ class pkgAcquireStatus pkgAcquireStatus(); virtual ~pkgAcquireStatus() {}; }; - + /*}}}*/ /** @} */ #endif diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc index 2ad064319..68a4af8ed 100644 --- a/apt-pkg/algorithms.cc +++ b/apt-pkg/algorithms.cc @@ -442,7 +442,6 @@ bool pkgMinimizeUpgrade(pkgDepCache &Cache) return true; } /*}}}*/ - // ProblemResolver::pkgProblemResolver - Constructor /*{{{*/ // --------------------------------------------------------------------- /* */ @@ -1323,7 +1322,6 @@ void pkgProblemResolver::InstallProtect() } } /*}}}*/ - // PrioSortList - Sort a list of versions by priority /*{{{*/ // --------------------------------------------------------------------- /* This is ment to be used in conjunction with AllTargets to get a list @@ -1354,7 +1352,6 @@ void pkgPrioSortList(pkgCache &Cache,pkgCache::Version **List) qsort(List,Count,sizeof(*List),PrioComp); } /*}}}*/ - // CacheFile::ListUpdate - update the cache files /*{{{*/ // --------------------------------------------------------------------- /* This is a simple wrapper to update the cache. it will fetch stuff diff --git a/apt-pkg/algorithms.h b/apt-pkg/algorithms.h index d183cd213..cee30b679 100644 --- a/apt-pkg/algorithms.h +++ b/apt-pkg/algorithms.h @@ -39,7 +39,7 @@ using std::ostream; -class pkgSimulate : public pkgPackageManager +class pkgSimulate : public pkgPackageManager /*{{{*/ { protected: @@ -75,8 +75,8 @@ private: pkgSimulate(pkgDepCache *Cache); }; - -class pkgProblemResolver + /*}}}*/ +class pkgProblemResolver /*{{{*/ { pkgDepCache &Cache; typedef pkgCache::PkgIterator PkgIterator; @@ -124,7 +124,7 @@ class pkgProblemResolver pkgProblemResolver(pkgDepCache *Cache); ~pkgProblemResolver(); }; - + /*}}}*/ bool pkgDistUpgrade(pkgDepCache &Cache); bool pkgApplyStatus(pkgDepCache &Cache); bool pkgFixBroken(pkgDepCache &Cache); diff --git a/apt-pkg/cachefile.cc b/apt-pkg/cachefile.cc index 1a84aea54..f287a244c 100644 --- a/apt-pkg/cachefile.cc +++ b/apt-pkg/cachefile.cc @@ -24,7 +24,6 @@ #include /*}}}*/ - // CacheFile::CacheFile - Constructor /*{{{*/ // --------------------------------------------------------------------- /* */ @@ -108,8 +107,6 @@ bool pkgCacheFile::Open(OpProgress &Progress,bool WithLock) return true; } /*}}}*/ - - // CacheFile::Close - close the cache files /*{{{*/ // --------------------------------------------------------------------- /* */ diff --git a/apt-pkg/cacheiterators.h b/apt-pkg/cacheiterators.h index cf79b3a6b..3d35e4298 100644 --- a/apt-pkg/cacheiterators.h +++ b/apt-pkg/cacheiterators.h @@ -32,7 +32,7 @@ #define PKGLIB_CACHEITERATORS_H -// Package Iterator +// Package Iterator /*{{{*/ class pkgCache::PkgIterator { friend class pkgCache; @@ -96,8 +96,8 @@ class pkgCache::PkgIterator }; inline PkgIterator() : Pkg(0), Owner(0), HashIndex(0) {}; }; - -// Version Iterator + /*}}}*/ +// Version Iterator /*{{{*/ class pkgCache::VerIterator { Version *Ver; @@ -155,8 +155,8 @@ class pkgCache::VerIterator Ver = Owner.VerP; }; }; - -// Description Iterator + /*}}}*/ +// Description Iterator /*{{{*/ class pkgCache::DescIterator { Description *Desc; @@ -199,8 +199,8 @@ class pkgCache::DescIterator Desc = Owner.DescP; }; }; - -// Dependency iterator + /*}}}*/ +// Dependency iterator /*{{{*/ class pkgCache::DepIterator { Dependency *Dep; @@ -258,8 +258,8 @@ class pkgCache::DepIterator }; inline DepIterator() : Dep(0), Type(DepVer), Owner(0) {}; }; - -// Provides iterator + /*}}}*/ +// Provides iterator /*{{{*/ class pkgCache::PrvIterator { Provides *Prv; @@ -311,8 +311,8 @@ class pkgCache::PrvIterator Prv = Owner.ProvideP; }; }; - -// Package file + /*}}}*/ +// Package file /*{{{*/ class pkgCache::PkgFileIterator { pkgCache *Owner; @@ -358,8 +358,8 @@ class pkgCache::PkgFileIterator inline PkgFileIterator(pkgCache &Owner) : Owner(&Owner), File(Owner.PkgFileP) {}; inline PkgFileIterator(pkgCache &Owner,PackageFile *Trg) : Owner(&Owner), File(Trg) {}; }; - -// Version File + /*}}}*/ +// Version File /*{{{*/ class pkgCache::VerFileIterator { pkgCache *Owner; @@ -390,8 +390,8 @@ class pkgCache::VerFileIterator inline VerFileIterator() : Owner(0), FileP(0) {}; inline VerFileIterator(pkgCache &Owner,VerFile *Trg) : Owner(&Owner), FileP(Trg) {}; }; - -// Description File + /*}}}*/ +// Description File /*{{{*/ class pkgCache::DescFileIterator { pkgCache *Owner; @@ -422,8 +422,8 @@ class pkgCache::DescFileIterator inline DescFileIterator() : Owner(0), FileP(0) {}; inline DescFileIterator(pkgCache &Owner,DescFile *Trg) : Owner(&Owner), FileP(Trg) {}; }; - -// Inlined Begin functions cant be in the class because of order problems + /*}}}*/ +// Inlined Begin functions cant be in the class because of order problems /*{{{*/ inline pkgCache::VerIterator pkgCache::PkgIterator::VersionList() const {return VerIterator(*Owner,Owner->VerP + Pkg->VersionList);}; inline pkgCache::VerIterator pkgCache::PkgIterator::CurrentVer() const @@ -442,5 +442,5 @@ inline pkgCache::VerFileIterator pkgCache::VerIterator::FileList() const {return VerFileIterator(*Owner,Owner->VerFileP + Ver->FileList);}; inline pkgCache::DescFileIterator pkgCache::DescIterator::FileList() const {return DescFileIterator(*Owner,Owner->DescFileP + Desc->FileList);}; - + /*}}}*/ #endif diff --git a/apt-pkg/cdrom.cc b/apt-pkg/cdrom.cc index 370687f24..891c59836 100644 --- a/apt-pkg/cdrom.cc +++ b/apt-pkg/cdrom.cc @@ -160,7 +160,7 @@ bool pkgCdrom::FindPackages(string CD, return !_error->PendingError(); } - + /*}}}*/ // Score - We compute a 'score' for a path /*{{{*/ // --------------------------------------------------------------------- /* Paths are scored based on how close they come to what I consider @@ -210,7 +210,6 @@ int pkgCdrom::Score(string Path) return Res; } - /*}}}*/ // DropBinaryArch - Dump dirs with a string like /binary-/ /*{{{*/ // --------------------------------------------------------------------- @@ -248,8 +247,7 @@ bool pkgCdrom::DropBinaryArch(vector &List) return true; } - - + /*}}}*/ // DropRepeats - Drop repeated files resulting from symlinks /*{{{*/ // --------------------------------------------------------------------- /* Here we go and stat every file that we found and strip dup inodes. */ @@ -304,7 +302,6 @@ bool pkgCdrom::DropRepeats(vector &List,const char *Name) return true; } /*}}}*/ - // ReduceSourceList - Takes the path list and reduces it /*{{{*/ // --------------------------------------------------------------------- /* This takes the list of source list expressed entires and collects @@ -513,9 +510,8 @@ bool pkgCdrom::WriteSourceList(string Name,vector &List,bool Source) return true; } - - -bool pkgCdrom::Ident(string &ident, pkgCdromStatus *log) + /*}}}*/ +bool pkgCdrom::Ident(string &ident, pkgCdromStatus *log) /*{{{*/ { stringstream msg; @@ -573,9 +569,8 @@ bool pkgCdrom::Ident(string &ident, pkgCdromStatus *log) return true; } - - -bool pkgCdrom::Add(pkgCdromStatus *log) + /*}}}*/ +bool pkgCdrom::Add(pkgCdromStatus *log) /*{{{*/ { stringstream msg; @@ -844,3 +839,4 @@ bool pkgCdrom::Add(pkgCdromStatus *log) return true; } + /*}}}*/ diff --git a/apt-pkg/cdrom.h b/apt-pkg/cdrom.h index 68d61c098..608cb0e2f 100644 --- a/apt-pkg/cdrom.h +++ b/apt-pkg/cdrom.h @@ -8,7 +8,7 @@ using namespace std; -class pkgCdromStatus +class pkgCdromStatus /*{{{*/ { protected: int totalSteps; @@ -29,8 +29,8 @@ class pkgCdromStatus // Progress indicator for the Index rewriter virtual OpProgress* GetOpProgress() {return NULL; }; }; - -class pkgCdrom + /*}}}*/ +class pkgCdrom /*{{{*/ { protected: enum { @@ -65,7 +65,6 @@ class pkgCdrom bool Ident(string &ident, pkgCdromStatus *log); bool Add(pkgCdromStatus *log); }; - - + /*}}}*/ #endif diff --git a/apt-pkg/clean.cc b/apt-pkg/clean.cc index 3fa67e8e6..0d1dfbf74 100644 --- a/apt-pkg/clean.cc +++ b/apt-pkg/clean.cc @@ -19,7 +19,6 @@ #include #include /*}}}*/ - // ArchiveCleaner::Go - Perform smart cleanup of the archive /*{{{*/ // --------------------------------------------------------------------- /* Scan the directory for files to erase, we check the version information diff --git a/apt-pkg/contrib/hashes.cc b/apt-pkg/contrib/hashes.cc index fcc2f887c..52b9bfbe6 100644 --- a/apt-pkg/contrib/hashes.cc +++ b/apt-pkg/contrib/hashes.cc @@ -34,7 +34,7 @@ HashString::HashString(string Type, string Hash) : Type(Type), Hash(Hash) { } -HashString::HashString(string StringedHash) +HashString::HashString(string StringedHash) /*{{{*/ { // legacy: md5sum without "MD5Sum:" prefix if (StringedHash.find(":") == string::npos && StringedHash.size() == 32) @@ -50,9 +50,8 @@ HashString::HashString(string StringedHash) if(_config->FindB("Debug::Hashes",false) == true) std::clog << "HashString(string): " << Type << " : " << Hash << std::endl; } - - -bool HashString::VerifyFile(string filename) const + /*}}}*/ +bool HashString::VerifyFile(string filename) const /*{{{*/ { FileFd fd; MD5Summation MD5; @@ -83,7 +82,7 @@ bool HashString::VerifyFile(string filename) const return (fileHash == Hash); } - + /*}}}*/ const char** HashString::SupportedHashes() { return _SupportedHashes; @@ -94,13 +93,11 @@ bool HashString::empty() const return (Type.empty() || Hash.empty()); } - string HashString::toStr() const { return Type+string(":")+Hash; } - // Hashes::AddFD - Add the contents of the FD /*{{{*/ // --------------------------------------------------------------------- /* */ diff --git a/apt-pkg/contrib/sha256.cc b/apt-pkg/contrib/sha256.cc index ecda3d8e8..e380c13ae 100644 --- a/apt-pkg/contrib/sha256.cc +++ b/apt-pkg/contrib/sha256.cc @@ -1,5 +1,5 @@ /* - * Cryptographic API. + * Cryptographic API. {{{ * * SHA-256, as specified in * http://csrc.nist.gov/cryptval/shs/sha256-384-512.pdf @@ -17,7 +17,7 @@ * Software Foundation; either version 2 of the License, or (at your option) * any later version. * - */ + */ /*}}}*/ #ifdef __GNUG__ #pragma implementation "apt-pkg/sha256.h" @@ -65,20 +65,20 @@ static inline u32 Maj(u32 x, u32 y, u32 z) #define H6 0x1f83d9ab #define H7 0x5be0cd19 -static inline void LOAD_OP(int I, u32 *W, const u8 *input) +static inline void LOAD_OP(int I, u32 *W, const u8 *input) /*{{{*/ { W[I] = ( ((u32) input[I * 4 + 0] << 24) | ((u32) input[I * 4 + 1] << 16) | ((u32) input[I * 4 + 2] << 8) | ((u32) input[I * 4 + 3])); } - + /*}}}*/ static inline void BLEND_OP(int I, u32 *W) { W[I] = s1(W[I-2]) + W[I-7] + s0(W[I-15]) + W[I-16]; } -static void sha256_transform(u32 *state, const u8 *input) +static void sha256_transform(u32 *state, const u8 *input) /*{{{*/ { u32 a, b, c, d, e, f, g, h, t1, t2; u32 W[64]; @@ -240,8 +240,8 @@ static void sha256_transform(u32 *state, const u8 *input) a = b = c = d = e = f = g = h = t1 = t2 = 0; memset(W, 0, 64 * sizeof(u32)); } - -SHA256Summation::SHA256Summation() + /*}}}*/ +SHA256Summation::SHA256Summation() /*{{{*/ { Sum.state[0] = H0; Sum.state[1] = H1; @@ -255,8 +255,8 @@ SHA256Summation::SHA256Summation() memset(Sum.buf, 0, sizeof(Sum.buf)); Done = false; } - -bool SHA256Summation::Add(const u8 *data, unsigned long len) + /*}}}*/ +bool SHA256Summation::Add(const u8 *data, unsigned long len) /*{{{*/ { struct sha256_ctx *sctx = ∑ unsigned int i, index, part_len; @@ -291,8 +291,8 @@ bool SHA256Summation::Add(const u8 *data, unsigned long len) return true; } - -SHA256SumValue SHA256Summation::Result() + /*}}}*/ +SHA256SumValue SHA256Summation::Result() /*{{{*/ { struct sha256_ctx *sctx = ∑ if (!Done) { @@ -340,7 +340,7 @@ SHA256SumValue SHA256Summation::Result() return res; } - + /*}}}*/ // SHA256SumValue::SHA256SumValue - Constructs the sum from a string /*{{{*/ // --------------------------------------------------------------------- /* The string form of a SHA256 is a 64 character hex number */ @@ -349,7 +349,6 @@ SHA256SumValue::SHA256SumValue(string Str) memset(Sum,0,sizeof(Sum)); Set(Str); } - /*}}}*/ // SHA256SumValue::SHA256SumValue - Default constructor /*{{{*/ // --------------------------------------------------------------------- @@ -358,7 +357,6 @@ SHA256SumValue::SHA256SumValue() { memset(Sum,0,sizeof(Sum)); } - /*}}}*/ // SHA256SumValue::Set - Set the sum from a string /*{{{*/ // --------------------------------------------------------------------- @@ -391,9 +389,7 @@ string SHA256SumValue::Value() const return string(Result); } - - - + /*}}}*/ // SHA256SumValue::operator == - Comparator /*{{{*/ // --------------------------------------------------------------------- /* Call memcmp on the buffer */ @@ -402,8 +398,6 @@ bool SHA256SumValue::operator == (const SHA256SumValue & rhs) const return memcmp(Sum,rhs.Sum,sizeof(Sum)) == 0; } /*}}}*/ - - // SHA256Summation::AddFD - Add content of file into the checksum /*{{{*/ // --------------------------------------------------------------------- /* */ diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index b1b8f970f..a284a05c7 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -27,8 +27,8 @@ #include #include - -// helper for Install-Recommends-Sections and Never-MarkAuto-Sections + /*}}}*/ +// helper for Install-Recommends-Sections and Never-MarkAuto-Sections /*{{{*/ static bool ConfigValueInSubTree(const char* SubTree, const char *needle) { @@ -47,8 +47,8 @@ ConfigValueInSubTree(const char* SubTree, const char *needle) } return false; } - -pkgDepCache::ActionGroup::ActionGroup(pkgDepCache &cache) : + /*}}}*/ +pkgDepCache::ActionGroup::ActionGroup(pkgDepCache &cache) : /*{{{*/ cache(cache), released(false) { ++cache.group_level; @@ -76,7 +76,7 @@ pkgDepCache::ActionGroup::~ActionGroup() { release(); } - + /*}}}*/ // DepCache::pkgDepCache - Constructors /*{{{*/ // --------------------------------------------------------------------- /* */ @@ -161,8 +161,7 @@ bool pkgDepCache::Init(OpProgress *Prog) return true; } /*}}}*/ - -bool pkgDepCache::readStateFile(OpProgress *Prog) +bool pkgDepCache::readStateFile(OpProgress *Prog) /*{{{*/ { FileFd state_file; string state = _config->FindDir("Dir::State") + "extended_states"; @@ -200,8 +199,8 @@ bool pkgDepCache::readStateFile(OpProgress *Prog) return true; } - -bool pkgDepCache::writeStateFile(OpProgress *prog, bool InstalledOnly) + /*}}}*/ +bool pkgDepCache::writeStateFile(OpProgress *prog, bool InstalledOnly) /*{{{*/ { if(_config->FindB("Debug::pkgAutoRemove",false)) std::clog << "pkgDepCache::writeStateFile()" << std::endl; @@ -283,7 +282,7 @@ bool pkgDepCache::writeStateFile(OpProgress *prog, bool InstalledOnly) return true; } - + /*}}}*/ // DepCache::CheckDep - Checks a single dependency /*{{{*/ // --------------------------------------------------------------------- /* This first checks the dependency against the main target package and @@ -701,9 +700,7 @@ void pkgDepCache::Update(PkgIterator const &Pkg) P.end() != true; P++) Update(P.ParentPkg().RevDependsList()); } - /*}}}*/ - // DepCache::MarkKeep - Put the package in the keep state /*{{{*/ // --------------------------------------------------------------------- /* */ @@ -1056,7 +1053,7 @@ void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst, } } } - + /*}}}*/ // DepCache::AutoInstOk - check if it is to install this package /*{{{*/ // --------------------------------------------------------------------- /* The default implementation just honors dpkg hold @@ -1168,7 +1165,6 @@ const char *pkgDepCache::StateCache::StripEpoch(const char *Ver) return Ver; } /*}}}*/ - // Policy::GetCandidateVer - Returns the Candidate install version /*{{{*/ // --------------------------------------------------------------------- /* The default just returns the highest available version that is not @@ -1205,7 +1201,6 @@ pkgCache::VerIterator pkgDepCache::Policy::GetCandidateVer(PkgIterator Pkg) return Last; } /*}}}*/ - // Policy::IsImportantDep - True if the dependency is important /*{{{*/ // --------------------------------------------------------------------- /* */ @@ -1231,8 +1226,7 @@ bool pkgDepCache::Policy::IsImportantDep(DepIterator Dep) return false; } /*}}}*/ - -pkgDepCache::DefaultRootSetFunc::DefaultRootSetFunc() +pkgDepCache::DefaultRootSetFunc::DefaultRootSetFunc() /*{{{*/ : constructedSuccessfully(false) { Configuration::Item const *Opts; @@ -1261,8 +1255,8 @@ pkgDepCache::DefaultRootSetFunc::DefaultRootSetFunc() constructedSuccessfully = true; } - -pkgDepCache::DefaultRootSetFunc::~DefaultRootSetFunc() + /*}}}*/ +pkgDepCache::DefaultRootSetFunc::~DefaultRootSetFunc() /*{{{*/ { for(unsigned int i = 0; i < rootSetRegexp.size(); i++) { @@ -1270,9 +1264,8 @@ pkgDepCache::DefaultRootSetFunc::~DefaultRootSetFunc() delete rootSetRegexp[i]; } } - - -bool pkgDepCache::DefaultRootSetFunc::InRootSet(const pkgCache::PkgIterator &pkg) + /*}}}*/ +bool pkgDepCache::DefaultRootSetFunc::InRootSet(const pkgCache::PkgIterator &pkg) /*{{{*/ { for(unsigned int i = 0; i < rootSetRegexp.size(); i++) if (regexec(rootSetRegexp[i], pkg.Name(), 0, 0, 0) == 0) @@ -1280,8 +1273,8 @@ bool pkgDepCache::DefaultRootSetFunc::InRootSet(const pkgCache::PkgIterator &pkg return false; } - -pkgDepCache::InRootSetFunc *pkgDepCache::GetRootSetFunc() + /*}}}*/ +pkgDepCache::InRootSetFunc *pkgDepCache::GetRootSetFunc() /*{{{*/ { DefaultRootSetFunc *f = new DefaultRootSetFunc; if(f->wasConstructedSuccessfully()) @@ -1292,7 +1285,7 @@ pkgDepCache::InRootSetFunc *pkgDepCache::GetRootSetFunc() return NULL; } } - + /*}}}*/ bool pkgDepCache::MarkFollowsRecommends() { return _config->FindB("APT::AutoRemove::RecommendsImportant", true); @@ -1303,7 +1296,7 @@ bool pkgDepCache::MarkFollowsSuggests() return _config->FindB("APT::AutoRemove::SuggestsImportant", false); } -// the main mark algorithm +// pkgDepCache::MarkRequired - the main mark algorithm /*{{{*/ bool pkgDepCache::MarkRequired(InRootSetFunc &userFunc) { bool follow_recommends; @@ -1348,8 +1341,8 @@ bool pkgDepCache::MarkRequired(InRootSetFunc &userFunc) return true; } - -// mark a single package in Mark-and-Sweep + /*}}}*/ +// MarkPackage - mark a single package in Mark-and-Sweep /*{{{*/ void pkgDepCache::MarkPackage(const pkgCache::PkgIterator &pkg, const pkgCache::VerIterator &ver, bool follow_recommends, @@ -1468,8 +1461,8 @@ void pkgDepCache::MarkPackage(const pkgCache::PkgIterator &pkg, } } } - -bool pkgDepCache::Sweep() + /*}}}*/ +bool pkgDepCache::Sweep() /*{{{*/ { // do the sweep for(PkgIterator p=PkgBegin(); !p.end(); ++p) @@ -1492,3 +1485,4 @@ bool pkgDepCache::Sweep() return true; } + /*}}}*/ diff --git a/apt-pkg/indexcopy.cc b/apt-pkg/indexcopy.cc index 9e5c03e0b..22ee29697 100644 --- a/apt-pkg/indexcopy.cc +++ b/apt-pkg/indexcopy.cc @@ -542,8 +542,8 @@ bool SigVerify::Verify(string prefix, string file, indexRecords *MetaIndex) return true; } - -bool SigVerify::CopyMetaIndex(string CDROM, string CDName, + /*}}}*/ +bool SigVerify::CopyMetaIndex(string CDROM, string CDName, /*{{{*/ string prefix, string file) { char S[400]; @@ -563,8 +563,8 @@ bool SigVerify::CopyMetaIndex(string CDROM, string CDName, return true; } - -bool SigVerify::CopyAndVerify(string CDROM,string Name,vector &SigList, + /*}}}*/ +bool SigVerify::CopyAndVerify(string CDROM,string Name,vector &SigList, /*{{{*/ vector PkgList,vector SrcList) { if (SigList.size() == 0) @@ -665,10 +665,9 @@ bool SigVerify::CopyAndVerify(string CDROM,string Name,vector &SigList, return true; } - - -bool TranslationsCopy::CopyTranslations(string CDROM,string Name,vector &List, - pkgCdromStatus *log) + /*}}}*/ +bool TranslationsCopy::CopyTranslations(string CDROM,string Name, /*{{{*/ + vector &List, pkgCdromStatus *log) { OpProgress *Progress = NULL; if (List.size() == 0) @@ -840,3 +839,4 @@ bool TranslationsCopy::CopyTranslations(string CDROM,string Name,vector return true; } + /*}}}*/ diff --git a/apt-pkg/indexcopy.h b/apt-pkg/indexcopy.h index 7778ae595..9e5ad4e43 100644 --- a/apt-pkg/indexcopy.h +++ b/apt-pkg/indexcopy.h @@ -22,7 +22,7 @@ class FileFd; class indexRecords; class pkgCdromStatus; -class IndexCopy +class IndexCopy /*{{{*/ { protected: @@ -45,8 +45,8 @@ class IndexCopy pkgCdromStatus *log); virtual ~IndexCopy() {}; }; - -class PackageCopy : public IndexCopy + /*}}}*/ +class PackageCopy : public IndexCopy /*{{{*/ { protected: @@ -57,8 +57,8 @@ class PackageCopy : public IndexCopy public: }; - -class SourceCopy : public IndexCopy + /*}}}*/ +class SourceCopy : public IndexCopy /*{{{*/ { protected: @@ -69,8 +69,8 @@ class SourceCopy : public IndexCopy public: }; - -class TranslationsCopy + /*}}}*/ +class TranslationsCopy /*{{{*/ { protected: pkgTagSection *Section; @@ -79,9 +79,8 @@ class TranslationsCopy bool CopyTranslations(string CDROM,string Name,vector &List, pkgCdromStatus *log); }; - - -class SigVerify + /*}}}*/ +class SigVerify /*{{{*/ { bool Verify(string prefix,string file, indexRecords *records); bool CopyMetaIndex(string CDROM, string CDName, @@ -91,7 +90,6 @@ class SigVerify bool CopyAndVerify(string CDROM,string Name,vector &SigList, vector PkgList,vector SrcList); }; - - + /*}}}*/ #endif diff --git a/apt-pkg/indexfile.cc b/apt-pkg/indexfile.cc index b38596143..08f71feb0 100644 --- a/apt-pkg/indexfile.cc +++ b/apt-pkg/indexfile.cc @@ -41,7 +41,6 @@ pkgIndexFile::Type *pkgIndexFile::Type::GetType(const char *Type) return 0; } /*}}}*/ - // IndexFile::ArchiveInfo - Stub /*{{{*/ // --------------------------------------------------------------------- /* */ diff --git a/apt-pkg/indexrecords.cc b/apt-pkg/indexrecords.cc index 502f454a8..77fe03d45 100644 --- a/apt-pkg/indexrecords.cc +++ b/apt-pkg/indexrecords.cc @@ -9,7 +9,7 @@ #include #include #include - + /*}}}*/ string indexRecords::GetDist() const { return this->Dist; @@ -31,7 +31,7 @@ const indexRecords::checkSum *indexRecords::Lookup(const string MetaKey) return Entries[MetaKey]; } -bool indexRecords::Load(const string Filename) +bool indexRecords::Load(const string Filename) /*{{{*/ { FileFd Fd(Filename, FileFd::ReadOnly); pkgTagFile TagFile(&Fd, Fd.Size() + 256); // XXX @@ -85,8 +85,8 @@ bool indexRecords::Load(const string Filename) string Strdate = Section.FindS("Date"); // FIXME: verify this somehow? return true; } - -vector indexRecords::MetaKeys() + /*}}}*/ +vector indexRecords::MetaKeys() /*{{{*/ { std::vector keys; std::map::iterator I = Entries.begin(); @@ -96,8 +96,8 @@ vector indexRecords::MetaKeys() } return keys; } - -bool indexRecords::parseSumData(const char *&Start, const char *End, + /*}}}*/ +bool indexRecords::parseSumData(const char *&Start, const char *End, /*{{{*/ string &Name, string &Hash, size_t &Size) { Name = ""; @@ -154,7 +154,7 @@ bool indexRecords::parseSumData(const char *&Start, const char *End, Start = EntryEnd; //prepare for the next round return true; } - + /*}}}*/ indexRecords::indexRecords() { } diff --git a/apt-pkg/orderlist.cc b/apt-pkg/orderlist.cc index ca18f1d75..01b150722 100644 --- a/apt-pkg/orderlist.cc +++ b/apt-pkg/orderlist.cc @@ -129,7 +129,6 @@ bool pkgOrderList::IsMissing(PkgIterator Pkg) return true; } /*}}}*/ - // OrderList::DoRun - Does an order run /*{{{*/ // --------------------------------------------------------------------- /* The caller is expeted to have setup the desired probe state */ @@ -282,7 +281,6 @@ bool pkgOrderList::OrderConfigure() return DoRun(); } /*}}}*/ - // OrderList::Score - Score the package for sorting /*{{{*/ // --------------------------------------------------------------------- /* Higher scores order earlier */ @@ -433,7 +431,6 @@ int pkgOrderList::OrderCompareB(const void *a, const void *b) return strcmp(A.Name(),B.Name()); } /*}}}*/ - // OrderList::VisitDeps - Visit forward install dependencies /*{{{*/ // --------------------------------------------------------------------- /* This calls the dependency function for the normal forwards dependencies @@ -590,7 +587,6 @@ bool pkgOrderList::VisitNode(PkgIterator Pkg) return true; } /*}}}*/ - // OrderList::DepUnPackCrit - Critical UnPacking ordering /*{{{*/ // --------------------------------------------------------------------- /* Critical unpacking ordering strives to satisfy Conflicts: and @@ -668,13 +664,12 @@ bool pkgOrderList::DepUnPackCrit(DepIterator D) } return true; } - + /*}}}*/ // OrderList::DepUnPackPreD - Critical UnPacking ordering with depends /*{{{*/ // --------------------------------------------------------------------- /* Critical PreDepends (also configure immediate and essential) strives to ensure not only that all conflicts+predepends are met but that this - package will be immediately configurable when it is unpacked. - + package will be immediately configurable when it is unpacked. Loops are preprocessed and logged. */ bool pkgOrderList::DepUnPackPreD(DepIterator D) { @@ -892,7 +887,6 @@ bool pkgOrderList::DepRemove(DepIterator D) return true; } /*}}}*/ - // OrderList::AddLoop - Add a loop to the loop list /*{{{*/ // --------------------------------------------------------------------- /* We record the loops. This is a relic since loop breaking is done diff --git a/apt-pkg/packagemanager.cc b/apt-pkg/packagemanager.cc index 304d1c653..cc9ce21c7 100644 --- a/apt-pkg/packagemanager.cc +++ b/apt-pkg/packagemanager.cc @@ -26,7 +26,7 @@ #include #include #include - + /*}}}*/ using namespace std; // PM::PackageManager - Constructor /*{{{*/ @@ -117,7 +117,6 @@ bool pkgPackageManager::FixMissing() return Resolve.ResolveByKeep() == true && Cache.BrokenCount() == 0; } /*}}}*/ - // PM::ImmediateAdd - Add the immediate flag recursivly /*{{{*/ // --------------------------------------------------------------------- /* This adds the immediate flag to the pkg and recursively to the @@ -152,7 +151,6 @@ void pkgPackageManager::ImmediateAdd(PkgIterator I, bool UseInstallVer) return; } /*}}}*/ - // PM::CreateOrderList - Create the ordering class /*{{{*/ // --------------------------------------------------------------------- /* This populates the ordering list with all the packages that are diff --git a/apt-pkg/pkgcache.h b/apt-pkg/pkgcache.h index e58515fb1..38733713f 100644 --- a/apt-pkg/pkgcache.h +++ b/apt-pkg/pkgcache.h @@ -27,7 +27,7 @@ using std::string; class pkgVersioningSystem; -class pkgCache +class pkgCache /*{{{*/ { public: // Cache element predeclarations @@ -146,8 +146,8 @@ class pkgCache pkgCache(MMap *Map,bool DoMap = true); virtual ~pkgCache() {}; }; - -// Header structure + /*}}}*/ +// Header structure /*{{{*/ struct pkgCache::Header { // Signature information @@ -195,8 +195,8 @@ struct pkgCache::Header bool CheckSizes(Header &Against) const; Header(); }; - -struct pkgCache::Package + /*}}}*/ +struct pkgCache::Package /*{{{*/ { // Pointers map_ptrloc Name; // Stringtable @@ -217,8 +217,8 @@ struct pkgCache::Package unsigned int ID; unsigned long Flags; }; - -struct pkgCache::PackageFile + /*}}}*/ +struct pkgCache::PackageFile /*{{{*/ { // Names map_ptrloc FileName; // Stringtable @@ -239,24 +239,24 @@ struct pkgCache::PackageFile unsigned int ID; time_t mtime; // Modification time for the file }; - -struct pkgCache::VerFile + /*}}}*/ +struct pkgCache::VerFile /*{{{*/ { map_ptrloc File; // PackageFile map_ptrloc NextFile; // PkgVerFile map_ptrloc Offset; // File offset unsigned short Size; }; - -struct pkgCache::DescFile + /*}}}*/ +struct pkgCache::DescFile /*{{{*/ { map_ptrloc File; // PackageFile map_ptrloc NextFile; // PkgVerFile map_ptrloc Offset; // File offset unsigned short Size; }; - -struct pkgCache::Version + /*}}}*/ +struct pkgCache::Version /*{{{*/ { map_ptrloc VerStr; // Stringtable map_ptrloc Section; // StringTable (StringItem) @@ -276,8 +276,8 @@ struct pkgCache::Version unsigned int ID; unsigned char Priority; }; - -struct pkgCache::Description + /*}}}*/ +struct pkgCache::Description /*{{{*/ { // Language Code store the description translation language code. If // the value has a 0 lenght then this is readed using the Package @@ -292,8 +292,8 @@ struct pkgCache::Description unsigned int ID; }; - -struct pkgCache::Dependency + /*}}}*/ +struct pkgCache::Dependency /*{{{*/ { map_ptrloc Version; // Stringtable map_ptrloc Package; // Package @@ -306,8 +306,8 @@ struct pkgCache::Dependency unsigned char Type; unsigned char CompareOp; }; - -struct pkgCache::Provides + /*}}}*/ +struct pkgCache::Provides /*{{{*/ { map_ptrloc ParentPkg; // Pacakge map_ptrloc Version; // Version @@ -315,13 +315,13 @@ struct pkgCache::Provides map_ptrloc NextProvides; // Provides map_ptrloc NextPkgProv; // Provides }; - -struct pkgCache::StringItem + /*}}}*/ +struct pkgCache::StringItem /*{{{*/ { map_ptrloc String; // Stringtable map_ptrloc NextItem; // StringItem }; - + /*}}}*/ #include inline pkgCache::PkgIterator pkgCache::PkgBegin() @@ -334,7 +334,7 @@ inline pkgCache::PkgFileIterator pkgCache::FileEnd() {return PkgFileIterator(*this,PkgFileP);}; // Oh I wish for Real Name Space Support -class pkgCache::Namespace +class pkgCache::Namespace /*{{{*/ { public: @@ -352,5 +352,5 @@ class pkgCache::Namespace typedef pkgCache::Dep Dep; typedef pkgCache::Flag Flag; }; - + /*}}}*/ #endif diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc index 397c19829..7833d6476 100644 --- a/apt-pkg/pkgcachegen.cc +++ b/apt-pkg/pkgcachegen.cc @@ -652,7 +652,6 @@ unsigned long pkgCacheGenerator::WriteUniqString(const char *S, return ItemP->String; } /*}}}*/ - // CheckValidity - Check that a cache is up-to-date /*{{{*/ // --------------------------------------------------------------------- /* This just verifies that each file in the list of index files exists, diff --git a/apt-pkg/pkgcachegen.h b/apt-pkg/pkgcachegen.h index b6715294a..108b34207 100644 --- a/apt-pkg/pkgcachegen.h +++ b/apt-pkg/pkgcachegen.h @@ -28,7 +28,7 @@ class OpProgress; class MMap; class pkgIndexFile; -class pkgCacheGenerator +class pkgCacheGenerator /*{{{*/ { private: @@ -76,8 +76,8 @@ class pkgCacheGenerator pkgCacheGenerator(DynamicMMap *Map,OpProgress *Progress); ~pkgCacheGenerator(); }; - -// This is the abstract package list parser class. + /*}}}*/ +// This is the abstract package list parser class. /*{{{*/ class pkgCacheGenerator::ListParser { pkgCacheGenerator *Owner; @@ -126,7 +126,7 @@ class pkgCacheGenerator::ListParser ListParser() : FoundFileDeps(false) {}; virtual ~ListParser() {}; }; - + /*}}}*/ bool pkgMakeStatusCache(pkgSourceList &List,OpProgress &Progress, MMap **OutMap = 0,bool AllowMem = false); bool pkgMakeOnlyStatusCache(OpProgress &Progress,DynamicMMap **OutMap); diff --git a/apt-pkg/pkgrecords.h b/apt-pkg/pkgrecords.h index 17f3b1569..c2c98188a 100644 --- a/apt-pkg/pkgrecords.h +++ b/apt-pkg/pkgrecords.h @@ -22,7 +22,7 @@ #include #include -class pkgRecords +class pkgRecords /*{{{*/ { public: class Parser; @@ -42,8 +42,8 @@ class pkgRecords pkgRecords(pkgCache &Cache); ~pkgRecords(); }; - -class pkgRecords::Parser + /*}}}*/ +class pkgRecords::Parser /*{{{*/ { protected: @@ -73,5 +73,5 @@ class pkgRecords::Parser virtual ~Parser() {}; }; - + /*}}}*/ #endif diff --git a/apt-pkg/vendorlist.cc b/apt-pkg/vendorlist.cc index 8e5d09e8a..589997081 100644 --- a/apt-pkg/vendorlist.cc +++ b/apt-pkg/vendorlist.cc @@ -10,7 +10,7 @@ pkgVendorList::~pkgVendorList() delete *I; } -// pkgVendorList::ReadMainList - Read list of known package vendors /*{{{*/ +// pkgVendorList::ReadMainList - Read list of known package vendors /*{{{*/ // --------------------------------------------------------------------- /* This also scans a directory of vendor files similar to apt.conf.d which can contain the usual suspects of distribution provided data. @@ -31,8 +31,8 @@ bool pkgVendorList::ReadMainList() return CreateList(Cnf); } - -bool pkgVendorList::Read(string File) + /*}}}*/ +bool pkgVendorList::Read(string File) /*{{{*/ { Configuration Cnf; if (ReadConfigFile(Cnf,File,true) == false) @@ -40,8 +40,8 @@ bool pkgVendorList::Read(string File) return CreateList(Cnf); } - -bool pkgVendorList::CreateList(Configuration& Cnf) + /*}}}*/ +bool pkgVendorList::CreateList(Configuration& Cnf) /*{{{*/ { for (vector::const_iterator I = VendorList.begin(); I != VendorList.end(); I++) @@ -110,8 +110,8 @@ bool pkgVendorList::CreateList(Configuration& Cnf) return !_error->PendingError(); } - -const Vendor* pkgVendorList::LookupFingerprint(string Fingerprint) + /*}}}*/ +const Vendor* pkgVendorList::LookupFingerprint(string Fingerprint) /*{{{*/ { for (const_iterator I = VendorList.begin(); I != VendorList.end(); ++I) { @@ -121,8 +121,8 @@ const Vendor* pkgVendorList::LookupFingerprint(string Fingerprint) return NULL; } - -const Vendor* pkgVendorList::FindVendor(const std::vector GPGVOutput) + /*}}}*/ +const Vendor* pkgVendorList::FindVendor(const std::vector GPGVOutput) /*{{{*/ { for (std::vector::const_iterator I = GPGVOutput.begin(); I != GPGVOutput.end(); I++) { @@ -142,3 +142,4 @@ const Vendor* pkgVendorList::FindVendor(const std::vector GPGVOutput) return NULL; } + /*}}}*/ diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc index 4431fd4f9..93558fa88 100644 --- a/cmdline/apt-cache.cc +++ b/cmdline/apt-cache.cc @@ -622,7 +622,7 @@ bool Depends(CommandLine &CmdL) return true; } - + /*}}}*/ // RDepends - Print out a reverse dependency tree - mbc /*{{{*/ // --------------------------------------------------------------------- /* */ @@ -710,10 +710,7 @@ bool RDepends(CommandLine &CmdL) return true; } - /*}}}*/ - - // xvcg - Generate a graph for xvcg /*{{{*/ // --------------------------------------------------------------------- // Code contributed from Junichi Uekawa on 20 June 2002. @@ -933,8 +930,6 @@ bool XVcg(CommandLine &CmdL) return true; } /*}}}*/ - - // Dotty - Generate a graph for Dotty /*{{{*/ // --------------------------------------------------------------------- /* Dotty is the graphvis program for generating graphs. It is a fairly @@ -1270,15 +1265,16 @@ bool DisplayRecord(pkgCache::VerIterator V) return true; } /*}}}*/ -// Search - Perform a search /*{{{*/ -// --------------------------------------------------------------------- -/* This searches the package names and package descriptions for a pattern */ + struct ExDescFile { pkgCache::DescFile *Df; bool NameMatch; }; +// Search - Perform a search /*{{{*/ +// --------------------------------------------------------------------- +/* This searches the package names and package descriptions for a pattern */ bool Search(CommandLine &CmdL) { pkgCache &Cache = *GCache; @@ -1691,7 +1687,6 @@ bool Madison(CommandLine &CmdL) return true; } - /*}}}*/ // GenCaches - Call the main cache generator /*{{{*/ // --------------------------------------------------------------------- @@ -1765,8 +1760,7 @@ void CacheInitialize() _config->Set("help",false); } /*}}}*/ - -int main(int argc,const char *argv[]) +int main(int argc,const char *argv[]) /*{{{*/ { CommandLine::Args Args[] = { {'h',"help","help",0}, @@ -1873,3 +1867,4 @@ int main(int argc,const char *argv[]) return 0; } + /*}}}*/ diff --git a/cmdline/apt-cdrom.cc b/cmdline/apt-cdrom.cc index 379a433ea..342b6314a 100644 --- a/cmdline/apt-cdrom.cc +++ b/cmdline/apt-cdrom.cc @@ -40,8 +40,7 @@ using namespace std; - /*{{{*/ -class pkgCdromTextStatus : public pkgCdromStatus +class pkgCdromTextStatus : public pkgCdromStatus /*{{{*/ { protected: OpTextProgress Progress; @@ -98,9 +97,7 @@ OpProgress* pkgCdromTextStatus::GetOpProgress() { return &Progress; }; - /*}}}*/ - // DoAdd - Add a new CDROM /*{{{*/ // --------------------------------------------------------------------- /* This does the main add bit.. We show some status and things. The @@ -129,7 +126,6 @@ bool DoIdent(CommandLine &) return cdrom.Ident(ident, &log); } /*}}}*/ - // ShowHelp - Show the help screen /*{{{*/ // --------------------------------------------------------------------- /* */ @@ -164,8 +160,7 @@ int ShowHelp() return 0; } /*}}}*/ - -int main(int argc,const char *argv[]) +int main(int argc,const char *argv[]) /*{{{*/ { CommandLine::Args Args[] = { {'h',"help","help",0}, @@ -222,3 +217,4 @@ int main(int argc,const char *argv[]) return 0; } + /*}}}*/ diff --git a/cmdline/apt-config.cc b/cmdline/apt-config.cc index 63fa0867c..9919a9c94 100644 --- a/cmdline/apt-config.cc +++ b/cmdline/apt-config.cc @@ -88,8 +88,7 @@ int ShowHelp() return 0; } /*}}}*/ - -int main(int argc,const char *argv[]) +int main(int argc,const char *argv[]) /*{{{*/ { CommandLine::Args Args[] = { {'h',"help","help",0}, @@ -133,3 +132,4 @@ int main(int argc,const char *argv[]) return 0; } + /*}}}*/ diff --git a/cmdline/apt-extracttemplates.cc b/cmdline/apt-extracttemplates.cc index de22386b9..21ef1a050 100644 --- a/cmdline/apt-extracttemplates.cc +++ b/cmdline/apt-extracttemplates.cc @@ -348,8 +348,7 @@ bool Go(CommandLine &CmdL) return !_error->PendingError(); } /*}}}*/ - -int main(int argc, const char **argv) +int main(int argc, const char **argv) /*{{{*/ { CommandLine::Args Args[] = { {'h',"help","help",0}, @@ -391,3 +390,4 @@ int main(int argc, const char **argv) return 0; } + /*}}}*/ diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index f5642c04d..97c83c9b0 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -597,7 +597,6 @@ void Stats(ostream &out,pkgDepCache &Dep) Dep.BadCount()); } /*}}}*/ - // CacheFile::NameComp - QSort compare by name /*{{{*/ // --------------------------------------------------------------------- /* */ @@ -690,7 +689,10 @@ bool CacheFile::CheckDeps(bool AllowBroken) return true; } - + /*}}}*/ +// CheckAuth - check if each download comes form a trusted source /*{{{*/ +// --------------------------------------------------------------------- +/* */ static bool CheckAuth(pkgAcquire& Fetcher) { string UntrustedList; @@ -731,10 +733,7 @@ static bool CheckAuth(pkgAcquire& Fetcher) return _error->Error(_("There are problems and -y was used without --force-yes")); } - - /*}}}*/ - // InstallPackages - Actually download and install the packages /*{{{*/ // --------------------------------------------------------------------- /* This displays the informative messages describing what is going to @@ -1338,7 +1337,6 @@ pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs, return Last; } /*}}}*/ - // DoUpdate - Update the package lists /*{{{*/ // --------------------------------------------------------------------- /* */ @@ -1460,7 +1458,7 @@ bool DoAutomaticRemove(CacheFile &Cache) } return true; } - + /*}}}*/ // DoUpgrade - Upgrade all packages /*{{{*/ // --------------------------------------------------------------------- /* Upgrade all packages without installing new packages or erasing old @@ -1535,7 +1533,7 @@ bool TryInstallTask(pkgDepCache &Cache, pkgProblemResolver &Fix, regfree(&Pattern); return res; } - + /*}}}*/ // DoInstall - Install packages from the command line /*{{{*/ // --------------------------------------------------------------------- /* Install named packages */ @@ -2702,8 +2700,7 @@ void SigWinch(int) #endif } /*}}}*/ - -int main(int argc,const char *argv[]) +int main(int argc,const char *argv[]) /*{{{*/ { CommandLine::Args Args[] = { {'h',"help","help",0}, @@ -2835,3 +2832,4 @@ int main(int argc,const char *argv[]) return 0; } + /*}}}*/ diff --git a/cmdline/apt-sortpkgs.cc b/cmdline/apt-sortpkgs.cc index 7b2a74aed..171b0ba13 100644 --- a/cmdline/apt-sortpkgs.cc +++ b/cmdline/apt-sortpkgs.cc @@ -31,7 +31,7 @@ using namespace std; -struct PkgName +struct PkgName /*{{{*/ { string Name; string Ver; @@ -55,7 +55,7 @@ struct PkgName bool operator >(const PkgName &x) const {return Compare3(x) > 0;}; bool operator ==(const PkgName &x) const {return Compare3(x) == 0;}; }; - + /*}}}*/ // DoIt - Sort a single file /*{{{*/ // --------------------------------------------------------------------- /* */ @@ -161,8 +161,7 @@ int ShowHelp() return 0; } /*}}}*/ - -int main(int argc,const char *argv[]) +int main(int argc,const char *argv[]) /*{{{*/ { CommandLine::Args Args[] = { {'h',"help","help",0}, @@ -206,3 +205,4 @@ int main(int argc,const char *argv[]) return 0; } + /*}}}*/ diff --git a/debian/changelog b/debian/changelog index fd37b9c71..8d6109224 100644 --- a/debian/changelog +++ b/debian/changelog @@ -33,6 +33,7 @@ apt (0.7.22) UNRELEASED; urgency=low * support IsAutoInstallOk in the resolver too * fix typo in apt-pkg/acquire.cc which prevents Dl-Limit to work correctly when downloading from multiple sites (Closes: #534752) + * add the various foldmarkers in apt-pkg & cmdline (no code change) [ Michael Vogt ] * honor the dpkg hold state in AutoInstOk (closes: #64141) diff --git a/po/apt-all.pot b/po/apt-all.pot index d1b705837..edcf59cc7 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: 2009-06-30 14:09+0200\n" +"POT-Creation-Date: 2009-06-30 21:08+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -21,8 +21,8 @@ msgid "Package %s version %s has an unmet dep:\n" msgstr "" #: cmdline/apt-cache.cc:183 cmdline/apt-cache.cc:552 cmdline/apt-cache.cc:640 -#: cmdline/apt-cache.cc:796 cmdline/apt-cache.cc:1018 -#: cmdline/apt-cache.cc:1419 cmdline/apt-cache.cc:1570 +#: cmdline/apt-cache.cc:793 cmdline/apt-cache.cc:1013 +#: cmdline/apt-cache.cc:1415 cmdline/apt-cache.cc:1566 #, c-format msgid "Unable to locate package %s" msgstr "" @@ -91,77 +91,77 @@ msgstr "" msgid "Total space accounted for: " msgstr "" -#: cmdline/apt-cache.cc:471 cmdline/apt-cache.cc:1218 +#: cmdline/apt-cache.cc:471 cmdline/apt-cache.cc:1213 #, c-format msgid "Package file %s is out of sync." msgstr "" -#: cmdline/apt-cache.cc:1293 +#: cmdline/apt-cache.cc:1289 msgid "You must give exactly one pattern" msgstr "" -#: cmdline/apt-cache.cc:1447 +#: cmdline/apt-cache.cc:1443 msgid "No packages found" msgstr "" -#: cmdline/apt-cache.cc:1524 +#: cmdline/apt-cache.cc:1520 msgid "Package files:" msgstr "" -#: cmdline/apt-cache.cc:1531 cmdline/apt-cache.cc:1617 +#: cmdline/apt-cache.cc:1527 cmdline/apt-cache.cc:1613 msgid "Cache is out of sync, can't x-ref a package file" msgstr "" -#: cmdline/apt-cache.cc:1532 +#: cmdline/apt-cache.cc:1528 #, c-format msgid "%4i %s\n" msgstr "" #. Show any packages have explicit pins -#: cmdline/apt-cache.cc:1544 +#: cmdline/apt-cache.cc:1540 msgid "Pinned packages:" msgstr "" -#: cmdline/apt-cache.cc:1556 cmdline/apt-cache.cc:1597 +#: cmdline/apt-cache.cc:1552 cmdline/apt-cache.cc:1593 msgid "(not found)" msgstr "" #. Installed version -#: cmdline/apt-cache.cc:1577 +#: cmdline/apt-cache.cc:1573 msgid " Installed: " msgstr "" -#: cmdline/apt-cache.cc:1579 cmdline/apt-cache.cc:1587 +#: cmdline/apt-cache.cc:1575 cmdline/apt-cache.cc:1583 msgid "(none)" msgstr "" #. Candidate Version -#: cmdline/apt-cache.cc:1584 +#: cmdline/apt-cache.cc:1580 msgid " Candidate: " msgstr "" -#: cmdline/apt-cache.cc:1594 +#: cmdline/apt-cache.cc:1590 msgid " Package pin: " msgstr "" #. Show the priority tables -#: cmdline/apt-cache.cc:1603 +#: cmdline/apt-cache.cc:1599 msgid " Version table:" msgstr "" -#: cmdline/apt-cache.cc:1618 +#: cmdline/apt-cache.cc:1614 #, c-format msgid " %4i %s\n" msgstr "" -#: cmdline/apt-cache.cc:1714 cmdline/apt-cdrom.cc:138 cmdline/apt-config.cc:70 +#: cmdline/apt-cache.cc:1709 cmdline/apt-cdrom.cc:134 cmdline/apt-config.cc:70 #: cmdline/apt-extracttemplates.cc:225 ftparchive/apt-ftparchive.cc:547 -#: cmdline/apt-get.cc:2586 cmdline/apt-sortpkgs.cc:144 +#: cmdline/apt-get.cc:2584 cmdline/apt-sortpkgs.cc:144 #, c-format msgid "%s %s for %s compiled on %s %s\n" msgstr "" -#: cmdline/apt-cache.cc:1721 +#: cmdline/apt-cache.cc:1716 msgid "" "Usage: apt-cache [options] command\n" " apt-cache [options] add file1 [file2 ...]\n" @@ -200,15 +200,15 @@ msgid "" "See the apt-cache(8) and apt.conf(5) manual pages for more information.\n" msgstr "" -#: cmdline/apt-cdrom.cc:78 +#: cmdline/apt-cdrom.cc:77 msgid "Please provide a name for this Disc, such as 'Debian 2.1r1 Disk 1'" msgstr "" -#: cmdline/apt-cdrom.cc:93 +#: cmdline/apt-cdrom.cc:92 msgid "Please insert a Disc in the drive and press enter" msgstr "" -#: cmdline/apt-cdrom.cc:117 +#: cmdline/apt-cdrom.cc:114 msgid "Repeat this process for the rest of the CDs in your set." msgstr "" @@ -251,7 +251,7 @@ msgid "" " -o=? Set an arbitrary configuration option, eg -o dir::cache=/tmp\n" msgstr "" -#: cmdline/apt-extracttemplates.cc:267 apt-pkg/pkgcachegen.cc:827 +#: cmdline/apt-extracttemplates.cc:267 apt-pkg/pkgcachegen.cc:826 #, c-format msgid "Unable to write to %s" msgstr "" @@ -554,7 +554,7 @@ msgstr "" msgid "Y" msgstr "" -#: cmdline/apt-get.cc:149 cmdline/apt-get.cc:1661 +#: cmdline/apt-get.cc:149 cmdline/apt-get.cc:1659 #, c-format msgid "Regex compilation error - %s" msgstr "" @@ -653,118 +653,118 @@ msgstr "" msgid "%lu not fully installed or removed.\n" msgstr "" -#: cmdline/apt-get.cc:670 +#: cmdline/apt-get.cc:669 msgid "Correcting dependencies..." msgstr "" -#: cmdline/apt-get.cc:673 +#: cmdline/apt-get.cc:672 msgid " failed." msgstr "" -#: cmdline/apt-get.cc:676 +#: cmdline/apt-get.cc:675 msgid "Unable to correct dependencies" msgstr "" -#: cmdline/apt-get.cc:679 +#: cmdline/apt-get.cc:678 msgid "Unable to minimize the upgrade set" msgstr "" -#: cmdline/apt-get.cc:681 +#: cmdline/apt-get.cc:680 msgid " Done" msgstr "" -#: cmdline/apt-get.cc:685 +#: cmdline/apt-get.cc:684 msgid "You might want to run `apt-get -f install' to correct these." msgstr "" -#: cmdline/apt-get.cc:688 +#: cmdline/apt-get.cc:687 msgid "Unmet dependencies. Try using -f." msgstr "" -#: cmdline/apt-get.cc:710 +#: cmdline/apt-get.cc:712 msgid "WARNING: The following packages cannot be authenticated!" msgstr "" -#: cmdline/apt-get.cc:714 +#: cmdline/apt-get.cc:716 msgid "Authentication warning overridden.\n" msgstr "" -#: cmdline/apt-get.cc:721 +#: cmdline/apt-get.cc:723 msgid "Install these packages without verification [y/N]? " msgstr "" -#: cmdline/apt-get.cc:723 +#: cmdline/apt-get.cc:725 msgid "Some packages could not be authenticated" msgstr "" -#: cmdline/apt-get.cc:732 cmdline/apt-get.cc:884 +#: cmdline/apt-get.cc:734 cmdline/apt-get.cc:883 msgid "There are problems and -y was used without --force-yes" msgstr "" -#: cmdline/apt-get.cc:776 +#: cmdline/apt-get.cc:775 msgid "Internal error, InstallPackages was called with broken packages!" msgstr "" -#: cmdline/apt-get.cc:785 +#: cmdline/apt-get.cc:784 msgid "Packages need to be removed but remove is disabled." msgstr "" -#: cmdline/apt-get.cc:796 +#: cmdline/apt-get.cc:795 msgid "Internal error, Ordering didn't finish" msgstr "" -#: cmdline/apt-get.cc:812 cmdline/apt-get.cc:2003 cmdline/apt-get.cc:2036 +#: cmdline/apt-get.cc:811 cmdline/apt-get.cc:2001 cmdline/apt-get.cc:2034 msgid "Unable to lock the download directory" msgstr "" -#: cmdline/apt-get.cc:822 cmdline/apt-get.cc:2084 cmdline/apt-get.cc:2330 -#: apt-pkg/cachefile.cc:65 +#: cmdline/apt-get.cc:821 cmdline/apt-get.cc:2082 cmdline/apt-get.cc:2328 +#: apt-pkg/cachefile.cc:64 msgid "The list of sources could not be read." msgstr "" -#: cmdline/apt-get.cc:837 +#: cmdline/apt-get.cc:836 msgid "How odd.. The sizes didn't match, email apt@packages.debian.org" msgstr "" -#: cmdline/apt-get.cc:842 +#: cmdline/apt-get.cc:841 #, c-format msgid "Need to get %sB/%sB of archives.\n" msgstr "" -#: cmdline/apt-get.cc:845 +#: cmdline/apt-get.cc:844 #, c-format msgid "Need to get %sB of archives.\n" msgstr "" -#: cmdline/apt-get.cc:850 +#: cmdline/apt-get.cc:849 #, c-format msgid "After this operation, %sB of additional disk space will be used.\n" msgstr "" -#: cmdline/apt-get.cc:853 +#: cmdline/apt-get.cc:852 #, c-format msgid "After this operation, %sB disk space will be freed.\n" msgstr "" -#: cmdline/apt-get.cc:867 cmdline/apt-get.cc:2179 +#: cmdline/apt-get.cc:866 cmdline/apt-get.cc:2177 #, c-format msgid "Couldn't determine free space in %s" msgstr "" -#: cmdline/apt-get.cc:874 +#: cmdline/apt-get.cc:873 #, c-format msgid "You don't have enough free space in %s." msgstr "" -#: cmdline/apt-get.cc:890 cmdline/apt-get.cc:910 +#: cmdline/apt-get.cc:889 cmdline/apt-get.cc:909 msgid "Trivial Only specified but this is not a trivial operation." msgstr "" -#: cmdline/apt-get.cc:892 +#: cmdline/apt-get.cc:891 msgid "Yes, do as I say!" msgstr "" -#: cmdline/apt-get.cc:894 +#: cmdline/apt-get.cc:893 #, c-format msgid "" "You are about to do something potentially harmful.\n" @@ -772,74 +772,74 @@ msgid "" " ?] " msgstr "" -#: cmdline/apt-get.cc:900 cmdline/apt-get.cc:919 +#: cmdline/apt-get.cc:899 cmdline/apt-get.cc:918 msgid "Abort." msgstr "" -#: cmdline/apt-get.cc:915 +#: cmdline/apt-get.cc:914 msgid "Do you want to continue [Y/n]? " msgstr "" -#: cmdline/apt-get.cc:987 cmdline/apt-get.cc:2227 apt-pkg/algorithms.cc:1400 +#: cmdline/apt-get.cc:986 cmdline/apt-get.cc:2225 apt-pkg/algorithms.cc:1397 #, c-format msgid "Failed to fetch %s %s\n" msgstr "" -#: cmdline/apt-get.cc:1005 +#: cmdline/apt-get.cc:1004 msgid "Some files failed to download" msgstr "" -#: cmdline/apt-get.cc:1006 cmdline/apt-get.cc:2236 +#: cmdline/apt-get.cc:1005 cmdline/apt-get.cc:2234 msgid "Download complete and in download only mode" msgstr "" -#: cmdline/apt-get.cc:1012 +#: cmdline/apt-get.cc:1011 msgid "" "Unable to fetch some archives, maybe run apt-get update or try with --fix-" "missing?" msgstr "" -#: cmdline/apt-get.cc:1016 +#: cmdline/apt-get.cc:1015 msgid "--fix-missing and media swapping is not currently supported" msgstr "" -#: cmdline/apt-get.cc:1021 +#: cmdline/apt-get.cc:1020 msgid "Unable to correct missing packages." msgstr "" -#: cmdline/apt-get.cc:1022 +#: cmdline/apt-get.cc:1021 msgid "Aborting install." msgstr "" -#: cmdline/apt-get.cc:1056 +#: cmdline/apt-get.cc:1055 #, c-format msgid "Note, selecting %s instead of %s\n" msgstr "" -#: cmdline/apt-get.cc:1066 +#: cmdline/apt-get.cc:1065 #, c-format msgid "Skipping %s, it is already installed and upgrade is not set.\n" msgstr "" -#: cmdline/apt-get.cc:1084 +#: cmdline/apt-get.cc:1083 #, c-format msgid "Package %s is not installed, so not removed\n" msgstr "" -#: cmdline/apt-get.cc:1095 +#: cmdline/apt-get.cc:1094 #, c-format msgid "Package %s is a virtual package provided by:\n" msgstr "" -#: cmdline/apt-get.cc:1107 +#: cmdline/apt-get.cc:1106 msgid " [Installed]" msgstr "" -#: cmdline/apt-get.cc:1112 +#: cmdline/apt-get.cc:1111 msgid "You should explicitly select one to install." msgstr "" -#: cmdline/apt-get.cc:1117 +#: cmdline/apt-get.cc:1116 #, c-format msgid "" "Package %s is not available, but is referred to by another package.\n" @@ -847,68 +847,68 @@ msgid "" "is only available from another source\n" msgstr "" -#: cmdline/apt-get.cc:1136 +#: cmdline/apt-get.cc:1135 msgid "However the following packages replace it:" msgstr "" -#: cmdline/apt-get.cc:1139 +#: cmdline/apt-get.cc:1138 #, c-format msgid "Package %s has no installation candidate" msgstr "" -#: cmdline/apt-get.cc:1159 +#: cmdline/apt-get.cc:1158 #, c-format msgid "Reinstallation of %s is not possible, it cannot be downloaded.\n" msgstr "" -#: cmdline/apt-get.cc:1167 +#: cmdline/apt-get.cc:1166 #, c-format msgid "%s is already the newest version.\n" msgstr "" -#: cmdline/apt-get.cc:1196 +#: cmdline/apt-get.cc:1195 #, c-format msgid "Release '%s' for '%s' was not found" msgstr "" -#: cmdline/apt-get.cc:1198 +#: cmdline/apt-get.cc:1197 #, c-format msgid "Version '%s' for '%s' was not found" msgstr "" -#: cmdline/apt-get.cc:1204 +#: cmdline/apt-get.cc:1203 #, c-format msgid "Selected version %s (%s) for %s\n" msgstr "" -#: cmdline/apt-get.cc:1310 +#: cmdline/apt-get.cc:1309 #, c-format msgid "No source package '%s' picking '%s' instead\n" msgstr "" -#: cmdline/apt-get.cc:1348 +#: cmdline/apt-get.cc:1346 msgid "The update command takes no arguments" msgstr "" -#: cmdline/apt-get.cc:1361 +#: cmdline/apt-get.cc:1359 msgid "Unable to lock the list directory" msgstr "" -#: cmdline/apt-get.cc:1413 +#: cmdline/apt-get.cc:1411 msgid "We are not supposed to delete stuff, can't start AutoRemover" msgstr "" -#: cmdline/apt-get.cc:1445 +#: cmdline/apt-get.cc:1443 msgid "" "The following packages were automatically installed and are no longer " "required:" msgstr "" -#: cmdline/apt-get.cc:1447 +#: cmdline/apt-get.cc:1445 msgid "Use 'apt-get autoremove' to remove them." msgstr "" -#: cmdline/apt-get.cc:1452 +#: cmdline/apt-get.cc:1450 msgid "" "Hmm, seems like the AutoRemover destroyed something which really\n" "shouldn't happen. Please file a bug report against apt." @@ -924,49 +924,49 @@ msgstr "" #. "that package should be filed.") << endl; #. } #. -#: cmdline/apt-get.cc:1455 cmdline/apt-get.cc:1745 +#: cmdline/apt-get.cc:1453 cmdline/apt-get.cc:1743 msgid "The following information may help to resolve the situation:" msgstr "" -#: cmdline/apt-get.cc:1459 +#: cmdline/apt-get.cc:1457 msgid "Internal Error, AutoRemover broke stuff" msgstr "" -#: cmdline/apt-get.cc:1478 +#: cmdline/apt-get.cc:1476 msgid "Internal error, AllUpgrade broke stuff" msgstr "" -#: cmdline/apt-get.cc:1533 +#: cmdline/apt-get.cc:1531 #, c-format msgid "Couldn't find task %s" msgstr "" -#: cmdline/apt-get.cc:1648 cmdline/apt-get.cc:1684 +#: cmdline/apt-get.cc:1646 cmdline/apt-get.cc:1682 #, c-format msgid "Couldn't find package %s" msgstr "" -#: cmdline/apt-get.cc:1671 +#: cmdline/apt-get.cc:1669 #, c-format msgid "Note, selecting %s for regex '%s'\n" msgstr "" -#: cmdline/apt-get.cc:1702 +#: cmdline/apt-get.cc:1700 #, c-format msgid "%s set to manually installed.\n" msgstr "" -#: cmdline/apt-get.cc:1715 +#: cmdline/apt-get.cc:1713 msgid "You might want to run `apt-get -f install' to correct these:" msgstr "" -#: cmdline/apt-get.cc:1718 +#: cmdline/apt-get.cc:1716 msgid "" "Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a " "solution)." msgstr "" -#: cmdline/apt-get.cc:1730 +#: cmdline/apt-get.cc:1728 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" @@ -974,152 +974,152 @@ msgid "" "or been moved out of Incoming." msgstr "" -#: cmdline/apt-get.cc:1748 +#: cmdline/apt-get.cc:1746 msgid "Broken packages" msgstr "" -#: cmdline/apt-get.cc:1777 +#: cmdline/apt-get.cc:1775 msgid "The following extra packages will be installed:" msgstr "" -#: cmdline/apt-get.cc:1866 +#: cmdline/apt-get.cc:1864 msgid "Suggested packages:" msgstr "" -#: cmdline/apt-get.cc:1867 +#: cmdline/apt-get.cc:1865 msgid "Recommended packages:" msgstr "" -#: cmdline/apt-get.cc:1896 +#: cmdline/apt-get.cc:1894 msgid "Calculating upgrade... " msgstr "" -#: cmdline/apt-get.cc:1899 methods/ftp.cc:702 methods/connect.cc:112 +#: cmdline/apt-get.cc:1897 methods/ftp.cc:702 methods/connect.cc:112 msgid "Failed" msgstr "" -#: cmdline/apt-get.cc:1904 +#: cmdline/apt-get.cc:1902 msgid "Done" msgstr "" -#: cmdline/apt-get.cc:1971 cmdline/apt-get.cc:1979 +#: cmdline/apt-get.cc:1969 cmdline/apt-get.cc:1977 msgid "Internal error, problem resolver broke stuff" msgstr "" -#: cmdline/apt-get.cc:2079 +#: cmdline/apt-get.cc:2077 msgid "Must specify at least one package to fetch source for" msgstr "" -#: cmdline/apt-get.cc:2109 cmdline/apt-get.cc:2348 +#: cmdline/apt-get.cc:2107 cmdline/apt-get.cc:2346 #, c-format msgid "Unable to find a source package for %s" msgstr "" -#: cmdline/apt-get.cc:2158 +#: cmdline/apt-get.cc:2156 #, c-format msgid "Skipping already downloaded file '%s'\n" msgstr "" -#: cmdline/apt-get.cc:2186 +#: cmdline/apt-get.cc:2184 #, c-format msgid "You don't have enough free space in %s" msgstr "" -#: cmdline/apt-get.cc:2192 +#: cmdline/apt-get.cc:2190 #, c-format msgid "Need to get %sB/%sB of source archives.\n" msgstr "" -#: cmdline/apt-get.cc:2195 +#: cmdline/apt-get.cc:2193 #, c-format msgid "Need to get %sB of source archives.\n" msgstr "" -#: cmdline/apt-get.cc:2201 +#: cmdline/apt-get.cc:2199 #, c-format msgid "Fetch source %s\n" msgstr "" -#: cmdline/apt-get.cc:2232 +#: cmdline/apt-get.cc:2230 msgid "Failed to fetch some archives." msgstr "" -#: cmdline/apt-get.cc:2260 +#: cmdline/apt-get.cc:2258 #, c-format msgid "Skipping unpack of already unpacked source in %s\n" msgstr "" -#: cmdline/apt-get.cc:2272 +#: cmdline/apt-get.cc:2270 #, c-format msgid "Unpack command '%s' failed.\n" msgstr "" -#: cmdline/apt-get.cc:2273 +#: cmdline/apt-get.cc:2271 #, c-format msgid "Check if the 'dpkg-dev' package is installed.\n" msgstr "" -#: cmdline/apt-get.cc:2290 +#: cmdline/apt-get.cc:2288 #, c-format msgid "Build command '%s' failed.\n" msgstr "" -#: cmdline/apt-get.cc:2309 +#: cmdline/apt-get.cc:2307 msgid "Child process failed" msgstr "" -#: cmdline/apt-get.cc:2325 +#: cmdline/apt-get.cc:2323 msgid "Must specify at least one package to check builddeps for" msgstr "" -#: cmdline/apt-get.cc:2353 +#: cmdline/apt-get.cc:2351 #, c-format msgid "Unable to get build-dependency information for %s" msgstr "" -#: cmdline/apt-get.cc:2373 +#: cmdline/apt-get.cc:2371 #, c-format msgid "%s has no build depends.\n" msgstr "" -#: cmdline/apt-get.cc:2425 +#: cmdline/apt-get.cc:2423 #, c-format msgid "" "%s dependency for %s cannot be satisfied because the package %s cannot be " "found" msgstr "" -#: cmdline/apt-get.cc:2478 +#: cmdline/apt-get.cc:2476 #, 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:2514 +#: cmdline/apt-get.cc:2512 #, c-format msgid "Failed to satisfy %s dependency for %s: Installed package %s is too new" msgstr "" -#: cmdline/apt-get.cc:2541 +#: cmdline/apt-get.cc:2539 #, c-format msgid "Failed to satisfy %s dependency for %s: %s" msgstr "" -#: cmdline/apt-get.cc:2555 +#: cmdline/apt-get.cc:2553 #, c-format msgid "Build-dependencies for %s could not be satisfied." msgstr "" -#: cmdline/apt-get.cc:2559 +#: cmdline/apt-get.cc:2557 msgid "Failed to process build dependencies" msgstr "" -#: cmdline/apt-get.cc:2591 +#: cmdline/apt-get.cc:2589 msgid "Supported modules:" msgstr "" -#: cmdline/apt-get.cc:2632 +#: cmdline/apt-get.cc:2630 msgid "" "Usage: apt-get [options] command\n" " apt-get [options] install|remove pkg1 [pkg2 ...]\n" @@ -1163,7 +1163,7 @@ msgid "" " This APT has Super Cow Powers.\n" msgstr "" -#: cmdline/apt-get.cc:2799 +#: cmdline/apt-get.cc:2796 msgid "" "NOTE: This is only a simulation!\n" " apt-get needs root privileges for real execution.\n" @@ -1388,7 +1388,7 @@ msgstr "" #: 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 +#: apt-pkg/acquire.cc:418 apt-pkg/clean.cc:33 #, c-format msgid "Unable to read %s" msgstr "" @@ -1418,9 +1418,9 @@ msgid "The info and temp directories need to be on the same filesystem" msgstr "" #. Build the status cache -#: apt-inst/deb/dpkgdb.cc:135 apt-pkg/pkgcachegen.cc:760 -#: apt-pkg/pkgcachegen.cc:829 apt-pkg/pkgcachegen.cc:834 -#: apt-pkg/pkgcachegen.cc:957 +#: apt-inst/deb/dpkgdb.cc:135 apt-pkg/pkgcachegen.cc:759 +#: apt-pkg/pkgcachegen.cc:828 apt-pkg/pkgcachegen.cc:833 +#: apt-pkg/pkgcachegen.cc:956 msgid "Reading package lists" msgstr "" @@ -2044,7 +2044,7 @@ msgid "Unable to stat the mount point %s" msgstr "" #: apt-pkg/contrib/cdromutl.cc:146 apt-pkg/contrib/cdromutl.cc:180 -#: apt-pkg/acquire.cc:424 apt-pkg/acquire.cc:449 apt-pkg/clean.cc:40 +#: apt-pkg/acquire.cc:424 apt-pkg/acquire.cc:449 apt-pkg/clean.cc:39 #, c-format msgid "Unable to change to %s" msgstr "" @@ -2209,16 +2209,16 @@ msgstr "" msgid "Dependency generation" msgstr "" -#: apt-pkg/depcache.cc:174 apt-pkg/depcache.cc:193 apt-pkg/depcache.cc:197 +#: apt-pkg/depcache.cc:173 apt-pkg/depcache.cc:192 apt-pkg/depcache.cc:196 msgid "Reading state information" msgstr "" -#: apt-pkg/depcache.cc:221 +#: apt-pkg/depcache.cc:220 #, c-format msgid "Failed to open StateFile %s" msgstr "" -#: apt-pkg/depcache.cc:227 +#: apt-pkg/depcache.cc:226 #, c-format msgid "Failed to write temporary StateFile %s" msgstr "" @@ -2263,7 +2263,7 @@ msgstr "" msgid "Opening %s" msgstr "" -#: apt-pkg/sourcelist.cc:216 apt-pkg/cdrom.cc:448 +#: apt-pkg/sourcelist.cc:216 apt-pkg/cdrom.cc:445 #, c-format msgid "Line %u too long in source list %s." msgstr "" @@ -2283,7 +2283,7 @@ msgstr "" msgid "Malformed line %u in source list %s (vendor id)" msgstr "" -#: apt-pkg/packagemanager.cc:428 +#: apt-pkg/packagemanager.cc:426 #, c-format msgid "" "This installation run will require temporarily removing the essential " @@ -2302,17 +2302,17 @@ msgid "" "The package %s needs to be reinstalled, but I can't find an archive for it." msgstr "" -#: apt-pkg/algorithms.cc:1147 +#: apt-pkg/algorithms.cc:1146 msgid "" "Error, pkgProblemResolver::Resolve generated breaks, this may be caused by " "held packages." msgstr "" -#: apt-pkg/algorithms.cc:1149 +#: apt-pkg/algorithms.cc:1148 msgid "Unable to correct problems, you have held broken packages." msgstr "" -#: apt-pkg/algorithms.cc:1426 apt-pkg/algorithms.cc:1428 +#: apt-pkg/algorithms.cc:1423 apt-pkg/algorithms.cc:1425 msgid "" "Some index files failed to download, they have been ignored, or old ones " "used instead." @@ -2330,12 +2330,12 @@ msgstr "" #. only show the ETA if it makes sense #. two days -#: apt-pkg/acquire.cc:828 +#: apt-pkg/acquire.cc:825 #, c-format msgid "Retrieving file %li of %li (%s remaining)" msgstr "" -#: apt-pkg/acquire.cc:830 +#: apt-pkg/acquire.cc:827 #, c-format msgid "Retrieving file %li of %li" msgstr "" @@ -2364,7 +2364,7 @@ msgstr "" msgid "Unable to determine a suitable packaging system type" msgstr "" -#: apt-pkg/clean.cc:57 +#: apt-pkg/clean.cc:56 #, c-format msgid "Unable to stat %s." msgstr "" @@ -2373,11 +2373,11 @@ msgstr "" msgid "You must put some 'source' URIs in your sources.list" msgstr "" -#: apt-pkg/cachefile.cc:71 +#: apt-pkg/cachefile.cc:70 msgid "The package lists or status file could not be parsed or opened." msgstr "" -#: apt-pkg/cachefile.cc:75 +#: apt-pkg/cachefile.cc:74 msgid "You may want to run apt-get update to correct these problems" msgstr "" @@ -2474,16 +2474,16 @@ msgstr "" msgid "Package %s %s was not found while processing file dependencies" msgstr "" -#: apt-pkg/pkgcachegen.cc:690 +#: apt-pkg/pkgcachegen.cc:689 #, c-format msgid "Couldn't stat source package list %s" msgstr "" -#: apt-pkg/pkgcachegen.cc:775 +#: apt-pkg/pkgcachegen.cc:774 msgid "Collecting File Provides" msgstr "" -#: apt-pkg/pkgcachegen.cc:902 apt-pkg/pkgcachegen.cc:909 +#: apt-pkg/pkgcachegen.cc:901 apt-pkg/pkgcachegen.cc:908 msgid "IO Error saving source cache" msgstr "" @@ -2492,39 +2492,39 @@ msgstr "" msgid "rename failed, %s (%s -> %s)." msgstr "" -#: apt-pkg/acquire-item.cc:401 +#: apt-pkg/acquire-item.cc:394 msgid "MD5Sum mismatch" msgstr "" -#: apt-pkg/acquire-item.cc:658 apt-pkg/acquire-item.cc:1426 +#: apt-pkg/acquire-item.cc:644 apt-pkg/acquire-item.cc:1406 msgid "Hash Sum mismatch" msgstr "" -#: apt-pkg/acquire-item.cc:1118 +#: apt-pkg/acquire-item.cc:1101 msgid "There is no public key available for the following key IDs:\n" msgstr "" -#: apt-pkg/acquire-item.cc:1231 +#: apt-pkg/acquire-item.cc:1211 #, c-format msgid "" "I wasn't able to locate a file for the %s package. This might mean you need " "to manually fix this package. (due to missing arch)" msgstr "" -#: apt-pkg/acquire-item.cc:1290 +#: apt-pkg/acquire-item.cc:1270 #, c-format msgid "" "I wasn't able to locate file for the %s package. This might mean you need to " "manually fix this package." msgstr "" -#: apt-pkg/acquire-item.cc:1331 +#: apt-pkg/acquire-item.cc:1311 #, c-format msgid "" "The package index files are corrupted. No Filename: field for package %s." msgstr "" -#: apt-pkg/acquire-item.cc:1418 +#: apt-pkg/acquire-item.cc:1398 msgid "Size mismatch" msgstr "" @@ -2533,99 +2533,99 @@ msgstr "" msgid "Vendor block %s contains no fingerprint" msgstr "" -#: apt-pkg/cdrom.cc:529 +#: apt-pkg/cdrom.cc:525 #, c-format msgid "" "Using CD-ROM mount point %s\n" "Mounting CD-ROM\n" msgstr "" -#: apt-pkg/cdrom.cc:538 apt-pkg/cdrom.cc:627 +#: apt-pkg/cdrom.cc:534 apt-pkg/cdrom.cc:622 msgid "Identifying.. " msgstr "" -#: apt-pkg/cdrom.cc:563 +#: apt-pkg/cdrom.cc:559 #, c-format msgid "Stored label: %s\n" msgstr "" -#: apt-pkg/cdrom.cc:570 apt-pkg/cdrom.cc:841 +#: apt-pkg/cdrom.cc:566 apt-pkg/cdrom.cc:836 msgid "Unmounting CD-ROM...\n" msgstr "" -#: apt-pkg/cdrom.cc:590 +#: apt-pkg/cdrom.cc:585 #, c-format msgid "Using CD-ROM mount point %s\n" msgstr "" -#: apt-pkg/cdrom.cc:608 +#: apt-pkg/cdrom.cc:603 msgid "Unmounting CD-ROM\n" msgstr "" -#: apt-pkg/cdrom.cc:612 +#: apt-pkg/cdrom.cc:607 msgid "Waiting for disc...\n" msgstr "" #. Mount the new CDROM -#: apt-pkg/cdrom.cc:620 +#: apt-pkg/cdrom.cc:615 msgid "Mounting CD-ROM...\n" msgstr "" -#: apt-pkg/cdrom.cc:638 +#: apt-pkg/cdrom.cc:633 msgid "Scanning disc for index files..\n" msgstr "" -#: apt-pkg/cdrom.cc:678 +#: apt-pkg/cdrom.cc:673 #, c-format msgid "" "Found %zu package indexes, %zu source indexes, %zu translation indexes and %" "zu signatures\n" msgstr "" -#: apt-pkg/cdrom.cc:715 +#: apt-pkg/cdrom.cc:710 #, c-format msgid "Found label '%s'\n" msgstr "" -#: apt-pkg/cdrom.cc:744 +#: apt-pkg/cdrom.cc:739 msgid "That is not a valid name, try again.\n" msgstr "" -#: apt-pkg/cdrom.cc:760 +#: apt-pkg/cdrom.cc:755 #, c-format msgid "" "This disc is called: \n" "'%s'\n" msgstr "" -#: apt-pkg/cdrom.cc:764 +#: apt-pkg/cdrom.cc:759 msgid "Copying package lists..." msgstr "" -#: apt-pkg/cdrom.cc:790 +#: apt-pkg/cdrom.cc:785 msgid "Writing new source list\n" msgstr "" -#: apt-pkg/cdrom.cc:799 +#: apt-pkg/cdrom.cc:794 msgid "Source list entries for this disc are:\n" msgstr "" -#: apt-pkg/indexcopy.cc:263 apt-pkg/indexcopy.cc:823 +#: apt-pkg/indexcopy.cc:263 apt-pkg/indexcopy.cc:822 #, c-format msgid "Wrote %i records.\n" msgstr "" -#: apt-pkg/indexcopy.cc:265 apt-pkg/indexcopy.cc:825 +#: apt-pkg/indexcopy.cc:265 apt-pkg/indexcopy.cc:824 #, c-format msgid "Wrote %i records with %i missing files.\n" msgstr "" -#: apt-pkg/indexcopy.cc:268 apt-pkg/indexcopy.cc:828 +#: apt-pkg/indexcopy.cc:268 apt-pkg/indexcopy.cc:827 #, c-format msgid "Wrote %i records with %i mismatched files\n" msgstr "" -#: apt-pkg/indexcopy.cc:271 apt-pkg/indexcopy.cc:831 +#: apt-pkg/indexcopy.cc:271 apt-pkg/indexcopy.cc:830 #, c-format msgid "Wrote %i records with %i missing files and %i mismatched files\n" msgstr "" -- cgit v1.2.3-70-g09d2 From 6910a2accecd7c8e8493b74130d8dbf3972014a8 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 30 Jun 2009 21:44:24 +0200 Subject: * add hook for MarkInstall and MarkDelete (closes: #470035) * honor the dpkg hold state in new Marker hooks (closes: #64141) Combine the proposed AutoInstOk and IsAutoInstallOk to more general hooks for MarkInstall (and another one for MarkDelete) with the same parameters as the call these hooks should check. --- apt-pkg/algorithms.cc | 25 ++++--------------- apt-pkg/depcache.cc | 67 +++++++++++++++++++++++++++++++++++++-------------- apt-pkg/depcache.h | 40 ++++++++++++++++++------------ debian/changelog | 5 ++-- po/apt-all.pot | 8 +++--- 5 files changed, 84 insertions(+), 61 deletions(-) (limited to 'apt-pkg/depcache.cc') diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc index 68a4af8ed..a30a02edb 100644 --- a/apt-pkg/algorithms.cc +++ b/apt-pkg/algorithms.cc @@ -984,26 +984,11 @@ bool pkgProblemResolver::Resolve(bool BrokenFix) // Consider other options if (InOr == false) { - if (Cache.AutoInstOk(I, Cache[I].CandidateVerIter(Cache),Start) == true) - { - if (Debug == true) - clog << " Removing " << I.Name() << " rather than change " << Start.TargetPkg().Name() << endl; - Cache.MarkDelete(I); - if (Counter > 1) - { - if (Scores[Pkg->ID] > Scores[I->ID]) - Scores[I->ID] = Scores[Pkg->ID]; - } - } else { - /* The dependency of the TargetPkg would be satisfiable with I but it is - forbidden to install I automatical, so anything we can do is hold - back the TargetPkg. - */ - if (Debug == true) - clog << " Hold back " << Start.TargetPkg().Name() << - " rather than change denied AutoInstall " << I.Name() << endl; - Cache.MarkKeep(Start.TargetPkg()); - } + if (Debug == true) + clog << " Removing " << I.Name() << " rather than change " << Start.TargetPkg().Name() << endl; + Cache.MarkDelete(I); + if (Counter > 1 && Scores[Pkg->ID] > Scores[I->ID]) + Scores[I->ID] = Scores[Pkg->ID]; } } } diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index a284a05c7..7c86204f5 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -769,7 +769,7 @@ void pkgDepCache::MarkKeep(PkgIterator const &Pkg, bool Soft, bool FromUser, // --------------------------------------------------------------------- /* */ void pkgDepCache::MarkDelete(PkgIterator const &Pkg, bool rPurge, - unsigned long Depth) + unsigned long Depth, bool FromUser) { // Simplifies other routines. if (Pkg.end() == true) @@ -791,6 +791,13 @@ void pkgDepCache::MarkDelete(PkgIterator const &Pkg, bool rPurge, if (Pkg->VersionList == 0) return; + // check if we are allowed to install the package + if (IsDeleteOk(Pkg,rPurge,Depth,FromUser) == false) + { + MarkKeep(Pkg,false,FromUser,Depth+1); + return; + } + if (DebugMarker == true) std::clog << OutputInDepth(Depth) << "MarkDelete " << Pkg << std::endl; @@ -808,6 +815,23 @@ void pkgDepCache::MarkDelete(PkgIterator const &Pkg, bool rPurge, AddSizes(Pkg); } /*}}}*/ +// DepCache::IsDeleteOk - check if it is ok to remove this package /*{{{*/ +// --------------------------------------------------------------------- +/* The default implementation just honors dpkg hold + But an application using this library can override this method + to control the MarkDelete behaviour */ +bool pkgDepCache::IsDeleteOk(PkgIterator const &Pkg,bool rPurge, + unsigned long Depth, bool FromUser) +{ + if (FromUser == false && Pkg->SelectedState == pkgCache::State::Hold) + { + if (DebugMarker == true) + std::clog << OutputInDepth(Depth) << "Hold prevents MarkDelete of " << Pkg << std::endl; + return false; + } + return true; +} + /*}}}*/ // DepCache::MarkInstall - Put the package in the install state /*{{{*/ // --------------------------------------------------------------------- /* */ @@ -843,6 +867,14 @@ void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst, // We dont even try to install virtual packages.. if (Pkg->VersionList == 0) return; + + // check if we are allowed to install the package + if (IsInstallOk(Pkg,AutoInst,Depth,FromUser) == false) + { + MarkKeep(Pkg,false,FromUser,Depth+1); + return; + } + /* Target the candidate version and remove the autoflag. We reset the autoflag below if this was called recursively. Otherwise the user should have the ability to de-auto a package by changing its state */ @@ -871,7 +903,7 @@ void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst, AddStates(Pkg); Update(Pkg); AddSizes(Pkg); - + if (AutoInst == false) return; @@ -1001,8 +1033,7 @@ void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst, } } - if (InstPkg.end() == false && - AutoInstOk(InstPkg, (*this)[InstPkg].CandidateVerIter(*this), Start)) + if (InstPkg.end() == false) { if(DebugAutoInstall == true) std::clog << OutputInDepth(Depth) << "Installing " << InstPkg.Name() @@ -1040,30 +1071,30 @@ void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst, PkgIterator Pkg = Ver.ParentPkg(); if (Start->Type != Dep::DpkgBreaks) - { - if(AutoInstOk(Pkg, VerIterator(*this), Start)) - MarkDelete(Pkg); - } - else - if (PkgState[Pkg->ID].CandidateVer != *I && - AutoInstOk(Pkg, VerIterator(*this, PkgState[Pkg->ID].CandidateVer), Start)) - MarkInstall(Pkg,true,Depth + 1, false, ForceImportantDeps); + MarkDelete(Pkg,false,Depth + 1, false); + else if (PkgState[Pkg->ID].CandidateVer != *I) + MarkInstall(Pkg,true,Depth + 1, false, ForceImportantDeps); } continue; } } } /*}}}*/ -// DepCache::AutoInstOk - check if it is to install this package /*{{{*/ +// DepCache::IsInstallOk - check if it is ok to install this package /*{{{*/ // --------------------------------------------------------------------- /* The default implementation just honors dpkg hold - But an application using this library can override this method + But an application using this library can override this method to control the MarkInstall behaviour */ -bool pkgDepCache::AutoInstOk(const PkgIterator &Pkg, - const VerIterator &v, - const DepIterator &d) +bool pkgDepCache::IsInstallOk(PkgIterator const &Pkg,bool AutoInst, + unsigned long Depth, bool FromUser) { - return (Pkg->SelectedState != pkgCache::State::Hold); + if (FromUser == false && Pkg->SelectedState == pkgCache::State::Hold) + { + if (DebugMarker == true) + std::clog << OutputInDepth(Depth) << "Hold prevents MarkInstall of " << Pkg << std::endl; + return false; + } + return true; } /*}}}*/ // DepCache::SetReInstall - Set the reinstallation flag /*{{{*/ diff --git a/apt-pkg/depcache.h b/apt-pkg/depcache.h index 10f9c1091..44a7f8c02 100644 --- a/apt-pkg/depcache.h +++ b/apt-pkg/depcache.h @@ -363,20 +363,6 @@ class pkgDepCache : protected pkgCache::Namespace */ virtual bool MarkFollowsSuggests(); - /** \return \b true if it's OK for MarkInstall to recursively - * install the given version of the given package. - * - * \param p the package that MarkInstall wants to install. - * \param v the version being installed, or an end iterator - * if p is being removed. - * \param d the dependency being fixed. - * - * The default implementation unconditionally returns \b true. - */ - virtual bool AutoInstOk(const PkgIterator &p, - const VerIterator &v, - const DepIterator &d); - /** \brief Update the Marked and Garbage fields of all packages. * * This routine is implicitly invoked after all state manipulators @@ -406,7 +392,7 @@ class pkgDepCache : protected pkgCache::Namespace void MarkKeep(PkgIterator const &Pkg, bool Soft = false, bool FromUser = true, unsigned long Depth = 0); void MarkDelete(PkgIterator const &Pkg, bool Purge = false, - unsigned long Depth = 0); + unsigned long Depth = 0, bool FromUser = true); void MarkInstall(PkgIterator const &Pkg,bool AutoInst = true, unsigned long Depth = 0, bool FromUser = true, bool ForceImportantDeps = false); @@ -417,7 +403,29 @@ class pkgDepCache : protected pkgCache::Namespace /** Set the "is automatically installed" flag of Pkg. */ void MarkAuto(const PkgIterator &Pkg, bool Auto); // @} - + + /** \return \b true if it's OK for MarkInstall to install + * the given package. + * + * \param Pkg the package that MarkInstall wants to install. + * \param AutoInst needs a previous MarkInstall this package? + * \param Depth recursive deep of this Marker call + * \param FromUser was the install requested by the user? + */ + virtual bool IsInstallOk(const PkgIterator &Pkg,bool AutoInst = true, + unsigned long Depth = 0, bool FromUser = true); + + /** \return \b true if it's OK for MarkDelete to remove + * the given package. + * + * \param Pkg the package that MarkDelete wants to remove. + * \param Purge should we purge instead of "only" remove? + * \param Depth recursive deep of this Marker call + * \param FromUser was the remove requested by the user? + */ + 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); diff --git a/debian/changelog b/debian/changelog index 8d6109224..ab8da4c6c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -29,14 +29,13 @@ apt (0.7.22) UNRELEASED; urgency=low * add Debug::pkgProblemResolver::ShowScores and make the scores adjustable * do not write state file in simulate mode (closes: #433007) - * add hook for auto-install (closes: #470035) - * support IsAutoInstallOk in the resolver too + * add hook for MarkInstall and MarkDelete (closes: #470035) * fix typo in apt-pkg/acquire.cc which prevents Dl-Limit to work correctly when downloading from multiple sites (Closes: #534752) * add the various foldmarkers in apt-pkg & cmdline (no code change) [ Michael Vogt ] - * honor the dpkg hold state in AutoInstOk (closes: #64141) + * honor the dpkg hold state in new Marker hooks (closes: #64141) [ Julian Andres Klode ] * apt-pkg/contrib/configuration.cc: Fix a small memory leak in diff --git a/po/apt-all.pot b/po/apt-all.pot index edcf59cc7..12e15110e 100644 --- a/po/apt-all.pot +++ b/po/apt-all.pot @@ -780,7 +780,7 @@ msgstr "" msgid "Do you want to continue [Y/n]? " msgstr "" -#: cmdline/apt-get.cc:986 cmdline/apt-get.cc:2225 apt-pkg/algorithms.cc:1397 +#: cmdline/apt-get.cc:986 cmdline/apt-get.cc:2225 apt-pkg/algorithms.cc:1382 #, c-format msgid "Failed to fetch %s %s\n" msgstr "" @@ -2302,17 +2302,17 @@ msgid "" "The package %s needs to be reinstalled, but I can't find an archive for it." msgstr "" -#: apt-pkg/algorithms.cc:1146 +#: apt-pkg/algorithms.cc:1131 msgid "" "Error, pkgProblemResolver::Resolve generated breaks, this may be caused by " "held packages." msgstr "" -#: apt-pkg/algorithms.cc:1148 +#: apt-pkg/algorithms.cc:1133 msgid "Unable to correct problems, you have held broken packages." msgstr "" -#: apt-pkg/algorithms.cc:1423 apt-pkg/algorithms.cc:1425 +#: apt-pkg/algorithms.cc:1408 apt-pkg/algorithms.cc:1410 msgid "" "Some index files failed to download, they have been ignored, or old ones " "used instead." -- cgit v1.2.3-70-g09d2 From c3a85f49fd8c82326707ce870c2b11b587fd0bd1 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 7 Jul 2009 20:14:04 +0200 Subject: * remove the MarkKeep calls if Is{Delete,Install}Ok false, because they have no effect anyway (thanks Daniel Burrows for noticing) * improve documentation of the Is{Delete,Install}Ok methods a bit * add the FromUser boolean to the debug output of the markers --- apt-pkg/depcache.cc | 16 +++++----------- apt-pkg/depcache.h | 16 ++++++++++++++++ 2 files changed, 21 insertions(+), 11 deletions(-) (limited to 'apt-pkg/depcache.cc') diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index 7c86204f5..e17b7b0e8 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -747,7 +747,7 @@ void pkgDepCache::MarkKeep(PkgIterator const &Pkg, bool Soft, bool FromUser, #endif if (DebugMarker == true) - std::clog << OutputInDepth(Depth) << "MarkKeep " << Pkg << std::endl; + std::clog << OutputInDepth(Depth) << "MarkKeep " << Pkg << " FU=" << FromUser << std::endl; RemoveSizes(Pkg); RemoveStates(Pkg); @@ -793,13 +793,10 @@ void pkgDepCache::MarkDelete(PkgIterator const &Pkg, bool rPurge, // check if we are allowed to install the package if (IsDeleteOk(Pkg,rPurge,Depth,FromUser) == false) - { - MarkKeep(Pkg,false,FromUser,Depth+1); return; - } if (DebugMarker == true) - std::clog << OutputInDepth(Depth) << "MarkDelete " << Pkg << std::endl; + std::clog << OutputInDepth(Depth) << "MarkDelete " << Pkg << " FU=" << FromUser << std::endl; RemoveSizes(Pkg); RemoveStates(Pkg); @@ -826,7 +823,7 @@ bool pkgDepCache::IsDeleteOk(PkgIterator const &Pkg,bool rPurge, if (FromUser == false && Pkg->SelectedState == pkgCache::State::Hold) { if (DebugMarker == true) - std::clog << OutputInDepth(Depth) << "Hold prevents MarkDelete of " << Pkg << std::endl; + std::clog << OutputInDepth(Depth) << "Hold prevents MarkDelete of " << Pkg << " FU=" << FromUser << std::endl; return false; } return true; @@ -870,10 +867,7 @@ void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst, // check if we are allowed to install the package if (IsInstallOk(Pkg,AutoInst,Depth,FromUser) == false) - { - MarkKeep(Pkg,false,FromUser,Depth+1); return; - } /* Target the candidate version and remove the autoflag. We reset the autoflag below if this was called recursively. Otherwise the user @@ -908,7 +902,7 @@ void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst, return; if (DebugMarker == true) - std::clog << OutputInDepth(Depth) << "MarkInstall " << Pkg << std::endl; + std::clog << OutputInDepth(Depth) << "MarkInstall " << Pkg << " FU=" << FromUser << std::endl; DepIterator Dep = P.InstVerIter(*this).DependsList(); for (; Dep.end() != true;) @@ -1091,7 +1085,7 @@ bool pkgDepCache::IsInstallOk(PkgIterator const &Pkg,bool AutoInst, if (FromUser == false && Pkg->SelectedState == pkgCache::State::Hold) { if (DebugMarker == true) - std::clog << OutputInDepth(Depth) << "Hold prevents MarkInstall of " << Pkg << std::endl; + std::clog << OutputInDepth(Depth) << "Hold prevents MarkInstall of " << Pkg << " FU=" << FromUser << std::endl; return false; } return true; diff --git a/apt-pkg/depcache.h b/apt-pkg/depcache.h index 44a7f8c02..0306861a1 100644 --- a/apt-pkg/depcache.h +++ b/apt-pkg/depcache.h @@ -407,6 +407,14 @@ class pkgDepCache : protected pkgCache::Namespace /** \return \b true if it's OK for MarkInstall to install * the given package. * + * See the default implementation for a simple example how this + * method can be used. + * Overriding implementations should use the hold-state-flag to cache + * results from previous checks of this package - also it should + * be used if the default resolver implementation is also used to + * ensure that these packages are handled like "normal" dpkg holds. + * + * The parameters are the same as in the calling MarkInstall: * \param Pkg the package that MarkInstall wants to install. * \param AutoInst needs a previous MarkInstall this package? * \param Depth recursive deep of this Marker call @@ -418,6 +426,14 @@ class pkgDepCache : protected pkgCache::Namespace /** \return \b true if it's OK for MarkDelete to remove * the given package. * + * See the default implementation for a simple example how this + * method can be used. + * Overriding implementations should use the hold-state-flag to cache + * results from previous checks of this package - also it should + * be used if the default resolver implementation is also used to + * ensure that these packages are handled like "normal" dpkg holds. + * + * The parameters are the same as in the calling MarkDelete: * \param Pkg the package that MarkDelete wants to remove. * \param Purge should we purge instead of "only" remove? * \param Depth recursive deep of this Marker call -- cgit v1.2.3-70-g09d2 From 95afdfd096e0275c78a6ee7b1148f84af530650e Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Sat, 25 Jul 2009 16:00:41 -0300 Subject: Apply patch from Sami Liedes to reduce the number of times we call progress bar updating and debugging configuration settings. --- apt-pkg/depcache.cc | 39 ++++++++++++++++++++++++++------------- debian/changelog | 5 +++++ 2 files changed, 31 insertions(+), 13 deletions(-) (limited to 'apt-pkg/depcache.cc') diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index e17b7b0e8..5c011d743 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -127,9 +127,12 @@ bool pkgDepCache::Init(OpProgress *Prog) /* Set the current state of everything. In this state all of the packages are kept exactly as is. See AllUpgrade */ int Done = 0; + int Update_interval = Head().PackageCount/100; + if (Update_interval == 0) + Update_interval = 1; for (PkgIterator I = PkgBegin(); I.end() != true; I++,Done++) { - if (Prog != 0) + if (Prog != 0 && Done%Update_interval == 0) Prog->Progress(Done); // Find the proper cache slot @@ -175,6 +178,7 @@ bool pkgDepCache::readStateFile(OpProgress *Prog) /*{{{*/ pkgTagFile tagfile(&state_file); pkgTagSection section; int amt=0; + bool debug_autoremove=_config->FindB("Debug::pkgAutoRemove",false); while(tagfile.Step(section)) { string pkgname = section.FindS("Package"); pkgCache::PkgIterator pkg=Cache->FindPkg(pkgname); @@ -184,7 +188,7 @@ bool pkgDepCache::readStateFile(OpProgress *Prog) /*{{{*/ short reason = section.FindI("Auto-Installed", 0); if(reason > 0) PkgState[pkg->ID].Flags |= Flag::Auto; - if(_config->FindB("Debug::pkgAutoRemove",false)) + if(debug_autoremove) std::cout << "Auto-Installed : " << pkgname << std::endl; amt+=section.size(); if(Prog != NULL) @@ -202,7 +206,9 @@ bool pkgDepCache::readStateFile(OpProgress *Prog) /*{{{*/ /*}}}*/ bool pkgDepCache::writeStateFile(OpProgress *prog, bool InstalledOnly) /*{{{*/ { - if(_config->FindB("Debug::pkgAutoRemove",false)) + bool debug_autoremove = _config->FindB("Debug::pkgAutoRemove",false); + + if(debug_autoremove) std::clog << "pkgDepCache::writeStateFile()" << std::endl; FileFd StateFile; @@ -257,14 +263,14 @@ bool pkgDepCache::writeStateFile(OpProgress *prog, bool InstalledOnly) /*{{{*/ for(pkgCache::PkgIterator pkg=Cache->PkgBegin(); !pkg.end(); pkg++) { if(PkgState[pkg->ID].Flags & Flag::Auto) { if (pkgs_seen.find(pkg.Name()) != pkgs_seen.end()) { - if(_config->FindB("Debug::pkgAutoRemove",false)) + if(debug_autoremove) std::clog << "Skipping already written " << pkg.Name() << std::endl; continue; } // skip not installed ones if requested if(InstalledOnly && pkg->CurrentVer == 0) continue; - if(_config->FindB("Debug::pkgAutoRemove",false)) + if(debug_autoremove) std::clog << "Writing new AutoInstall: " << pkg.Name() << std::endl; ostr.str(string("")); @@ -609,9 +615,12 @@ void pkgDepCache::Update(OpProgress *Prog) // Perform the depends pass int Done = 0; + int Update_interval = Head().PackageCount; + if (Update_interval == 0) + Update_interval = 1; for (PkgIterator I = PkgBegin(); I.end() != true; I++,Done++) { - if (Prog != 0 && Done%20 == 0) + if (Prog != 0 && Done%Update_interval == 0) Prog->Progress(Done); for (VerIterator V = I.VersionList(); V.end() != true; V++) { @@ -1326,6 +1335,7 @@ bool pkgDepCache::MarkRequired(InRootSetFunc &userFunc) { bool follow_recommends; bool follow_suggests; + bool debug_autoremove = _config->FindB("Debug::pkgAutoRemove",false); // init the states for(PkgIterator p = PkgBegin(); !p.end(); ++p) @@ -1334,8 +1344,7 @@ bool pkgDepCache::MarkRequired(InRootSetFunc &userFunc) PkgState[p->ID].Garbage = false; // debug output - if(_config->FindB("Debug::pkgAutoRemove",false) - && PkgState[p->ID].Flags & Flag::Auto) + if(debug_autoremove && PkgState[p->ID].Flags & Flag::Auto) std::clog << "AutoDep: " << p.Name() << std::endl; } @@ -1406,7 +1415,9 @@ void pkgDepCache::MarkPackage(const pkgCache::PkgIterator &pkg, if(state.Marked) return; - if(_config->FindB("Debug::pkgAutoRemove",false)) + bool debug_autoremove = _config->FindB("Debug::pkgAutoRemove", false); + + if(debug_autoremove) { std::clog << "Marking: " << pkg.Name(); if(!ver.end()) @@ -1437,7 +1448,7 @@ void pkgDepCache::MarkPackage(const pkgCache::PkgIterator &pkg, { if(_system->VS->CheckDep(V.VerStr(), d->CompareOp, d.TargetVer())) { - if(_config->FindB("Debug::pkgAutoRemove",false)) + if(debug_autoremove) { std::clog << "Following dep: " << d.ParentPkg().Name() << " " << d.ParentVer().VerStr() << " " @@ -1461,7 +1472,7 @@ void pkgDepCache::MarkPackage(const pkgCache::PkgIterator &pkg, if(_system->VS->CheckDep(prv.ProvideVersion(), d->CompareOp, d.TargetVer())) { - if(_config->FindB("Debug::pkgAutoRemove",false)) + if(debug_autoremove) { std::clog << "Following dep: " << d.ParentPkg().Name() << " " << d.ParentVer().VerStr() << " " @@ -1489,9 +1500,11 @@ void pkgDepCache::MarkPackage(const pkgCache::PkgIterator &pkg, /*}}}*/ bool pkgDepCache::Sweep() /*{{{*/ { + bool debug_autoremove = _config->FindB("Debug::pkgAutoRemove",false); + // do the sweep for(PkgIterator p=PkgBegin(); !p.end(); ++p) - { + { StateCache &state=PkgState[p->ID]; // skip required packages @@ -1503,7 +1516,7 @@ bool pkgDepCache::Sweep() /*{{{*/ if(!state.Marked && (!p.CurrentVer().end() || state.Install())) { state.Garbage=true; - if(_config->FindB("Debug::pkgAutoRemove",false)) + if(debug_autoremove) std::cout << "Garbage: " << p.Name() << std::endl; } } diff --git a/debian/changelog b/debian/changelog index 30edf0757..64271088f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -123,6 +123,11 @@ apt (0.7.22) UNRELEASED; urgency=low * apt-ftparchive might write corrupt Release files (LP: #46439) * Apply --important option to apt-cache depends (LP: #16947) + [ Otavio Salvador ] + * Apply patch from Sami Liedes to reduce the + number of times we call progress bar updating and debugging + configuration settings. + -- Julian Andres Klode Fri, 03 Jul 2009 08:27:35 +0200 apt (0.7.21) unstable; urgency=low -- cgit v1.2.3-70-g09d2 From 2edcefd596307b2a5fecbfb43bf0f43bc35b269f Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 28 Jul 2009 13:27:03 +0200 Subject: apt-pkg/depcache.cc: - Call opProgress->Update() less often too avoid spending too much time in it (it shows up relatively high in the callgrind logs). But do call it more often than just for each percent so that the UI frontends can use the OpProgress::Update() calling to do e.g. UI updates --- apt-pkg/depcache.cc | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'apt-pkg/depcache.cc') diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index 5c011d743..13abbe5ed 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -127,12 +127,9 @@ bool pkgDepCache::Init(OpProgress *Prog) /* Set the current state of everything. In this state all of the packages are kept exactly as is. See AllUpgrade */ int Done = 0; - int Update_interval = Head().PackageCount/100; - if (Update_interval == 0) - Update_interval = 1; for (PkgIterator I = PkgBegin(); I.end() != true; I++,Done++) { - if (Prog != 0 && Done%Update_interval == 0) + if (Prog != 0 && Done%20 == 0) Prog->Progress(Done); // Find the proper cache slot @@ -615,12 +612,9 @@ void pkgDepCache::Update(OpProgress *Prog) // Perform the depends pass int Done = 0; - int Update_interval = Head().PackageCount; - if (Update_interval == 0) - Update_interval = 1; for (PkgIterator I = PkgBegin(); I.end() != true; I++,Done++) { - if (Prog != 0 && Done%Update_interval == 0) + if (Prog != 0 && Done%20 == 0) Prog->Progress(Done); for (VerIterator V = I.VersionList(); V.end() != true; V++) { -- cgit v1.2.3-70-g09d2