From 7948d3b25d8190c6d2529efa5983199bd22b6440 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 12 Sep 2008 11:42:34 +0200 Subject: * doc/makefile: - add examples/apt-https-method-example.conf --- debian/changelog | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 1e23129b4..cc3dc794d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -38,12 +38,14 @@ apt (0.7.15) UNRELEASED; urgency=low * cmdline/apt-cache.cc: - remove the gettext from a string that consists entirely of variables (LP: #56792) + * doc/makefile: + - add examples/apt-https-method-example.conf [ Dereck Wonnacott ] * apt-ftparchive might write corrupt Release files (LP: #46439) * Apply --important option to apt-cache depends (LP: #16947) - -- + -- Michael Vogt Fri, 12 Sep 2008 11:34:24 +0200 apt (0.7.14) unstable; urgency=low -- cgit v1.2.3-70-g09d2 From c37f3bb687fdd76e173d4e770ec2ef49e93ef852 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 22 Sep 2008 14:56:35 +0200 Subject: * apt-pkg/cacheiterators.h: - add missing checks for Owner == 0 in end() --- apt-pkg/cacheiterators.h | 10 +++++----- debian/changelog | 2 ++ 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'debian') diff --git a/apt-pkg/cacheiterators.h b/apt-pkg/cacheiterators.h index 08eafca0f..bbbcb7753 100644 --- a/apt-pkg/cacheiterators.h +++ b/apt-pkg/cacheiterators.h @@ -104,7 +104,7 @@ class pkgCache::VerIterator // Iteration void operator ++(int) {if (Ver != Owner->VerP) Ver = Owner->VerP + Ver->NextVer;}; inline void operator ++() {operator ++(0);}; - inline bool end() const {return Owner == NULL || (Ver == Owner->VerP?true:false);}; + inline bool end() const {return Owner == 0 || (Ver == Owner->VerP?true:false);}; inline void operator =(const VerIterator &B) {Ver = B.Ver; Owner = B.Owner;}; // Comparison @@ -160,7 +160,7 @@ class pkgCache::DescIterator // Iteration void operator ++(int) {if (Desc != Owner->DescP) Desc = Owner->DescP + Desc->NextDesc;}; inline void operator ++() {operator ++(0);}; - inline bool end() const {return Desc == Owner->DescP?true:false;}; + inline bool end() const {return Owner == 0 || Desc == Owner->DescP?true:false;}; inline void operator =(const DescIterator &B) {Desc = B.Desc; Owner = B.Owner;}; // Comparison @@ -314,7 +314,7 @@ class pkgCache::PkgFileIterator // Iteration void operator ++(int) {if (File!= Owner->PkgFileP) File = Owner->PkgFileP + File->NextFile;}; inline void operator ++() {operator ++(0);}; - inline bool end() const {return File == Owner->PkgFileP?true:false;}; + inline bool end() const {return Owner == 0 || File == Owner->PkgFileP?true:false;}; // Comparison inline bool operator ==(const PkgFileIterator &B) const {return File == B.File;}; @@ -360,7 +360,7 @@ class pkgCache::VerFileIterator // Iteration void operator ++(int) {if (FileP != Owner->VerFileP) FileP = Owner->VerFileP + FileP->NextFile;}; inline void operator ++() {operator ++(0);}; - inline bool end() const {return FileP == Owner->VerFileP?true:false;}; + inline bool end() const {return Owner == 0 || FileP == Owner->VerFileP?true:false;}; // Comparison inline bool operator ==(const VerFileIterator &B) const {return FileP == B.FileP;}; @@ -392,7 +392,7 @@ class pkgCache::DescFileIterator // Iteration void operator ++(int) {if (FileP != Owner->DescFileP) FileP = Owner->DescFileP + FileP->NextFile;}; inline void operator ++() {operator ++(0);}; - inline bool end() const {return FileP == Owner->DescFileP?true:false;}; + inline bool end() const {return Owner == 0 || FileP == Owner->DescFileP?true:false;}; // Comparison inline bool operator ==(const DescFileIterator &B) const {return FileP == B.FileP;}; diff --git a/debian/changelog b/debian/changelog index cc3dc794d..d38b04da2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -40,6 +40,8 @@ apt (0.7.15) UNRELEASED; urgency=low of variables (LP: #56792) * doc/makefile: - add examples/apt-https-method-example.conf + * apt-pkg/cacheiterators.h: + - add missing checks for Owner == 0 in end() [ Dereck Wonnacott ] * apt-ftparchive might write corrupt Release files (LP: #46439) -- cgit v1.2.3-70-g09d2 From d3eeb2324df154dc2104bbbb98c36d97db69617e Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 23 Sep 2008 16:45:34 +0200 Subject: * apt-pkg/pkgcachegen.cc: - do not add multiple identical descriptions for the same language (closes: #400768) --- apt-pkg/pkgcache.cc | 3 ++- apt-pkg/pkgcachegen.cc | 20 ++++++++++++++++---- debian/changelog | 3 +++ 3 files changed, 21 insertions(+), 5 deletions(-) (limited to 'debian') diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc index 133899a27..8eb62089a 100644 --- a/apt-pkg/pkgcache.cc +++ b/apt-pkg/pkgcache.cc @@ -622,7 +622,8 @@ pkgCache::DescIterator pkgCache::VerIterator::TranslatedDescription() const for (; Desc.end() == false; Desc++) if (pkgIndexFile::LanguageCode() == Desc.LanguageCode()) break; - if (Desc.end() == true) Desc = DescDefault; + if (Desc.end() == true) + Desc = DescDefault; return Desc; }; diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc index d00cd4e64..f71547f39 100644 --- a/apt-pkg/pkgcachegen.cc +++ b/apt-pkg/pkgcachegen.cc @@ -139,10 +139,21 @@ bool pkgCacheGenerator::MergeList(ListParser &List, { pkgCache::DescIterator Desc = Ver.DescriptionList(); map_ptrloc *LastDesc = &Ver->DescriptionList; - - for (; Desc.end() == false; LastDesc = &Desc->NextDesc, Desc++) + bool duplicate=false; + + // don't add a new description if we have one for the given + // md5 && language + for ( ; Desc.end() == false; LastDesc = &Desc->NextDesc, Desc++) + if (MD5SumValue(Desc.md5()) == CurMd5 && + Desc.LanguageCode() == List.DescriptionLanguage()) + duplicate=true; + if(duplicate) + continue; + + for (Desc = Ver.DescriptionList(); + Desc.end() == false; + LastDesc = &Desc->NextDesc, Desc++) { - if (MD5SumValue(Desc.md5()) == CurMd5) { // Add new description @@ -434,7 +445,8 @@ bool pkgCacheGenerator::NewFileDesc(pkgCache::DescIterator &Desc, // --------------------------------------------------------------------- /* This puts a description structure in the linked list */ map_ptrloc pkgCacheGenerator::NewDescription(pkgCache::DescIterator &Desc, - const string &Lang, const MD5SumValue &md5sum, + const string &Lang, + const MD5SumValue &md5sum, map_ptrloc Next) { // Get a structure diff --git a/debian/changelog b/debian/changelog index d38b04da2..9ccb807c3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -42,6 +42,9 @@ apt (0.7.15) UNRELEASED; urgency=low - add examples/apt-https-method-example.conf * apt-pkg/cacheiterators.h: - add missing checks for Owner == 0 in end() + * apt-pkg/pkgcachegen.cc: + - do not add multiple identical descriptions for the same + language (closes: #400768) [ Dereck Wonnacott ] * apt-ftparchive might write corrupt Release files (LP: #46439) -- cgit v1.2.3-70-g09d2 From b462d75aab39f85d4ce9bd03c4dfda54f77b566f Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 1 Oct 2008 17:55:05 +0200 Subject: * apt-pkg/packagemanager.cc, apt-pkg/deb/dpkgpm.cc: - move the state file writting into the Go() implementation of dpkgpm (closes: #498799) --- apt-pkg/deb/dpkgpm.cc | 2 ++ apt-pkg/packagemanager.cc | 4 ---- debian/changelog | 3 +++ 3 files changed, 5 insertions(+), 4 deletions(-) (limited to 'debian') diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index 2abb3a0ef..c9af2f401 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -927,6 +927,8 @@ bool pkgDPkgPM::Go(int OutStatusFd) if (RunScripts("DPkg::Post-Invoke") == false) return false; + + Cache.writeStateFile(NULL); return true; } /*}}}*/ diff --git a/apt-pkg/packagemanager.cc b/apt-pkg/packagemanager.cc index c391a6036..304d1c653 100644 --- a/apt-pkg/packagemanager.cc +++ b/apt-pkg/packagemanager.cc @@ -666,10 +666,6 @@ pkgPackageManager::DoInstallPostFork(int statusFd) if(goResult == false) return Failed; - // if all was fine update the state file - if(Res == Completed) { - Cache.writeStateFile(NULL); - } return Res; }; diff --git a/debian/changelog b/debian/changelog index 9ccb807c3..46d01bdf3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -45,6 +45,9 @@ apt (0.7.15) UNRELEASED; urgency=low * apt-pkg/pkgcachegen.cc: - do not add multiple identical descriptions for the same language (closes: #400768) + * apt-pkg/packagemanager.cc, apt-pkg/deb/dpkgpm.cc: + - move the state file writting into the Go() implementation + of dpkgpm (closes: #498799) [ Dereck Wonnacott ] * apt-ftparchive might write corrupt Release files (LP: #46439) -- cgit v1.2.3-70-g09d2 From cfb776e816dc21c27f422216a9aff8700b28f30b Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 1 Oct 2008 18:06:40 +0200 Subject: * apt-pkg/algorithms.cc: - fix simulation performance drop (thanks to Ferenc Wagner for reporting the issue) --- apt-pkg/algorithms.cc | 3 ++- apt-pkg/algorithms.h | 1 + debian/changelog | 3 +++ 3 files changed, 6 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc index eaab4c0ea..59f994cd7 100644 --- a/apt-pkg/algorithms.cc +++ b/apt-pkg/algorithms.cc @@ -37,7 +37,8 @@ pkgProblemResolver *pkgProblemResolver::This = 0; this is not necessary since the pkgCaches are fully shared now. */ pkgSimulate::pkgSimulate(pkgDepCache *Cache) : pkgPackageManager(Cache), iPolicy(Cache), - Sim(&Cache->GetCache(),&iPolicy) + Sim(&Cache->GetCache(),&iPolicy), + group(Sim) { Sim.Init(0); Flags = new unsigned char[Cache->Head().PackageCount]; diff --git a/apt-pkg/algorithms.h b/apt-pkg/algorithms.h index defaed57d..d183cd213 100644 --- a/apt-pkg/algorithms.h +++ b/apt-pkg/algorithms.h @@ -60,6 +60,7 @@ class pkgSimulate : public pkgPackageManager Policy iPolicy; pkgDepCache Sim; + pkgDepCache::ActionGroup group; // The Actuall installation implementation virtual bool Install(PkgIterator Pkg,string File); diff --git a/debian/changelog b/debian/changelog index 46d01bdf3..bef67eb6f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -48,6 +48,9 @@ apt (0.7.15) UNRELEASED; urgency=low * apt-pkg/packagemanager.cc, apt-pkg/deb/dpkgpm.cc: - move the state file writting into the Go() implementation of dpkgpm (closes: #498799) + * apt-pkg/algorithms.cc: + - fix simulation performance drop (thanks to Ferenc Wagner + for reporting the issue) [ Dereck Wonnacott ] * apt-ftparchive might write corrupt Release files (LP: #46439) -- cgit v1.2.3-70-g09d2 From 17745b02462bfbc0f1e8e5b2a062d887280345ea Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 28 Oct 2008 20:57:31 +0100 Subject: * apt-pkg/deb/dpkgpm.cc: - fix potential hang when in a backgroud process group --- apt-pkg/deb/dpkgpm.cc | 16 ++++++++++++---- debian/changelog | 2 ++ 2 files changed, 14 insertions(+), 4 deletions(-) (limited to 'debian') diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index 85cf4e119..36c20ad85 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -587,6 +587,11 @@ static int racy_pselect(int nfds, fd_set *readfds, fd_set *writefds, */ bool pkgDPkgPM::Go(int OutStatusFd) { + fd_set rfds; + struct timespec tv; + sigset_t sigmask; + sigset_t original_sigmask; + unsigned int MaxArgs = _config->FindI("Dpkg::MaxArgs",8*1024); unsigned int MaxArgBytes = _config->FindI("Dpkg::MaxArgBytes",32*1024); bool NoTriggers = _config->FindB("DPkg::NoTriggers",false); @@ -795,7 +800,14 @@ bool pkgDPkgPM::Go(int OutStatusFd) rtt = tt; cfmakeraw(&rtt); rtt.c_lflag &= ~ECHO; + // block SIGTTOU during tcsetattr to prevent a hang if + // the process is a member of the background process group + // http://www.opengroup.org/onlinepubs/000095399/functions/tcsetattr.html + sigemptyset(&sigmask); + sigaddset(&sigmask, SIGTTOU); + sigprocmask(SIG_BLOCK,&sigmask, &original_sigmask); tcsetattr(0, TCSAFLUSH, &rtt); + sigprocmask(SIG_SETMASK, &original_sigmask, 0); } // Fork dpkg @@ -862,10 +874,6 @@ bool pkgDPkgPM::Go(int OutStatusFd) close(slave); // setups fds - fd_set rfds; - struct timespec tv; - sigset_t sigmask; - sigset_t original_sigmask; sigemptyset(&sigmask); sigprocmask(SIG_BLOCK,&sigmask,&original_sigmask); diff --git a/debian/changelog b/debian/changelog index 283c49fd5..fdf2db409 100644 --- a/debian/changelog +++ b/debian/changelog @@ -28,6 +28,8 @@ apt (0.7.17) UNRELEASED; urgency=low of variables (LP: #56792) * apt-pkg/cacheiterators.h: - add missing checks for Owner == 0 in end() + * apt-pkg/deb/dpkgpm.cc: + - fix potential hang when in a backgroud process group [ Dereck Wonnacott ] * apt-ftparchive might write corrupt Release files (LP: #46439) -- cgit v1.2.3-70-g09d2 From 73e598c3acc354b963d2ec93b77006841175df5d Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 12 Nov 2008 16:23:19 +0100 Subject: fix SIGHUP handling (closes: #463030) --- apt-pkg/deb/dpkgpm.cc | 5 +++++ debian/changelog | 1 + 2 files changed, 6 insertions(+) (limited to 'debian') diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index 36c20ad85..dde1c6d63 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -778,6 +778,9 @@ bool pkgDPkgPM::Go(int OutStatusFd) sighandler_t old_SIGQUIT = signal(SIGQUIT,SIG_IGN); sighandler_t old_SIGINT = signal(SIGINT,SIG_IGN); + // ignore SIGHUP as well (debian #463030) + sighandler_t old_SIGHUP = signal(SIGHUP,SIG_IGN); + struct termios tt; struct termios tt_out; struct winsize win; @@ -889,6 +892,7 @@ bool pkgDPkgPM::Go(int OutStatusFd) // Restore sig int/quit signal(SIGQUIT,old_SIGQUIT); signal(SIGINT,old_SIGINT); + signal(SIGINT,old_SIGHUP); return _error->Errno("waitpid","Couldn't wait for subprocess"); } @@ -928,6 +932,7 @@ bool pkgDPkgPM::Go(int OutStatusFd) // Restore sig int/quit signal(SIGQUIT,old_SIGQUIT); signal(SIGINT,old_SIGINT); + signal(SIGINT,old_SIGHUP); if(master >= 0) { diff --git a/debian/changelog b/debian/changelog index fdf2db409..0f20db8a3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -30,6 +30,7 @@ apt (0.7.17) UNRELEASED; urgency=low - add missing checks for Owner == 0 in end() * apt-pkg/deb/dpkgpm.cc: - fix potential hang when in a backgroud process group + - fix SIGHUP handling (closes: #463030) [ Dereck Wonnacott ] * apt-ftparchive might write corrupt Release files (LP: #46439) -- cgit v1.2.3-70-g09d2 From 99921bf936f050c77f424f85a658fcdbef98326e Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 8 Dec 2008 09:33:43 -0800 Subject: - fix "apt-get source pkg=ver" if binary name != source name (LP: #202219) * doc/makefile: - add examples/apt-https-method-example.conf --- cmdline/apt-get.cc | 6 +++--- debian/changelog | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'debian') diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index eda37a31e..40ae02400 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1295,9 +1295,9 @@ pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs, { string Ver = Parse->Version(); - // Skip name mismatches - if (IsMatch == true && Parse->Package() != Src) - continue; + // show name mismatches + if (IsMatch == true && Parse->Package() != Src) + ioprintf(c1out, _("No source package '%s' picking '%s' instead"), Parse->Package(), Src); if (VerTag.empty() == false) { diff --git a/debian/changelog b/debian/changelog index 0f20db8a3..1ab8e0968 100644 --- a/debian/changelog +++ b/debian/changelog @@ -26,6 +26,10 @@ apt (0.7.17) UNRELEASED; urgency=low * cmdline/apt-cache.cc: - remove the gettext from a string that consists entirely of variables (LP: #56792) + - fix "apt-get source pkg=ver" if binary name != source name + (LP: #202219) + * doc/makefile: + - add examples/apt-https-method-example.conf * apt-pkg/cacheiterators.h: - add missing checks for Owner == 0 in end() * apt-pkg/deb/dpkgpm.cc: -- cgit v1.2.3-70-g09d2 From d4cd303eae3d686b62b55e8a8202a3430b16f038 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 8 Dec 2008 09:58:04 -0800 Subject: * apt-pkg/indexrecords.cc: - fix some i18n issues * apt-pkg/contrib/strutl.h: - add new strprintf() function to make i18n strings easier --- apt-pkg/contrib/strutl.cc | 15 +++++++++++++++ apt-pkg/contrib/strutl.h | 1 + apt-pkg/indexrecords.cc | 6 +++--- debian/changelog | 4 ++++ 4 files changed, 23 insertions(+), 3 deletions(-) (limited to 'debian') diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc index bd374fd1e..cdd88827b 100644 --- a/apt-pkg/contrib/strutl.cc +++ b/apt-pkg/contrib/strutl.cc @@ -1032,6 +1032,21 @@ void ioprintf(ostream &out,const char *format,...) out << S; } /*}}}*/ +// strprintf - C format string outputter to C++ strings /*{{{*/ +// --------------------------------------------------------------------- +/* This is used to make the internationalization strings easier to translate + and to allow reordering of parameters */ +void strprintf(string &out,const char *format,...) +{ + va_list args; + va_start(args,format); + + // sprintf the description + char S[1024]; + vsnprintf(S,sizeof(S),format,args); + out = string(S); +} + /*}}}*/ // safe_snprintf - Safer snprintf /*{{{*/ // --------------------------------------------------------------------- /* This is a snprintf that will never (ever) go past 'End' and returns a diff --git a/apt-pkg/contrib/strutl.h b/apt-pkg/contrib/strutl.h index 53146ced7..d9972abf4 100644 --- a/apt-pkg/contrib/strutl.h +++ b/apt-pkg/contrib/strutl.h @@ -59,6 +59,7 @@ bool Hex2Num(const string &Str,unsigned char *Num,unsigned int Length); bool TokSplitString(char Tok,char *Input,char **List, unsigned long ListMax); void ioprintf(ostream &out,const char *format,...) APT_FORMAT2; +void strprintf(string &out,const char *format,...) APT_FORMAT2; char *safe_snprintf(char *Buffer,char *End,const char *Format,...) APT_FORMAT3; bool CheckDomainList(const string &Host, const string &List); diff --git a/apt-pkg/indexrecords.cc b/apt-pkg/indexrecords.cc index 502f454a8..ab208e246 100644 --- a/apt-pkg/indexrecords.cc +++ b/apt-pkg/indexrecords.cc @@ -37,14 +37,14 @@ bool indexRecords::Load(const string Filename) pkgTagFile TagFile(&Fd, Fd.Size() + 256); // XXX if (_error->PendingError() == true) { - ErrorText = _(("Unable to parse Release file " + Filename).c_str()); + strprintf(ErrorText, _("Unable to parse Release file %s"),Filename.c_str()); return false; } pkgTagSection Section; if (TagFile.Step(Section) == false) { - ErrorText = _(("No sections in Release file " + Filename).c_str()); + strprintf(ErrorText, _("No sections in Release file %s"), Filename.c_str()); return false; } @@ -78,7 +78,7 @@ bool indexRecords::Load(const string Filename) if(HashString::SupportedHashes()[i] == NULL) { - ErrorText = _(("No Hash entry in Release file " + Filename).c_str()); + strprintf(ErrorText, _("No Hash entry in Release file %s"), Filename.c_str()); return false; } diff --git a/debian/changelog b/debian/changelog index 1ab8e0968..77a5bac1f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -35,6 +35,10 @@ apt (0.7.17) UNRELEASED; urgency=low * apt-pkg/deb/dpkgpm.cc: - fix potential hang when in a backgroud process group - fix SIGHUP handling (closes: #463030) + * apt-pkg/indexrecords.cc: + - fix some i18n issues + * apt-pkg/contrib/strutl.h: + - add new strprintf() function to make i18n strings easier [ Dereck Wonnacott ] * apt-ftparchive might write corrupt Release files (LP: #46439) -- cgit v1.2.3-70-g09d2 From f23153d046f014f96d442fca5b9ef6ede7fcf546 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 9 Dec 2008 14:38:10 -0800 Subject: * methods/gpgv.cc: - fix compiler warning * cmdline/apt-get.cc: - fix "apt-get source pkg=ver" if binary name != source name and show a message (LP: #202219) * apt-pkg/deb/debsystem.cc: - make strings i18n able --- apt-pkg/deb/debsystem.cc | 15 ++++++++------- cmdline/apt-get.cc | 2 +- debian/changelog | 11 ++++++++--- methods/gpgv.cc | 2 +- 4 files changed, 18 insertions(+), 12 deletions(-) (limited to 'debian') diff --git a/apt-pkg/deb/debsystem.cc b/apt-pkg/deb/debsystem.cc index 11a84f1c6..b882367b8 100644 --- a/apt-pkg/deb/debsystem.cc +++ b/apt-pkg/deb/debsystem.cc @@ -17,7 +17,8 @@ #include #include #include - +#include + #include #include #include @@ -66,11 +67,11 @@ bool debSystem::Lock() if (LockFD == -1) { if (errno == EACCES || errno == EAGAIN) - return _error->Error("Unable to lock the administration directory (%s), " - "is another process using it?",AdminDir.c_str()); + return _error->Error(_("Unable to lock the administration directory (%s), " + "is another process using it?"),AdminDir.c_str()); else - return _error->Error("Unable to lock the administration directory (%s), " - "are you root?",AdminDir.c_str()); + return _error->Error(_("Unable to lock the administration directory (%s), " + "are you root?"),AdminDir.c_str()); } // See if we need to abort with a dirty journal @@ -78,8 +79,8 @@ bool debSystem::Lock() { close(LockFD); LockFD = -1; - return _error->Error("dpkg was interrupted, you must manually " - "run 'dpkg --configure -a' to correct the problem. "); + return _error->Error(_("dpkg was interrupted, you must manually " + "run 'dpkg --configure -a' to correct the problem. ")); } LockCount++; diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 40ae02400..2ef32a615 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1297,7 +1297,7 @@ pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs, // show name mismatches if (IsMatch == true && Parse->Package() != Src) - ioprintf(c1out, _("No source package '%s' picking '%s' instead"), Parse->Package(), Src); + ioprintf(c1out, _("No source package '%s' picking '%s' instead"), Parse->Package().c_str(), Src.c_str()); if (VerTag.empty() == false) { diff --git a/debian/changelog b/debian/changelog index 77a5bac1f..e2a0365ac 100644 --- a/debian/changelog +++ b/debian/changelog @@ -26,8 +26,6 @@ apt (0.7.17) UNRELEASED; urgency=low * cmdline/apt-cache.cc: - remove the gettext from a string that consists entirely of variables (LP: #56792) - - fix "apt-get source pkg=ver" if binary name != source name - (LP: #202219) * doc/makefile: - add examples/apt-https-method-example.conf * apt-pkg/cacheiterators.h: @@ -39,7 +37,14 @@ apt (0.7.17) UNRELEASED; urgency=low - fix some i18n issues * apt-pkg/contrib/strutl.h: - add new strprintf() function to make i18n strings easier - + * methods/gpgv.cc: + - fix compiler warning + * cmdline/apt-get.cc: + - fix "apt-get source pkg=ver" if binary name != source name + and show a message (LP: #202219) + * apt-pkg/deb/debsystem.cc: + - make strings i18n able + [ Dereck Wonnacott ] * apt-ftparchive might write corrupt Release files (LP: #46439) * Apply --important option to apt-cache depends (LP: #16947) diff --git a/methods/gpgv.cc b/methods/gpgv.cc index 9f4683e6e..f3277b300 100644 --- a/methods/gpgv.cc +++ b/methods/gpgv.cc @@ -264,7 +264,7 @@ bool GPGVMethod::Fetch(FetchItem *Itm) // least one bad signature. good signatures and NoPubKey signatures // happen easily when a file is signed with multiple signatures if(GoodSigners.empty() or !BadSigners.empty()) - return _error->Error(errmsg.c_str()); + return _error->Error("%s", errmsg.c_str()); } // Just pass the raw output up, because passing it as a real data -- cgit v1.2.3-70-g09d2 From 73fc19d055b20178e5efae08013fe24663f6d89c Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 16 Dec 2008 07:37:02 +0100 Subject: Clarify the --help for 'purge' (LP: #243948) --- cmdline/apt-get.cc | 2 +- debian/changelog | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 4dbc4873f..06fa41017 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -2632,7 +2632,7 @@ bool ShowHelp(CommandLine &CmdL) " install - Install new packages (pkg is libc6 not libc6.deb)\n" " remove - Remove packages\n" " autoremove - Remove automatically all unused packages\n" - " purge - Remove and purge packages\n" + " purge - Remove packages and config files\n" " source - Download source archives\n" " build-dep - Configure build-dependencies for source packages\n" " dist-upgrade - Distribution upgrade, see apt-get(8)\n" diff --git a/debian/changelog b/debian/changelog index c113a9597..7600db699 100644 --- a/debian/changelog +++ b/debian/changelog @@ -37,6 +37,7 @@ apt (0.7.21) UNRELEASED; urgency=low [ Dereck Wonnacott ] * apt-ftparchive might write corrupt Release files (LP: #46439) * Apply --important option to apt-cache depends (LP: #16947) + * Clarify the --help for 'purge' (LP: #243948) -- Michael Vogt Fri, 12 Sep 2008 11:34:24 +0200 -- cgit v1.2.3-70-g09d2 From 38e00525e62cb2e995bfe310aabf03762b1fdf7a Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 8 Jan 2009 13:48:06 +0100 Subject: * apt-pkg/contrib/strutl.cc: - fix TimeToStr i18n (LP: #289807) --- apt-pkg/contrib/strutl.cc | 14 +++++++++----- debian/changelog | 2 ++ 2 files changed, 11 insertions(+), 5 deletions(-) (limited to 'debian') diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc index 98d9c41e4..327381d03 100644 --- a/apt-pkg/contrib/strutl.cc +++ b/apt-pkg/contrib/strutl.cc @@ -331,23 +331,27 @@ string TimeToStr(unsigned long Sec) { if (Sec > 60*60*24) { - sprintf(S,"%lid %lih%limin%lis",Sec/60/60/24,(Sec/60/60) % 24,(Sec/60) % 60,Sec % 60); + //d means days, h means hours, min means minutes, s means seconds + sprintf(S,_("%lid %lih %limin %lis"),Sec/60/60/24,(Sec/60/60) % 24,(Sec/60) % 60,Sec % 60); break; } if (Sec > 60*60) { - sprintf(S,"%lih%limin%lis",Sec/60/60,(Sec/60) % 60,Sec % 60); + //h means hours, min means minutes, s means seconds + sprintf(S,_("%lih %limin %lis"),Sec/60/60,(Sec/60) % 60,Sec % 60); break; } if (Sec > 60) { - sprintf(S,"%limin%lis",Sec/60,Sec % 60); + //min means minutes, s means seconds + sprintf(S,_("%limin %lis"),Sec/60,Sec % 60); break; } - - sprintf(S,"%lis",Sec); + + //s means seconds + sprintf(S,_("%lis"),Sec); break; } diff --git a/debian/changelog b/debian/changelog index 7600db699..fea9133ee 100644 --- a/debian/changelog +++ b/debian/changelog @@ -33,6 +33,8 @@ apt (0.7.21) UNRELEASED; urgency=low and show a message (LP: #202219) * apt-pkg/deb/debsystem.cc: - make strings i18n able + * apt-pkg/contrib/strutl.cc: + - fix TimeToStr i18n (LP: #289807) [ Dereck Wonnacott ] * apt-ftparchive might write corrupt Release files (LP: #46439) -- cgit v1.2.3-70-g09d2 From 15d7e51550327bf49b95372f84bd0de4e896e7d7 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 30 Jan 2009 20:55:20 +0100 Subject: [ABI break] merge support for http redirects, thanks to Jeff Licquia and Anthony Towns --- apt-pkg/acquire-method.cc | 32 +++++++++++++++++++ apt-pkg/acquire-method.h | 2 ++ apt-pkg/acquire-worker.cc | 14 +++++++++ apt-pkg/makefile | 2 +- debian/changelog | 2 ++ methods/http.cc | 78 ++++++++++++++++++++++++++++++++++++++++++++++- methods/http.h | 3 ++ methods/makefile | 2 +- 8 files changed, 132 insertions(+), 3 deletions(-) (limited to 'debian') diff --git a/apt-pkg/acquire-method.cc b/apt-pkg/acquire-method.cc index bc29417f7..acf1156dc 100644 --- a/apt-pkg/acquire-method.cc +++ b/apt-pkg/acquire-method.cc @@ -447,6 +447,38 @@ void pkgAcqMethod::Status(const char *Format,...) } /*}}}*/ +// AcqMethod::Redirect - Send a redirect message /*{{{*/ +// --------------------------------------------------------------------- +/* This method sends the redirect message and also manipulates the queue + to keep the pipeline synchronized. */ +void pkgAcqMethod::Redirect(const string &NewURI) +{ + string CurrentURI = ""; + if (Queue != 0) + CurrentURI = Queue->Uri; + + char S[1024]; + snprintf(S, sizeof(S)-50, "103 Redirect\nURI: %s\nNew-URI: %s\n\n", + CurrentURI.c_str(), NewURI.c_str()); + + if (write(STDOUT_FILENO,S,strlen(S)) != (ssize_t)strlen(S)) + exit(100); + + // Change the URI for the request. + Queue->Uri = NewURI; + + /* To keep the pipeline synchronized, move the current request to + the end of the queue, past the end of the current pipeline. */ + FetchItem *I; + for (I = Queue; I->Next != 0; I = I->Next) ; + I->Next = Queue; + Queue = Queue->Next; + I->Next->Next = 0; + if (QueueBack == 0) + QueueBack = I->Next; +} + /*}}}*/ + // AcqMethod::FetchResult::FetchResult - Constructor /*{{{*/ // --------------------------------------------------------------------- /* */ diff --git a/apt-pkg/acquire-method.h b/apt-pkg/acquire-method.h index e02eab018..fab77e664 100644 --- a/apt-pkg/acquire-method.h +++ b/apt-pkg/acquire-method.h @@ -84,6 +84,8 @@ class pkgAcqMethod void Log(const char *Format,...); void Status(const char *Format,...); + void Redirect(const string &NewURI); + int Run(bool Single = false); inline void SetFailExtraMsg(string Msg) {FailExtra = Msg;}; diff --git a/apt-pkg/acquire-worker.cc b/apt-pkg/acquire-worker.cc index 1a754dae9..78c68737c 100644 --- a/apt-pkg/acquire-worker.cc +++ b/apt-pkg/acquire-worker.cc @@ -220,6 +220,20 @@ bool pkgAcquire::Worker::RunMessages() Status = LookupTag(Message,"Message"); break; + // 103 Redirect + case 103: + { + if (Itm == 0) + { + _error->Error("Method gave invalid 103 Redirect message"); + break; + } + + string NewURI = LookupTag(Message,"New-URI",URI.c_str()); + Itm->URI = NewURI; + break; + } + // 200 URI Start case 200: { diff --git a/apt-pkg/makefile b/apt-pkg/makefile index 1b78c94f6..087f17740 100644 --- a/apt-pkg/makefile +++ b/apt-pkg/makefile @@ -13,7 +13,7 @@ include ../buildlib/defaults.mak # methods/makefile - FIXME LIBRARY=apt-pkg LIBEXT=$(GLIBC_VER)$(LIBSTDCPP_VER) -MAJOR=4.6 +MAJOR=4.7 MINOR=0 SLIBS=$(PTHREADLIB) $(INTLLIBS) -lutil APT_DOMAIN:=libapt-pkg$(MAJOR) diff --git a/debian/changelog b/debian/changelog index fea9133ee..caef53baf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -35,6 +35,8 @@ apt (0.7.21) UNRELEASED; urgency=low - make strings i18n able * apt-pkg/contrib/strutl.cc: - fix TimeToStr i18n (LP: #289807) + * [ABI break] merge support for http redirects, thanks to + Jeff Licquia and Anthony Towns [ Dereck Wonnacott ] * apt-ftparchive might write corrupt Release files (LP: #46439) diff --git a/methods/http.cc b/methods/http.cc index b3c791fa0..1bf798da4 100644 --- a/methods/http.cc +++ b/methods/http.cc @@ -39,6 +39,7 @@ #include #include #include +#include #include // Internet stuff @@ -57,6 +58,7 @@ int HttpMethod::FailFd = -1; time_t HttpMethod::FailTime = 0; unsigned long PipelineDepth = 10; unsigned long TimeOut = 120; +bool AllowRedirect = false; bool Debug = false; URI Proxy; @@ -628,6 +630,12 @@ bool ServerState::HeaderLine(string Line) return true; } + if (stringcasecmp(Tag,"Location:") == 0) + { + Location = Val; + return true; + } + return true; } /*}}}*/ @@ -900,7 +908,9 @@ bool HttpMethod::ServerDie(ServerState *Srv) 1 - IMS hit 3 - Unrecoverable error 4 - Error with error content page - 5 - Unrecoverable non-server error (close the connection) */ + 5 - Unrecoverable non-server error (close the connection) + 6 - Try again with a new or changed URI + */ int HttpMethod::DealWithHeaders(FetchResult &Res,ServerState *Srv) { // Not Modified @@ -912,6 +922,27 @@ int HttpMethod::DealWithHeaders(FetchResult &Res,ServerState *Srv) return 1; } + /* Redirect + * + * Note that it is only OK for us to treat all redirection the same + * because we *always* use GET, not other HTTP methods. There are + * three redirection codes for which it is not appropriate that we + * redirect. Pass on those codes so the error handling kicks in. + */ + if (AllowRedirect + && (Srv->Result > 300 && Srv->Result < 400) + && (Srv->Result != 300 // Multiple Choices + && Srv->Result != 304 // Not Modified + && Srv->Result != 306)) // (Not part of HTTP/1.1, reserved) + { + if (!Srv->Location.empty()) + { + NextURI = Srv->Location; + return 6; + } + /* else pass through for error message */ + } + /* We have a reply we dont handle. This should indicate a perm server failure */ if (Srv->Result < 200 || Srv->Result >= 300) @@ -1026,6 +1057,7 @@ bool HttpMethod::Configuration(string Message) if (pkgAcqMethod::Configuration(Message) == false) return false; + AllowRedirect = _config->FindB("Acquire::http::AllowRedirect",true); TimeOut = _config->FindI("Acquire::http::Timeout",TimeOut); PipelineDepth = _config->FindI("Acquire::http::Pipeline-Depth", PipelineDepth); @@ -1039,6 +1071,10 @@ bool HttpMethod::Configuration(string Message) /* */ int HttpMethod::Loop() { + typedef vector StringVector; + typedef vector::iterator StringVectorIterator; + map Redirected; + signal(SIGTERM,SigTerm); signal(SIGINT,SigTerm); @@ -1225,6 +1261,46 @@ int HttpMethod::Loop() break; } + // Try again with a new URL + case 6: + { + // Clear rest of response if there is content + if (Server->HaveContent) + { + File = new FileFd("/dev/null",FileFd::WriteExists); + Server->RunData(); + delete File; + File = 0; + } + + /* Detect redirect loops. No more redirects are allowed + after the same URI is seen twice in a queue item. */ + StringVector &R = Redirected[Queue->DestFile]; + bool StopRedirects = false; + if (R.size() == 0) + R.push_back(Queue->Uri); + else if (R[0] == "STOP" || R.size() > 10) + StopRedirects = true; + else + { + for (StringVectorIterator I = R.begin(); I != R.end(); I++) + if (Queue->Uri == *I) + { + R[0] = "STOP"; + break; + } + + R.push_back(Queue->Uri); + } + + if (StopRedirects == false) + Redirect(NextURI); + else + Fail(); + + break; + } + default: Fail(_("Internal error")); break; diff --git a/methods/http.h b/methods/http.h index 6753a9901..13f02ec77 100644 --- a/methods/http.h +++ b/methods/http.h @@ -99,6 +99,7 @@ struct ServerState enum {Chunked,Stream,Closes} Encoding; enum {Header, Data} State; bool Persistent; + string Location; // This is a Persistent attribute of the server itself. bool Pipeline; @@ -143,6 +144,8 @@ class HttpMethod : public pkgAcqMethod static time_t FailTime; static void SigTerm(int); + string NextURI; + public: friend class ServerState; diff --git a/methods/makefile b/methods/makefile index d9481dbcc..78bdbc96f 100644 --- a/methods/makefile +++ b/methods/makefile @@ -7,7 +7,7 @@ include ../buildlib/defaults.mak BIN := $(BIN)/methods # FIXME.. -LIB_APT_PKG_MAJOR = 4.6 +LIB_APT_PKG_MAJOR = 4.7 APT_DOMAIN := libapt-pkg$(LIB_APT_PKG_MAJOR) # The file method -- cgit v1.2.3-70-g09d2 From 38e12b5374c1beeca1f70a031fdfccf38a283b49 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 30 Jan 2009 21:12:15 +0100 Subject: [ABI break] use int for the package IDs (thanks to Steve Cotton) --- apt-pkg/pkgcache.h | 8 ++++---- debian/changelog | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'debian') diff --git a/apt-pkg/pkgcache.h b/apt-pkg/pkgcache.h index 59d5003bb..759e9a225 100644 --- a/apt-pkg/pkgcache.h +++ b/apt-pkg/pkgcache.h @@ -214,7 +214,7 @@ struct pkgCache::Package unsigned char InstState; // Flags unsigned char CurrentState; // State - unsigned short ID; + unsigned int ID; unsigned long Flags; }; @@ -235,7 +235,7 @@ struct pkgCache::PackageFile // Linked list map_ptrloc NextFile; // PackageFile - unsigned short ID; + unsigned int ID; time_t mtime; // Modification time for the file }; @@ -272,7 +272,7 @@ struct pkgCache::Version map_ptrloc Size; // These are the .deb size map_ptrloc InstalledSize; unsigned short Hash; - unsigned short ID; + unsigned int ID; unsigned char Priority; }; @@ -289,7 +289,7 @@ struct pkgCache::Description map_ptrloc NextDesc; // Description map_ptrloc ParentPkg; // Package - unsigned short ID; + unsigned int ID; }; struct pkgCache::Dependency diff --git a/debian/changelog b/debian/changelog index caef53baf..f778fbe1d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -37,6 +37,7 @@ apt (0.7.21) UNRELEASED; urgency=low - fix TimeToStr i18n (LP: #289807) * [ABI break] merge support for http redirects, thanks to Jeff Licquia and Anthony Towns + * [ABI break] use int for the package IDs (thanks to Steve Cotton) [ Dereck Wonnacott ] * apt-ftparchive might write corrupt Release files (LP: #46439) -- cgit v1.2.3-70-g09d2 From 71a9e7cf8b7c78950939bb866701d8445fe5ba4c Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 3 Feb 2009 12:24:31 +0100 Subject: * apt-pkg/pkgcache.cc: - do not run "dpkg --configure pkg" if pkg is in trigger-awaited state (LP: #322955) --- apt-pkg/pkgcache.cc | 10 +++++++--- debian/changelog | 3 +++ 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'debian') diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc index 8eb62089a..385d247ea 100644 --- a/apt-pkg/pkgcache.cc +++ b/apt-pkg/pkgcache.cc @@ -274,9 +274,13 @@ pkgCache::PkgIterator::OkState pkgCache::PkgIterator::State() const return NeedsUnpack; if (Pkg->CurrentState == pkgCache::State::UnPacked || - Pkg->CurrentState == pkgCache::State::HalfConfigured || - Pkg->CurrentState == pkgCache::State::TriggersPending || - Pkg->CurrentState == pkgCache::State::TriggersAwaited) + Pkg->CurrentState == pkgCache::State::HalfConfigured) || + //we don't need to care for triggers awaiting packages + //dpkg will deal with them automatically when the + //trigger pending action is run (those packages are usually + //in half-configured or triggers-pending state) + //Pkg->CurrentState == pkgCache::State::TriggersAwaited + Pkg->CurrentState == pkgCache::State::TriggersPending) return NeedsConfigure; if (Pkg->CurrentState == pkgCache::State::HalfInstalled || diff --git a/debian/changelog b/debian/changelog index f778fbe1d..6dea85f25 100644 --- a/debian/changelog +++ b/debian/changelog @@ -38,6 +38,9 @@ apt (0.7.21) UNRELEASED; urgency=low * [ABI break] merge support for http redirects, thanks to Jeff Licquia and Anthony Towns * [ABI break] use int for the package IDs (thanks to Steve Cotton) + * apt-pkg/pkgcache.cc: + - do not run "dpkg --configure pkg" if pkg is in trigger-awaited + state (LP: #322955) [ Dereck Wonnacott ] * apt-ftparchive might write corrupt Release files (LP: #46439) -- cgit v1.2.3-70-g09d2 From 668ce84da00041c65cae3957d2b49786efa34276 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 3 Feb 2009 14:10:36 +0100 Subject: * methods/https.cc: - add Acquire::https::AllowRedirect support --- debian/changelog | 2 ++ doc/examples/configure-index | 6 ++++-- methods/https.cc | 5 +++++ 3 files changed, 11 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 6dea85f25..c0da66973 100644 --- a/debian/changelog +++ b/debian/changelog @@ -41,6 +41,8 @@ apt (0.7.21) UNRELEASED; urgency=low * apt-pkg/pkgcache.cc: - do not run "dpkg --configure pkg" if pkg is in trigger-awaited state (LP: #322955) + * methods/https.cc: + - add Acquire::https::AllowRedirect support [ Dereck Wonnacott ] * apt-ftparchive might write corrupt Release files (LP: #46439) diff --git a/doc/examples/configure-index b/doc/examples/configure-index index 84b1d8829..a4167085b 100644 --- a/doc/examples/configure-index +++ b/doc/examples/configure-index @@ -183,7 +183,8 @@ Acquire Proxy::http.us.debian.org "DIRECT"; // Specific per-host setting Timeout "120"; Pipeline-Depth "5"; - + AllowRedirect "true"; + // Cache Control. Note these do not work with Squid 2.0.2 No-Cache "false"; Max-Age "86400"; // 1 Day age on index files @@ -200,7 +201,8 @@ Acquire Verify-Peer "false"; SslCert "/etc/apt/some.pem"; CaPath "/etc/ssl/certs"; - Verify-Host" "2"; + Verify-Host" "true"; + AllowRedirect "true"; }; ftp diff --git a/methods/https.cc b/methods/https.cc index 7c743a424..8bf44b52a 100644 --- a/methods/https.cc +++ b/methods/https.cc @@ -208,6 +208,11 @@ bool HttpsMethod::Fetch(FetchItem *Itm) curl_easy_setopt(curl, CURLOPT_TIMEOUT, timeout); curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, timeout); + // set redirect options and default to 10 redirects + bool AllowRedirect = _config->FindI("Acquire::https::AllowRedirect", true); + curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, AllowRedirect); + curl_easy_setopt(curl, CURLOPT_MAXREDIRS, 10); + // debug if(_config->FindB("Debug::Acquire::https", false)) curl_easy_setopt(curl, CURLOPT_VERBOSE, true); -- cgit v1.2.3-70-g09d2 From 89ad8e7c1ad4aa6a90732ea5802a58c799ead189 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 9 Mar 2009 16:11:29 +0100 Subject: fix "apt-get source pkg" if there is a binary package and a source package of the same name but from different packages (LP: #330103) --- cmdline/apt-get.cc | 21 ++++++++++++++------- debian/changelog | 3 +++ 2 files changed, 17 insertions(+), 7 deletions(-) (limited to 'debian') diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 06fa41017..1c2c11689 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1272,16 +1272,23 @@ pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs, } } } - - // No source package name.. - if (Src.empty() == true) - Src = TmpSrc; - + // The best hit pkgSrcRecords::Parser *Last = 0; unsigned long Offset = 0; string Version; bool IsMatch = false; + bool MatchSrcOnly = false; + + // No source package name.. + if (Src.empty() == true) + Src = TmpSrc; + else + // if we have a source pkg name, make sure to only search + // for srcpkg names, otherwise apt gets confused if there + // is a binary package "pkg1" and a source package "pkg1" + // with the same name but that comes from different packages + MatchSrcOnly = true; // If we are matching by version then we need exact matches to be happy if (VerTag.empty() == false) @@ -1291,13 +1298,13 @@ pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs, binary packages in the search */ pkgSrcRecords::Parser *Parse; SrcRecs.Restart(); - while ((Parse = SrcRecs.Find(Src.c_str(),false)) != 0) + while ((Parse = SrcRecs.Find(Src.c_str(), MarchSrcOnly)) != 0) { string Ver = Parse->Version(); // show name mismatches if (IsMatch == true && Parse->Package() != Src) - ioprintf(c1out, _("No source package '%s' picking '%s' instead"), Parse->Package().c_str(), Src.c_str()); + ioprintf(c1out, _("No source package '%s' picking '%s' instead\n"), Parse->Package().c_str(), Src.c_str()); if (VerTag.empty() == false) { diff --git a/debian/changelog b/debian/changelog index c0da66973..19c06b5e9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -31,6 +31,9 @@ apt (0.7.21) UNRELEASED; urgency=low * cmdline/apt-get.cc: - fix "apt-get source pkg=ver" if binary name != source name and show a message (LP: #202219) + - fix "apt-get source pkg" if there is a binary package and + a source package of the same name but from different + packages (LP: #330103) * apt-pkg/deb/debsystem.cc: - make strings i18n able * apt-pkg/contrib/strutl.cc: -- cgit v1.2.3-70-g09d2 From 8a9e5ffdb6d0f1744f56bcb6522b134cfdae4a19 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 27 Mar 2009 22:45:07 +0100 Subject: * cmdline/acqprogress.cc: - Call pkgAcquireStatus::Pulse even if quiet, so that we still get dlstatus messages on the status-fd (LP: #290234). --- cmdline/acqprogress.cc | 4 ++-- debian/changelog | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/cmdline/acqprogress.cc b/cmdline/acqprogress.cc index a5fee1db5..b3ded4142 100644 --- a/cmdline/acqprogress.cc +++ b/cmdline/acqprogress.cc @@ -145,11 +145,11 @@ void AcqTextStatus::Stop() bandwidth and ETA indicator. */ bool AcqTextStatus::Pulse(pkgAcquire *Owner) { + pkgAcquireStatus::Pulse(Owner); + if (Quiet > 0) return true; - pkgAcquireStatus::Pulse(Owner); - enum {Long = 0,Medium,Short} Mode = Long; char Buffer[sizeof(BlankLine)]; diff --git a/debian/changelog b/debian/changelog index 19c06b5e9..82a82ef8c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -52,6 +52,12 @@ apt (0.7.21) UNRELEASED; urgency=low * Apply --important option to apt-cache depends (LP: #16947) * Clarify the --help for 'purge' (LP: #243948) + + [ Colin Watson ] + * cmdline/acqprogress.cc: + - Call pkgAcquireStatus::Pulse even if quiet, so that we still get + dlstatus messages on the status-fd (LP: #290234). + -- Michael Vogt Fri, 12 Sep 2008 11:34:24 +0200 apt (0.7.20) unstable; urgency=low -- cgit v1.2.3-70-g09d2 From c5d8878d1ffe7484e049f52189a07f3847e4fda9 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 8 Apr 2009 22:42:30 +0200 Subject: * methods/gpgv.cc: - properly check for expired and revoked keys (closes: #433091) --- debian/changelog | 2 ++ methods/gpgv.cc | 40 ++++++++++++++++++++++++++++++++++------ 2 files changed, 36 insertions(+), 6 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 82a82ef8c..75a3e2c0a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -46,6 +46,8 @@ apt (0.7.21) UNRELEASED; urgency=low state (LP: #322955) * methods/https.cc: - add Acquire::https::AllowRedirect support + * methods/gpgv.cc: + - properly check for expired and revoked keys (closes: #433091) [ Dereck Wonnacott ] * apt-ftparchive might write corrupt Release files (LP: #46439) diff --git a/methods/gpgv.cc b/methods/gpgv.cc index f3277b300..150c1d315 100644 --- a/methods/gpgv.cc +++ b/methods/gpgv.cc @@ -17,13 +17,18 @@ #define GNUPGBADSIG "[GNUPG:] BADSIG" #define GNUPGNOPUBKEY "[GNUPG:] NO_PUBKEY" #define GNUPGVALIDSIG "[GNUPG:] VALIDSIG" +#define GNUPGGOODSIG "[GNUPG:] GOODSIG" +#define GNUPGKEYEXPIRED "[GNUPG:] KEYEXPIRED" +#define GNUPGREVKEYSIG "[GNUPG:] REVKEYSIG" #define GNUPGNODATA "[GNUPG:] NODATA" class GPGVMethod : public pkgAcqMethod { private: string VerifyGetSigners(const char *file, const char *outfile, - vector &GoodSigners, vector &BadSigners, + vector &GoodSigners, + vector &BadSigners, + vector &WorthlessSigners, vector &NoPubKeySigners); protected: @@ -37,6 +42,7 @@ class GPGVMethod : public pkgAcqMethod string GPGVMethod::VerifyGetSigners(const char *file, const char *outfile, vector &GoodSigners, vector &BadSigners, + vector &WorthlessSigners, vector &NoPubKeySigners) { // setup a (empty) stringstream for formating the return value @@ -179,15 +185,27 @@ string GPGVMethod::VerifyGetSigners(const char *file, const char *outfile, std::cerr << "Got NODATA! " << std::endl; BadSigners.push_back(string(buffer+sizeof(GNUPGPREFIX))); } - if (strncmp(buffer, GNUPGVALIDSIG, sizeof(GNUPGVALIDSIG)-1) == 0) + if (strncmp(buffer, GNUPGKEYEXPIRED, sizeof(GNUPGKEYEXPIRED)-1) == 0) + { + if (_config->FindB("Debug::Acquire::gpgv", false)) + std::cerr << "Got KEYEXPIRED! " << std::endl; + WorthlessSigners.push_back(string(buffer+sizeof(GNUPGPREFIX))); + } + if (strncmp(buffer, GNUPGREVKEYSIG, sizeof(GNUPGREVKEYSIG)-1) == 0) + { + if (_config->FindB("Debug::Acquire::gpgv", false)) + std::cerr << "Got REVKEYSIG! " << std::endl; + WorthlessSigners.push_back(string(buffer+sizeof(GNUPGPREFIX))); + } + if (strncmp(buffer, GNUPGGOODSIG, sizeof(GNUPGGOODSIG)-1) == 0) { char *sig = buffer + sizeof(GNUPGPREFIX); - char *p = sig + sizeof("VALIDSIG"); + char *p = sig + sizeof("GOODSIG"); while (*p && isxdigit(*p)) p++; *p = 0; if (_config->FindB("Debug::Acquire::gpgv", false)) - std::cerr << "Got VALIDSIG, key ID:" << sig << std::endl; + std::cerr << "Got GOODSIG, key ID:" << sig << std::endl; GoodSigners.push_back(string(sig)); } } @@ -227,6 +245,8 @@ bool GPGVMethod::Fetch(FetchItem *Itm) string keyID; vector GoodSigners; vector BadSigners; + // a worthless signature is a expired or revoked one + vector WorthlessSigners; vector NoPubKeySigners; FetchResult Res; @@ -235,13 +255,14 @@ bool GPGVMethod::Fetch(FetchItem *Itm) // Run gpgv on file, extract contents and get the key ID of the signer string msg = VerifyGetSigners(Path.c_str(), Itm->DestFile.c_str(), - GoodSigners, BadSigners, NoPubKeySigners); + GoodSigners, BadSigners, WorthlessSigners, + NoPubKeySigners); if (GoodSigners.empty() || !BadSigners.empty() || !NoPubKeySigners.empty()) { string errmsg; // In this case, something bad probably happened, so we just go // with what the other method gave us for an error message. - if (BadSigners.empty() && NoPubKeySigners.empty()) + if (BadSigners.empty() && WorthlessSigners.empty() && NoPubKeySigners.empty()) errmsg = msg; else { @@ -252,6 +273,13 @@ bool GPGVMethod::Fetch(FetchItem *Itm) I != BadSigners.end(); I++) errmsg += (*I + "\n"); } + if (!WorthlessSigners.empty()) + { + errmsg += _("The following signatures were invalid:\n"); + for (vector::iterator I = WorthlessSigners.begin(); + I != WorthlessSigners.end(); I++) + errmsg += (*I + "\n"); + } if (!NoPubKeySigners.empty()) { errmsg += _("The following signatures couldn't be verified because the public key is not available:\n"); -- cgit v1.2.3-70-g09d2 From 4e86942abf369e5bce6c3612d0e8f2aa5a9f2821 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 23 Apr 2009 12:53:48 +0200 Subject: fix problematic use of tolower() when calculating the version hash by using locale independant tolower_ascii() function. Thanks to M. Vefa Bicakci (LP: #80248) --- apt-pkg/contrib/strutl.cc | 11 +++++++++++ apt-pkg/contrib/strutl.h | 1 + apt-pkg/deb/deblistparser.cc | 2 +- apt-pkg/pkgcache.cc | 4 ++-- debian/changelog | 4 ++++ 5 files changed, 19 insertions(+), 3 deletions(-) (limited to 'debian') diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc index 327381d03..0b1bc3c98 100644 --- a/apt-pkg/contrib/strutl.cc +++ b/apt-pkg/contrib/strutl.cc @@ -1074,6 +1074,17 @@ char *safe_snprintf(char *Buffer,char *End,const char *Format,...) } /*}}}*/ +// tolower_ascii - tolower() function that ignores the locale /*{{{*/ +// --------------------------------------------------------------------- +/* */ +int tolower_ascii(int c) +{ + if (c >= 'A' and c <= 'Z') + return c + 32; + return c; +} + /*}}}*/ + // CheckDomainList - See if Host is in a , seperate list /*{{{*/ // --------------------------------------------------------------------- /* The domain list is a comma seperate list of domains that are suffix diff --git a/apt-pkg/contrib/strutl.h b/apt-pkg/contrib/strutl.h index d9972abf4..51416a24a 100644 --- a/apt-pkg/contrib/strutl.h +++ b/apt-pkg/contrib/strutl.h @@ -62,6 +62,7 @@ void ioprintf(ostream &out,const char *format,...) APT_FORMAT2; void strprintf(string &out,const char *format,...) APT_FORMAT2; char *safe_snprintf(char *Buffer,char *End,const char *Format,...) APT_FORMAT3; bool CheckDomainList(const string &Host, const string &List); +int tolower_ascii(int c); #define APT_MKSTRCMP(name,func) \ inline int name(const char *A,const char *AEnd,const char *B) {return func(A,AEnd,B,B+strlen(B));}; \ diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc index 896d4d6d8..55ba1f8c4 100644 --- a/apt-pkg/deb/deblistparser.cc +++ b/apt-pkg/deb/deblistparser.cc @@ -213,7 +213,7 @@ unsigned short debListParser::VersionHash() for (; Start != End; Start++) { if (isspace(*Start) == 0) - *I++ = tolower(*Start); + *I++ = tolower_ascii(*Start); if (*Start == '<' && Start[1] != '<' && Start[1] != '=') *I++ = '='; if (*Start == '>' && Start[1] != '>' && Start[1] != '=') diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc index 4fbf42c4b..6687864ee 100644 --- a/apt-pkg/pkgcache.cc +++ b/apt-pkg/pkgcache.cc @@ -163,7 +163,7 @@ unsigned long pkgCache::sHash(const string &Str) const { unsigned long Hash = 0; for (string::const_iterator I = Str.begin(); I != Str.end(); I++) - Hash = 5*Hash + tolower(*I); + Hash = 5*Hash + tolower_ascii(*I); return Hash % _count(HeaderP->HashTable); } @@ -171,7 +171,7 @@ unsigned long pkgCache::sHash(const char *Str) const { unsigned long Hash = 0; for (const char *I = Str; *I != 0; I++) - Hash = 5*Hash + tolower(*I); + Hash = 5*Hash + tolower_ascii(*I); return Hash % _count(HeaderP->HashTable); } diff --git a/debian/changelog b/debian/changelog index 75a3e2c0a..45804bc63 100644 --- a/debian/changelog +++ b/debian/changelog @@ -48,6 +48,10 @@ apt (0.7.21) UNRELEASED; urgency=low - add Acquire::https::AllowRedirect support * methods/gpgv.cc: - properly check for expired and revoked keys (closes: #433091) + * fix problematic use of tolower() when calculating the version + hash by using locale independant tolower_ascii() function. + Thanks to M. Vefa Bicakci (LP: #80248) + [ Dereck Wonnacott ] * apt-ftparchive might write corrupt Release files (LP: #46439) -- cgit v1.2.3-70-g09d2 From 526334a0e19626c0a77e029ba0ac546cc20f6756 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 24 Apr 2009 10:12:36 +0200 Subject: build fixes for g++-4.4 --- apt-pkg/acquire.cc | 3 ++- apt-pkg/contrib/sha256.h | 1 + debian/changelog | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc index 38944bbac..2e6bd3401 100644 --- a/apt-pkg/acquire.cc +++ b/apt-pkg/acquire.cc @@ -24,7 +24,8 @@ #include #include - +#include + #include #include #include diff --git a/apt-pkg/contrib/sha256.h b/apt-pkg/contrib/sha256.h index 1951f053b..5934b5641 100644 --- a/apt-pkg/contrib/sha256.h +++ b/apt-pkg/contrib/sha256.h @@ -17,6 +17,7 @@ #include #include #include +#include using std::string; using std::min; diff --git a/debian/changelog b/debian/changelog index 45804bc63..7e953aa9b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -51,7 +51,7 @@ apt (0.7.21) UNRELEASED; urgency=low * fix problematic use of tolower() when calculating the version hash by using locale independant tolower_ascii() function. Thanks to M. Vefa Bicakci (LP: #80248) - + * build fixes for g++-4.4 [ Dereck Wonnacott ] * apt-ftparchive might write corrupt Release files (LP: #46439) -- cgit v1.2.3-70-g09d2 From a9b5e24b6bb392c4de88d965c33120d4a7fcb4f6 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 3 Jun 2009 12:05:20 +0200 Subject: * cmdline/apt-mark: - add "showauto" option to show automatically installed packages --- cmdline/apt-mark | 72 +++++++++++++++++++++++++++++++++++--------------------- debian/changelog | 2 ++ 2 files changed, 47 insertions(+), 27 deletions(-) (limited to 'debian') diff --git a/cmdline/apt-mark b/cmdline/apt-mark index f6e749eb5..226d2079b 100755 --- a/cmdline/apt-mark +++ b/cmdline/apt-mark @@ -14,34 +14,21 @@ actions = { "markauto" : 1, "unmarkauto": 0 } -if __name__ == "__main__": - apt_pkg.init() - - # option parsing - parser = OptionParser() - parser.usage = "%prog [options] {markauto|unmarkauto} packages..." - parser.add_option("-f", "--file", action="store", type="string", - dest="filename", - help="read/write a different file") - parser.add_option("-v", "--verbose", - action="store_true", dest="verbose", default=False, - help="print verbose status messages to stdout") - (options, args) = parser.parse_args() - if len(args) < 2: - parser.error("not enough argument") - - # get pkgs to change - if args[0] not in actions.keys(): - parser.error("first argument must be 'markauto' or 'unmarkauto'") - pkgs = args[1:] - action = actions[args[0]] - - # get the state-file - if not options.filename: - STATE_FILE = apt_pkg.Config.FindDir("Dir::State") + "extended_states" - else: - STATE_FILE=options.filename +def show_automatic(filename): + if not os.path.exists(STATE_FILE): + return + auto = set() + tagfile = apt_pkg.ParseTagFile(open(STATE_FILE)) + while tagfile.Step(): + pkgname = tagfile.Section.get("Package") + autoInst = tagfile.Section.get("Auto-Installed") + if int(autoInst): + auto.add(pkgname) + print "\n".join(sorted(auto)) + +def mark_unmark_automatic(filename, action, pkgs): + " mark or unmark automatic flag" # open the statefile if os.path.exists(STATE_FILE): tagfile = apt_pkg.ParseTagFile(open(STATE_FILE)) @@ -63,3 +50,34 @@ if __name__ == "__main__": os.chmod(outfile.name, 0644) os.rename(outfile.name, STATE_FILE) os.chmod(STATE_FILE, 0644) + + +if __name__ == "__main__": + apt_pkg.init() + + # option parsing + parser = OptionParser() + parser.usage = "%prog [options] {markauto|unmarkauto} packages..." + parser.add_option("-f", "--file", action="store", type="string", + dest="filename", + help="read/write a different file") + parser.add_option("-v", "--verbose", + action="store_true", dest="verbose", default=False, + help="print verbose status messages to stdout") + (options, args) = parser.parse_args() + + # get the state-file + if not options.filename: + STATE_FILE = apt_pkg.Config.FindDir("Dir::State") + "extended_states" + else: + STATE_FILE=options.filename + + if args[0] == "showauto": + show_automatic(STATE_FILE) + else: + # get pkgs to change + if args[0] not in actions.keys(): + parser.error("first argument must be 'markauto', 'unmarkauto' or 'showauto'") + pkgs = args[1:] + action = actions[args[0]] + mark_unmark_automatic(STATE_FILE, action, pkgs) diff --git a/debian/changelog b/debian/changelog index 7e953aa9b..3678e33f2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -52,6 +52,8 @@ apt (0.7.21) UNRELEASED; urgency=low hash by using locale independant tolower_ascii() function. Thanks to M. Vefa Bicakci (LP: #80248) * build fixes for g++-4.4 + * cmdline/apt-mark: + - add "showauto" option to show automatically installed packages [ Dereck Wonnacott ] * apt-ftparchive might write corrupt Release files (LP: #46439) -- cgit v1.2.3-70-g09d2 From 6ce7261259132f11fc93af104754e8cfc540bf13 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 9 Jun 2009 16:14:21 +0200 Subject: * apt-pkg/acquire.cc: - make the max pipeline depth of the acquire queue configurable via Acquire::Max-Pipeline-Depth --- apt-pkg/acquire.cc | 2 +- debian/changelog | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc index 2e6bd3401..bafba337e 100644 --- a/apt-pkg/acquire.cc +++ b/apt-pkg/acquire.cc @@ -621,7 +621,7 @@ bool pkgAcquire::Queue::Startup() added other source retry to have cycle maintain a pipeline depth on its own. */ if (Cnf->Pipeline == true) - MaxPipeDepth = 1000; + MaxPipeDepth = _config->FindI("Acquire::Max-Pipeline-Depth",10); else MaxPipeDepth = 1; } diff --git a/debian/changelog b/debian/changelog index 3678e33f2..30e7b7591 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,13 @@ apt (0.7.21) UNRELEASED; urgency=low * Documented all cron script related configuration items in configure-index. + [ Michael Vogt ] + * apt-pkg/acquire.cc: + - make the max pipeline depth of the acquire queue configurable + via Acquire::Max-Pipeline-Depth + + -- Michael Vogt Thu, 28 May 2009 17:51:42 +0200 + [ Michael Vogt ] * apt-pkg/indexcopy.cc: - support having CDs with no Packages file (just a Packages.gz) -- cgit v1.2.3-70-g09d2 From 81e9789b12374073e848c73c79e235f82c14df44 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 9 Jun 2009 17:33:22 +0200 Subject: [ABI break] support '#' in apt.conf and /etc/apt/preferences (closes: #189866) --- apt-pkg/contrib/configuration.cc | 2 +- apt-pkg/init.h | 2 +- apt-pkg/makefile | 2 +- apt-pkg/policy.cc | 18 ++++++++++++++++-- apt-pkg/tagfile.cc | 21 ++++++++++++++++----- apt-pkg/tagfile.h | 5 ++++- debian/changelog | 5 +++++ methods/makefile | 2 +- 8 files changed, 45 insertions(+), 12 deletions(-) (limited to 'debian') diff --git a/apt-pkg/contrib/configuration.cc b/apt-pkg/contrib/configuration.cc index a82311a3f..80584d3ea 100644 --- a/apt-pkg/contrib/configuration.cc +++ b/apt-pkg/contrib/configuration.cc @@ -582,7 +582,7 @@ bool ReadConfigFile(Configuration &Conf,const string &FName,bool AsSectional, if (InQuote == true) continue; - if (*I == '/' && I + 1 != End && I[1] == '/') + if ((*I == '/' && I + 1 != End && I[1] == '/') || *I == '#') { End = I; break; diff --git a/apt-pkg/init.h b/apt-pkg/init.h index 6d8693be9..165299253 100644 --- a/apt-pkg/init.h +++ b/apt-pkg/init.h @@ -18,7 +18,7 @@ // See the makefile #define APT_PKG_MAJOR 4 -#define APT_PKG_MINOR 6 +#define APT_PKG_MINOR 8 #define APT_PKG_RELEASE 0 extern const char *pkgVersion; diff --git a/apt-pkg/makefile b/apt-pkg/makefile index 087f17740..059f8532b 100644 --- a/apt-pkg/makefile +++ b/apt-pkg/makefile @@ -13,7 +13,7 @@ include ../buildlib/defaults.mak # methods/makefile - FIXME LIBRARY=apt-pkg LIBEXT=$(GLIBC_VER)$(LIBSTDCPP_VER) -MAJOR=4.7 +MAJOR=4.8 MINOR=0 SLIBS=$(PTHREADLIB) $(INTLLIBS) -lutil APT_DOMAIN:=libapt-pkg$(MAJOR) diff --git a/apt-pkg/policy.cc b/apt-pkg/policy.cc index 8b083fd44..98576fc91 100644 --- a/apt-pkg/policy.cc +++ b/apt-pkg/policy.cc @@ -239,7 +239,21 @@ signed short pkgPolicy::GetPriority(pkgCache::PkgIterator const &Pkg) return 0; } /*}}}*/ - +// PreferenceSection class - Overriding the default TrimRecord method /*{{{*/ +// --------------------------------------------------------------------- +/* The preference file is a user generated file so the parser should + therefore be a bit more friendly by allowing comments and new lines + all over the place rather than forcing a special format */ +class PreferenceSection : public pkgTagSection +{ + void TrimRecord(bool BeforeRecord, const char* &End) + { + for (; Stop < End && (Stop[0] == '\n' || Stop[0] == '\r' || Stop[0] == '#'); Stop++) + if (Stop[0] == '#') + Stop = (const char*) memchr(Stop,'\n',End-Stop); + } +}; + /*}}}*/ // ReadPinFile - Load the pin file into a Policy /*{{{*/ // --------------------------------------------------------------------- /* I'd like to see the preferences file store more than just pin information @@ -259,7 +273,7 @@ bool ReadPinFile(pkgPolicy &Plcy,string File) if (_error->PendingError() == true) return false; - pkgTagSection Tags; + PreferenceSection Tags; while (TF.Step(Tags) == true) { string Name = Tags.FindS("Package"); diff --git a/apt-pkg/tagfile.cc b/apt-pkg/tagfile.cc index 893cb8ee7..7c5d15a58 100644 --- a/apt-pkg/tagfile.cc +++ b/apt-pkg/tagfile.cc @@ -81,7 +81,7 @@ bool pkgTagFile::Resize() End = Start + EndSize; return true; } - + /*}}}*/ // TagFile::Step - Advance to the next section /*{{{*/ // --------------------------------------------------------------------- /* If the Section Scanner fails we refill the buffer and try again. @@ -212,10 +212,12 @@ bool pkgTagSection::Scan(const char *Start,unsigned long MaxLength) if (Stop == 0) return false; - + TagCount = 0; while (TagCount+1 < sizeof(Indexes)/sizeof(Indexes[0]) && Stop < End) { + TrimRecord(true,End); + // Start a new index and add it to the hash if (isspace(Stop[0]) == 0) { @@ -227,14 +229,14 @@ bool pkgTagSection::Scan(const char *Start,unsigned long MaxLength) if (Stop == 0) return false; - + for (; Stop+1 < End && Stop[1] == '\r'; Stop++); // Double newline marks the end of the record if (Stop+1 < End && Stop[1] == '\n') { Indexes[TagCount] = Stop - Section; - for (; Stop < End && (Stop[0] == '\n' || Stop[0] == '\r'); Stop++); + TrimRecord(false,End); return true; } @@ -244,6 +246,16 @@ bool pkgTagSection::Scan(const char *Start,unsigned long MaxLength) return false; } /*}}}*/ +// TagSection::TrimRecord - Trim off any garbage before/after a record /*{{{*/ +// --------------------------------------------------------------------- +/* There should be exactly 2 newline at the end of the record, no more. */ +void pkgTagSection::TrimRecord(bool BeforeRecord, const char*& End) +{ + if (BeforeRecord == true) + return; + for (; Stop < End && (Stop[0] == '\n' || Stop[0] == '\r'); Stop++); +} + /*}}}*/ // TagSection::Trim - Trim off any trailing garbage /*{{{*/ // --------------------------------------------------------------------- /* There should be exactly 1 newline at the end of the buffer, no more. */ @@ -390,7 +402,6 @@ bool pkgTagSection::FindFlag(const char *Tag,unsigned long &Flags, return true; } /*}}}*/ - // TFRewrite - Rewrite a control record /*{{{*/ // --------------------------------------------------------------------- /* This writes the control record to stdout rewriting it as necessary. The diff --git a/apt-pkg/tagfile.h b/apt-pkg/tagfile.h index 6536932dd..321329a23 100644 --- a/apt-pkg/tagfile.h +++ b/apt-pkg/tagfile.h @@ -27,7 +27,6 @@ class pkgTagSection { const char *Section; - const char *Stop; // We have a limit of 256 tags per section. unsigned int Indexes[256]; @@ -35,6 +34,9 @@ class pkgTagSection unsigned int TagCount; + protected: + const char *Stop; + public: inline bool operator ==(const pkgTagSection &rhs) {return Section == rhs.Section;}; @@ -49,6 +51,7 @@ class pkgTagSection bool Scan(const char *Start,unsigned long MaxLength); inline unsigned long size() const {return Stop - Section;}; void Trim(); + virtual void TrimRecord(bool BeforeRecord, const char* &End); inline unsigned int Count() const {return TagCount;}; inline void Get(const char *&Start,const char *&Stop,unsigned int I) const diff --git a/debian/changelog b/debian/changelog index 5d3a801a8..7947918a4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,6 @@ apt (0.7.22) UNRELEASED; urgency=low + [ Christian Perrier ] * Documentation translations: - Fix a typo in apt-get(8) French translation. Closes: #525043 Thanks to Guillaume Delacour for spotting it. @@ -15,6 +16,10 @@ apt (0.7.22) UNRELEASED; urgency=low * Added translations - ast.po (Asturian by Marcos Alvareez Costales). Closes: #529007, #529730 + + [ David Kalnischkies ] + * [ABI break] support '#' in apt.conf and /etc/apt/preferences + (closes: #189866) -- Christian Perrier Wed, 22 Apr 2009 10:13:54 +0200 diff --git a/methods/makefile b/methods/makefile index 78bdbc96f..589f9fa1c 100644 --- a/methods/makefile +++ b/methods/makefile @@ -7,7 +7,7 @@ include ../buildlib/defaults.mak BIN := $(BIN)/methods # FIXME.. -LIB_APT_PKG_MAJOR = 4.7 +LIB_APT_PKG_MAJOR = 4.8 APT_DOMAIN := libapt-pkg$(LIB_APT_PKG_MAJOR) # The file method -- cgit v1.2.3-70-g09d2 From 8aea8c3f51ce84ed8d6d89682c0a989ac99c4796 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Fri, 12 Jun 2009 19:07:40 +0200 Subject: apt-pkg/contrib/configuration.cc: Fix a small memory leak in ReadConfigFile. --- apt-pkg/contrib/configuration.cc | 1 + debian/changelog | 4 ++++ 2 files changed, 5 insertions(+) (limited to 'debian') diff --git a/apt-pkg/contrib/configuration.cc b/apt-pkg/contrib/configuration.cc index 80584d3ea..48a5f0bff 100644 --- a/apt-pkg/contrib/configuration.cc +++ b/apt-pkg/contrib/configuration.cc @@ -521,6 +521,7 @@ bool ReadConfigFile(Configuration &Conf,const string &FName,bool AsSectional, F.getline(Buffer,sizeof(Buffer) / 2); Input += Buffer; + delete[] Buffer; } while (F.fail() && !F.eof()); diff --git a/debian/changelog b/debian/changelog index 7947918a4..ea935f144 100644 --- a/debian/changelog +++ b/debian/changelog @@ -21,6 +21,10 @@ apt (0.7.22) UNRELEASED; urgency=low * [ABI break] support '#' in apt.conf and /etc/apt/preferences (closes: #189866) + [ Julian Andres Klode ] + * apt-pkg/contrib/configuration.cc: Fix a small memory leak in + ReadConfigFile. + -- Christian Perrier Wed, 22 Apr 2009 10:13:54 +0200 apt (0.7.21) unstable; urgency=low -- cgit v1.2.3-70-g09d2 From f8ae7e8b3c5585888cbc0516b35131acec14ff05 Mon Sep 17 00:00:00 2001 From: "jak@debian.org" <> Date: Mon, 15 Jun 2009 14:57:01 +0200 Subject: Introduce support for the Enhances field. (Closes: #137583) --- apt-pkg/deb/deblistparser.cc | 2 ++ apt-pkg/pkgcache.cc | 4 ++-- apt-pkg/pkgcache.h | 2 +- debian/changelog | 1 + 4 files changed, 6 insertions(+), 3 deletions(-) (limited to 'debian') diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc index 896d4d6d8..74fa6fab4 100644 --- a/apt-pkg/deb/deblistparser.cc +++ b/apt-pkg/deb/deblistparser.cc @@ -109,6 +109,8 @@ bool debListParser::NewVersion(pkgCache::VerIterator Ver) return false; if (ParseDepends(Ver,"Replaces",pkgCache::Dep::Replaces) == false) return false; + if (ParseDepends(Ver,"Enhances",pkgCache::Dep::Enhances) == false) + return false; // Obsolete. if (ParseDepends(Ver,"Optional",pkgCache::Dep::Suggests) == false) diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc index 4fbf42c4b..7a0d7376d 100644 --- a/apt-pkg/pkgcache.cc +++ b/apt-pkg/pkgcache.cc @@ -49,7 +49,7 @@ pkgCache::Header::Header() /* Whenever the structures change the major version should be bumped, whenever the generator changes the minor version should be bumped. */ - MajorVersion = 7; + MajorVersion = 8; MinorVersion = 0; Dirty = false; @@ -223,7 +223,7 @@ const char *pkgCache::DepType(unsigned char Type) { const char *Types[] = {"",_("Depends"),_("PreDepends"),_("Suggests"), _("Recommends"),_("Conflicts"),_("Replaces"), - _("Obsoletes"),_("Breaks")}; + _("Obsoletes"),_("Breaks"), _("Enhances")}; if (Type < sizeof(Types)/sizeof(*Types)) return Types[Type]; return ""; diff --git a/apt-pkg/pkgcache.h b/apt-pkg/pkgcache.h index 759e9a225..f2c032eb4 100644 --- a/apt-pkg/pkgcache.h +++ b/apt-pkg/pkgcache.h @@ -70,7 +70,7 @@ class pkgCache struct Dep { enum DepType {Depends=1,PreDepends=2,Suggests=3,Recommends=4, - Conflicts=5,Replaces=6,Obsoletes=7,DpkgBreaks=8}; + Conflicts=5,Replaces=6,Obsoletes=7,DpkgBreaks=8,Enhances=9}; enum DepCompareOp {Or=0x10,NoOp=0,LessEq=0x1,GreaterEq=0x2,Less=0x3, Greater=0x4,Equals=0x5,NotEquals=0x6}; }; diff --git a/debian/changelog b/debian/changelog index ea935f144..ecba3f215 100644 --- a/debian/changelog +++ b/debian/changelog @@ -24,6 +24,7 @@ apt (0.7.22) UNRELEASED; urgency=low [ Julian Andres Klode ] * apt-pkg/contrib/configuration.cc: Fix a small memory leak in ReadConfigFile. + * Introduce support for the Enhances field. (Closes: #137583) -- Christian Perrier Wed, 22 Apr 2009 10:13:54 +0200 -- cgit v1.2.3-70-g09d2 From cebe0287c36408e44196266de45737386eaa28fc Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 17 Jun 2009 10:15:51 +0200 Subject: * apt-pkg/deb/dpkgpm.cc: - add Dpkg::UseIoNice boolean option to run dpkg with ionice -c3 (off by default) --- apt-pkg/deb/dpkgpm.cc | 30 +++++++++++++++++++++++++++++- debian/changelog | 3 +++ 2 files changed, 32 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index 1d45e70e9..462f4a739 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -74,6 +74,31 @@ namespace }; } +/* helper function to ionice the given PID + + there is no C header for ionice yet - just the syscall interface + so we use the binary from util-linux +*/ +static bool +ionice(int PID) +{ + if (!FileExists("/usr/bin/ionice")) + return false; + pid_t Process = ExecFork(); + if (Process == 0) + { + char buf[32]; + snprintf(buf, sizeof(buf), "-p%d", PID); + const char *Args[4]; + Args[0] = "/usr/bin/ionice"; + Args[1] = "-c3"; + Args[2] = buf; + Args[3] = 0; + execv(Args[0], (char **)Args); + } + return ExecWait(Process, "ionice"); +} + // DPkgPM::pkgDPkgPM - Constructor /*{{{*/ // --------------------------------------------------------------------- /* */ @@ -850,7 +875,6 @@ bool pkgDPkgPM::Go(int OutStatusFd) _exit(100); } - /* No Job Control Stop Env is a magic dpkg var that prevents it from using sigstop */ putenv((char *)"DPKG_NO_TSTP=yes"); @@ -859,6 +883,10 @@ bool pkgDPkgPM::Go(int OutStatusFd) _exit(100); } + // apply ionice + if (_config->FindB("DPkg::UseIoNice", false) == true) + ionice(Child); + // clear the Keep-Fd again _config->Clear("APT::Keep-Fds",fd[1]); diff --git a/debian/changelog b/debian/changelog index 30e7b7591..a22f78401 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,6 +13,9 @@ apt (0.7.21) UNRELEASED; urgency=low * apt-pkg/acquire.cc: - make the max pipeline depth of the acquire queue configurable via Acquire::Max-Pipeline-Depth + * apt-pkg/deb/dpkgpm.cc: + - add Dpkg::UseIoNice boolean option to run dpkg with ionice -c3 + (off by default) -- Michael Vogt Thu, 28 May 2009 17:51:42 +0200 -- cgit v1.2.3-70-g09d2 From ccd8e28fe16bf8e80db65e330ed89454c0104f80 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 17 Jun 2009 10:44:21 +0200 Subject: send "dpkg-exec" message on the status fd when dpkg is run --- apt-pkg/deb/dpkgpm.cc | 9 +++++++++ debian/changelog | 1 + 2 files changed, 10 insertions(+) (limited to 'debian') diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index 462f4a739..a8d08f500 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -839,6 +839,15 @@ bool pkgDPkgPM::Go(int OutStatusFd) // Fork dpkg pid_t Child; _config->Set("APT::Keep-Fds::",fd[1]); + // send status information that we are about to fork dpkg + if(OutStatusFd > 0) { + ostringstream status; + status << "pmstatus:dpkg-exec:" + << (PackagesDone/float(PackagesTotal)*100.0) + << ":" << _("Running dpkg") + << endl; + write(OutStatusFd, status.str().c_str(), status.str().size()); + } Child = ExecFork(); // This is the child diff --git a/debian/changelog b/debian/changelog index a22f78401..60db448c0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -16,6 +16,7 @@ apt (0.7.21) UNRELEASED; urgency=low * apt-pkg/deb/dpkgpm.cc: - add Dpkg::UseIoNice boolean option to run dpkg with ionice -c3 (off by default) + - send "dpkg-exec" message on the status fd when dpkg is run -- Michael Vogt Thu, 28 May 2009 17:51:42 +0200 -- cgit v1.2.3-70-g09d2 From 3a998f6ad4aab8b55b5c8c35927c38b9f53018c4 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 23 Jun 2009 21:43:18 +0200 Subject: * apt-pkg/algorithms.cc: - consider recommends when making the scores for the problem resolver --- apt-pkg/algorithms.cc | 8 ++++++-- debian/changelog | 3 +++ 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc index bd33d5ef1..b6f4705f3 100644 --- a/apt-pkg/algorithms.cc +++ b/apt-pkg/algorithms.cc @@ -526,7 +526,9 @@ void pkgProblemResolver::MakeScores() for (pkgCache::DepIterator D = Cache[I].InstVerIter(Cache).DependsList(); D.end() == false; D++) { - if (D->Type == pkgCache::Dep::Depends || D->Type == pkgCache::Dep::PreDepends) + if (D->Type == pkgCache::Dep::Depends || + D->Type == pkgCache::Dep::PreDepends || + D->Type == pkgCache::Dep::Recommends) Scores[D.TargetPkg()->ID]++; } } @@ -547,7 +549,9 @@ void pkgProblemResolver::MakeScores() { // Only do it for the install version if ((pkgCache::Version *)D.ParentVer() != Cache[D.ParentPkg()].InstallVer || - (D->Type != pkgCache::Dep::Depends && D->Type != pkgCache::Dep::PreDepends)) + (D->Type != pkgCache::Dep::Depends && + D->Type != pkgCache::Dep::PreDepends && + D->Type != pkgCache::Dep::Recommends)) continue; Scores[I->ID] += abs(OldScores[D.ParentPkg()->ID]); diff --git a/debian/changelog b/debian/changelog index 60db448c0..ba57dbadc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -17,6 +17,9 @@ apt (0.7.21) UNRELEASED; urgency=low - add Dpkg::UseIoNice boolean option to run dpkg with ionice -c3 (off by default) - send "dpkg-exec" message on the status fd when dpkg is run + * apt-pkg/algorithms.cc: + - consider recommends when making the scores for the problem + resolver -- Michael Vogt Thu, 28 May 2009 17:51:42 +0200 -- cgit v1.2.3-70-g09d2 From 55a5a46c235a30bf024fb2301066553953701cc5 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 29 Jun 2009 16:55:49 +0200 Subject: support running "--simulate" as user --- cmdline/apt-get.cc | 13 ++++++++++++- debian/changelog | 1 + doc/apt-get.8.xml | 5 +++++ 3 files changed, 18 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 028f371b5..faad2ed6b 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -2788,7 +2788,18 @@ int main(int argc,const char *argv[]) ShowHelp(CmdL); return 0; } - + + // simulate user-friendly if apt-get has no root privileges + if (getuid() != 0 && _config->FindB("APT::Get::Simulate") == true) + { + cout << _("NOTE: This is only a simulation!\n" + " apt-get needs root privileges for real execution.\n" + " Keep also in mind that locking is deactivated,\n" + " so don't depend on the relevance to the real current situation!" + ) << std::endl; + _config->Set("Debug::NoLocking",true); + } + // Deal with stdout not being a tty if (!isatty(STDOUT_FILENO) && _config->FindI("quiet",0) < 1) _config->Set("quiet","1"); diff --git a/debian/changelog b/debian/changelog index 28bc54108..f1cb7bd0c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -21,6 +21,7 @@ apt (0.7.22) UNRELEASED; urgency=low * [ABI break] support '#' in apt.conf and /etc/apt/preferences (closes: #189866) * [ABI break] Allow pinning by codename (closes: #97564) + * support running "--simulate" as user [ Julian Andres Klode ] * apt-pkg/contrib/configuration.cc: Fix a small memory leak in diff --git a/doc/apt-get.8.xml b/doc/apt-get.8.xml index c63b2a6c6..e7f6d7094 100644 --- a/doc/apt-get.8.xml +++ b/doc/apt-get.8.xml @@ -363,6 +363,11 @@ actually change the system. Configuration Item: APT::Get::Simulate. + Simulation run as user will deactivate locking (Debug::NoLocking) + automatical and display a notice indicating that this is only a simulation. + Neigther NoLocking nor the notice will be triggered if run as root (root should know what + he is doing without further warnings by apt-get). + Simulate prints out a series of lines each one representing a dpkg operation, Configure (Conf), Remove (Remv), Unpack (Inst). Square brackets indicate broken packages with -- cgit v1.2.3-70-g09d2 From af29ffb44d95dfb0f7b0c1835e2e501313f74723 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 29 Jun 2009 18:00:54 +0200 Subject: * add depth information to the debug output and show what depends type triggers a autoinst (closes: #458389) * add debug::pkgDepCache::Marker with more detailed debug output (closes: #87520) --- apt-pkg/cacheiterators.h | 13 +- apt-pkg/depcache.cc | 47 +++++-- apt-pkg/depcache.h | 10 +- apt-pkg/pkgcache.cc | 51 ++++++++ debian/changelog | 4 + doc/apt.conf.5.xml | 21 ++++ doc/examples/configure-index | 1 + po/apt-all.pot | 293 +++++++++++++++++++++++++------------------ 8 files changed, 298 insertions(+), 142 deletions(-) (limited to 'debian') diff --git a/apt-pkg/cacheiterators.h b/apt-pkg/cacheiterators.h index 63f9de8fc..cf79b3a6b 100644 --- a/apt-pkg/cacheiterators.h +++ b/apt-pkg/cacheiterators.h @@ -80,7 +80,13 @@ class pkgCache::PkgIterator inline PrvIterator ProvidesList() const; inline unsigned long Index() const {return Pkg - Owner->PkgP;}; OkState State() const; - + + //Nice printable representation + friend std::ostream& operator<<(std::ostream& out, pkgCache::PkgIterator Pkg); + + const char *CandVersion() const; + const char *CurVersion() const; + // Constructors inline PkgIterator(pkgCache &Owner,Package *Trg) : Pkg(Trg), Owner(&Owner), HashIndex(0) @@ -111,7 +117,10 @@ class pkgCache::VerIterator inline bool operator ==(const VerIterator &B) const {return Ver == B.Ver;}; inline bool operator !=(const VerIterator &B) const {return Ver != B.Ver;}; int CompareVer(const VerIterator &B) const; - + + // Testing + inline bool IsGood() const { return Ver && Owner && ! end();}; + // Accessors inline Version *operator ->() {return Ver;}; inline Version const *operator ->() const {return Ver;}; diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index 2411bfe89..e9ef9cedc 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -47,6 +47,13 @@ ConfigValueInSubTree(const char* SubTree, const char *needle) return false; } +std::string OutputInDepth(const unsigned long Depth) +{ + std::string output = ""; + for(unsigned long d=Depth; d > 0; d--) + output += " "; + return output; +} pkgDepCache::ActionGroup::ActionGroup(pkgDepCache &cache) : cache(cache), released(false) @@ -83,6 +90,8 @@ pkgDepCache::ActionGroup::~ActionGroup() pkgDepCache::pkgDepCache(pkgCache *pCache,Policy *Plcy) : group_level(0), Cache(pCache), PkgState(0), DepState(0) { + DebugMarker = _config->FindB("Debug::pkgDepCache::Marker", false); + DebugAutoInstall = _config->FindB("Debug::pkgDepCache::AutoInstall", false); delLocalPolicy = 0; LocalPolicy = Plcy; if (LocalPolicy == 0) @@ -705,7 +714,8 @@ void pkgDepCache::Update(PkgIterator const &Pkg) // DepCache::MarkKeep - Put the package in the keep state /*{{{*/ // --------------------------------------------------------------------- /* */ -void pkgDepCache::MarkKeep(PkgIterator const &Pkg, bool Soft, bool FromUser) +void pkgDepCache::MarkKeep(PkgIterator const &Pkg, bool Soft, bool FromUser, + unsigned long Depth) { // Simplifies other routines. if (Pkg.end() == true) @@ -746,6 +756,9 @@ void pkgDepCache::MarkKeep(PkgIterator const &Pkg, bool Soft, bool FromUser) P.Flags &= ~Flag::Auto; #endif + if (DebugMarker == true) + std::clog << OutputInDepth(Depth) << "MarkKeep " << Pkg << std::endl; + RemoveSizes(Pkg); RemoveStates(Pkg); @@ -765,7 +778,8 @@ void pkgDepCache::MarkKeep(PkgIterator const &Pkg, bool Soft, bool FromUser) // DepCache::MarkDelete - Put the package in the delete state /*{{{*/ // --------------------------------------------------------------------- /* */ -void pkgDepCache::MarkDelete(PkgIterator const &Pkg, bool rPurge) +void pkgDepCache::MarkDelete(PkgIterator const &Pkg, bool rPurge, + unsigned long Depth) { // Simplifies other routines. if (Pkg.end() == true) @@ -787,6 +801,9 @@ void pkgDepCache::MarkDelete(PkgIterator const &Pkg, bool rPurge) if (Pkg->VersionList == 0) return; + if (DebugMarker == true) + std::clog << OutputInDepth(Depth) << "MarkDelete " << Pkg << std::endl; + RemoveSizes(Pkg); RemoveStates(Pkg); @@ -826,7 +843,7 @@ void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst, P.CandidateVer == (Version *)Pkg.CurrentVer())) { if (P.CandidateVer == (Version *)Pkg.CurrentVer() && P.InstallVer == 0) - MarkKeep(Pkg, false, FromUser); + MarkKeep(Pkg, false, FromUser, Depth+1); return; } @@ -868,6 +885,9 @@ void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst, if (AutoInst == false) return; + if (DebugMarker == true) + std::clog << OutputInDepth(Depth) << "MarkInstall " << Pkg << std::endl; + DepIterator Dep = P.InstVerIter(*this).DependsList(); for (; Dep.end() != true;) { @@ -937,12 +957,12 @@ void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst, } } if(isNewImportantDep) - if(_config->FindB("Debug::pkgDepCache::AutoInstall",false) == true) - std::clog << "new important dependency: " + if(DebugAutoInstall == true) + std::clog << OutputInDepth(Depth) << "new important dependency: " << Start.TargetPkg().Name() << std::endl; if(isPreviouslySatisfiedImportantDep) - if(_config->FindB("Debug::pkgDepCache::AutoInstall", false) == true) - std::clog << "previously satisfied important dependency on " + if(DebugAutoInstall == true) + std::clog << OutputInDepth(Depth) << "previously satisfied important dependency on " << Start.TargetPkg().Name() << std::endl; // skip important deps if the package is already installed @@ -993,15 +1013,16 @@ void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst, if (InstPkg.end() == false) { - if(_config->FindB("Debug::pkgDepCache::AutoInstall",false) == true) - std::clog << "Installing " << InstPkg.Name() - << " as dep of " << Pkg.Name() + if(DebugAutoInstall == true) + std::clog << OutputInDepth(Depth) << "Installing " << InstPkg.Name() + << " as " << Start.DepType() << " of " << Pkg.Name() << std::endl; // now check if we should consider it a automatic dependency or not if(Pkg.Section() && ConfigValueInSubTree("APT::Never-MarkAuto-Sections", Pkg.Section())) { - if(_config->FindB("Debug::pkgDepCache::AutoInstall",false) == true) - std::clog << "Setting NOT as auto-installed (direct dep of pkg in APT::Never-MarkAuto-Sections)" << std::endl; + if(DebugAutoInstall == true) + std::clog << OutputInDepth(Depth) << "Setting NOT as auto-installed (direct " + << Start.DepType() << " of pkg in APT::Never-MarkAuto-Sections)" << std::endl; MarkInstall(InstPkg,true,Depth + 1, true); } else @@ -1028,7 +1049,7 @@ void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst, PkgIterator Pkg = Ver.ParentPkg(); if (Start->Type != Dep::DpkgBreaks) - MarkDelete(Pkg); + MarkDelete(Pkg,false,Depth + 1); else if (PkgState[Pkg->ID].CandidateVer != *I) MarkInstall(Pkg,true,Depth + 1, false, ForceImportantDeps); diff --git a/apt-pkg/depcache.h b/apt-pkg/depcache.h index f41ad17e9..2d33e21d7 100644 --- a/apt-pkg/depcache.h +++ b/apt-pkg/depcache.h @@ -294,7 +294,10 @@ class pkgDepCache : protected pkgCache::Namespace unsigned long iBrokenCount; unsigned long iPolicyBrokenCount; unsigned long iBadCount; - + + bool DebugMarker; + bool DebugAutoInstall; + Policy *delLocalPolicy; // For memory clean up.. Policy *LocalPolicy; @@ -387,8 +390,9 @@ class pkgDepCache : protected pkgCache::Namespace */ // @{ void MarkKeep(PkgIterator const &Pkg, bool Soft = false, - bool FromUser = true); - void MarkDelete(PkgIterator const &Pkg,bool Purge = false); + bool FromUser = true, unsigned long Depth = 0); + void MarkDelete(PkgIterator const &Pkg, bool Purge = false, + unsigned long Depth = 0); void MarkInstall(PkgIterator const &Pkg,bool AutoInst = true, unsigned long Depth = 0, bool FromUser = true, bool ForceImportantDeps = false); diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc index 81a254483..4e10093a8 100644 --- a/apt-pkg/pkgcache.cc +++ b/apt-pkg/pkgcache.cc @@ -21,6 +21,7 @@ /*}}}*/ // Include Files /*{{{*/ #include +#include #include #include #include @@ -290,6 +291,56 @@ pkgCache::PkgIterator::OkState pkgCache::PkgIterator::State() const return NeedsNothing; } /*}}}*/ +// PkgIterator::CandVersion - Returns the candidate version string /*{{{*/ +// --------------------------------------------------------------------- +/* Return string representing of the candidate version. */ +const char * +pkgCache::PkgIterator::CandVersion() const +{ + //TargetVer is empty, so don't use it. + VerIterator version = pkgPolicy::pkgPolicy(Owner).GetCandidateVer(*this); + if (version.IsGood()) + return version.VerStr(); + return 0; +}; + /*}}}*/ +// PkgIterator::CurVersion - Returns the current version string /*{{{*/ +// --------------------------------------------------------------------- +/* Return string representing of the current version. */ +const char * +pkgCache::PkgIterator::CurVersion() const +{ + VerIterator version = CurrentVer(); + if (version.IsGood()) + return CurrentVer().VerStr(); + return 0; +}; + /*}}}*/ +// ostream operator to handle string representation of a package /*{{{*/ +// --------------------------------------------------------------------- +/* Output name < cur.rent.version -> candid.ate.version | new.est.version > (section) + Note that the characters <|>() are all literal above. Versions will be ommited + if they provide no new information (e.g. there is no newer version than candidate) + If no version and/or section can be found "none" is used. */ +std::ostream& +operator<<(ostream& out, pkgCache::PkgIterator Pkg) +{ + if (Pkg.end() == true) + return out << "invalid package"; + + string current = string(Pkg.CurVersion() == 0 ? "none" : Pkg.CurVersion()); + string candidate = string(Pkg.CandVersion() == 0 ? "none" : Pkg.CandVersion()); + string newest = string(Pkg.VersionList().end() ? "none" : Pkg.VersionList().VerStr()); + + out << Pkg.Name() << " < " << current; + if (current != candidate) + out << " -> " << candidate; + if ( newest != "none" && candidate != newest) + out << " | " << newest; + out << " > ( " << string(Pkg.Section()==0?"none":Pkg.Section()) << " )"; + return out; +} + /*}}}*/ // DepIterator::IsCritical - Returns true if the dep is important /*{{{*/ // --------------------------------------------------------------------- /* Currently critical deps are defined as depends, predepends and diff --git a/debian/changelog b/debian/changelog index f1cb7bd0c..bb75ad8af 100644 --- a/debian/changelog +++ b/debian/changelog @@ -22,6 +22,10 @@ apt (0.7.22) UNRELEASED; urgency=low (closes: #189866) * [ABI break] Allow pinning by codename (closes: #97564) * support running "--simulate" as user + * add depth information to the debug output and show what depends + type triggers a autoinst (closes: #458389) + * add debug::pkgDepCache::Marker with more detailed debug output + (closes: #87520) [ Julian Andres Klode ] * apt-pkg/contrib/configuration.cc: Fix a small memory leak in diff --git a/doc/apt.conf.5.xml b/doc/apt.conf.5.xml index fb2be9a28..841bb8f66 100644 --- a/doc/apt.conf.5.xml +++ b/doc/apt.conf.5.xml @@ -679,6 +679,27 @@ DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt";}; + + Debug::pkgDepCache::Marker + + + Generate debug messages describing which package is marked + as keep/install/remove while the ProblemResolver does his work. + Each addition or deletion may trigger additional actions; + they are shown indented two additional space under the original entry. + The format for each line is MarkKeep, + MarkDelete or MarkInstall followed by + package-name <a.b.c -> d.e.f | x.y.z> (section) + where a.b.c is the current version of the package, + d.e.f is the version considered for installation and + x.y.z is a newer version, but not considered for installation + (because of a low pin score). The later two can be omitted if there is none or if + it is the same version as the installed. + section is the name of the section the package appears in. + + + + Debug::pkgInitConfig diff --git a/doc/examples/configure-index b/doc/examples/configure-index index 5f29a2d3f..dd8d667db 100644 --- a/doc/examples/configure-index +++ b/doc/examples/configure-index @@ -289,6 +289,7 @@ Debug { pkgProblemResolver "false"; pkgDepCache::AutoInstall "false"; // what packages apt install to satify dependencies + pkgDepCache::Marker "false"; pkgAcquire "false"; pkgAcquire::Worker "false"; pkgAcquire::Auth "false"; diff --git a/po/apt-all.pot b/po/apt-all.pot index ec87b27a3..2aa99cfa2 100644 --- a/po/apt-all.pot +++ b/po/apt-all.pot @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-11-12 22:07+0100\n" +"POT-Creation-Date: 2009-06-29 17:01+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -156,7 +156,7 @@ msgstr "" #: cmdline/apt-cache.cc:1714 cmdline/apt-cdrom.cc:138 cmdline/apt-config.cc:70 #: cmdline/apt-extracttemplates.cc:225 ftparchive/apt-ftparchive.cc:547 -#: cmdline/apt-get.cc:2573 cmdline/apt-sortpkgs.cc:144 +#: cmdline/apt-get.cc:2582 cmdline/apt-sortpkgs.cc:144 #, c-format msgid "%s %s for %s compiled on %s %s\n" msgstr "" @@ -554,7 +554,7 @@ msgstr "" msgid "Y" msgstr "" -#: cmdline/apt-get.cc:146 cmdline/apt-get.cc:1651 +#: cmdline/apt-get.cc:146 cmdline/apt-get.cc:1658 #, c-format msgid "Regex compilation error - %s" msgstr "" @@ -713,11 +713,11 @@ msgstr "" msgid "Internal error, Ordering didn't finish" msgstr "" -#: cmdline/apt-get.cc:809 cmdline/apt-get.cc:1992 cmdline/apt-get.cc:2025 +#: cmdline/apt-get.cc:809 cmdline/apt-get.cc:1999 cmdline/apt-get.cc:2032 msgid "Unable to lock the download directory" msgstr "" -#: cmdline/apt-get.cc:819 cmdline/apt-get.cc:2073 cmdline/apt-get.cc:2319 +#: cmdline/apt-get.cc:819 cmdline/apt-get.cc:2080 cmdline/apt-get.cc:2326 #: apt-pkg/cachefile.cc:65 msgid "The list of sources could not be read." msgstr "" @@ -746,7 +746,7 @@ msgstr "" msgid "After this operation, %sB disk space will be freed.\n" msgstr "" -#: cmdline/apt-get.cc:864 cmdline/apt-get.cc:2168 +#: cmdline/apt-get.cc:864 cmdline/apt-get.cc:2175 #, c-format msgid "Couldn't determine free space in %s" msgstr "" @@ -780,7 +780,7 @@ msgstr "" msgid "Do you want to continue [Y/n]? " msgstr "" -#: cmdline/apt-get.cc:984 cmdline/apt-get.cc:2216 apt-pkg/algorithms.cc:1349 +#: cmdline/apt-get.cc:984 cmdline/apt-get.cc:2223 apt-pkg/algorithms.cc:1349 #, c-format msgid "Failed to fetch %s %s\n" msgstr "" @@ -789,7 +789,7 @@ msgstr "" msgid "Some files failed to download" msgstr "" -#: cmdline/apt-get.cc:1003 cmdline/apt-get.cc:2225 +#: cmdline/apt-get.cc:1003 cmdline/apt-get.cc:2232 msgid "Download complete and in download only mode" msgstr "" @@ -881,29 +881,34 @@ msgstr "" msgid "Selected version %s (%s) for %s\n" msgstr "" -#: cmdline/apt-get.cc:1338 +#: cmdline/apt-get.cc:1307 +#, c-format +msgid "No source package '%s' picking '%s' instead\n" +msgstr "" + +#: cmdline/apt-get.cc:1345 msgid "The update command takes no arguments" msgstr "" -#: cmdline/apt-get.cc:1351 +#: cmdline/apt-get.cc:1358 msgid "Unable to lock the list directory" msgstr "" -#: cmdline/apt-get.cc:1403 +#: cmdline/apt-get.cc:1410 msgid "We are not supposed to delete stuff, can't start AutoRemover" msgstr "" -#: cmdline/apt-get.cc:1435 +#: cmdline/apt-get.cc:1442 msgid "" "The following packages were automatically installed and are no longer " "required:" msgstr "" -#: cmdline/apt-get.cc:1437 +#: cmdline/apt-get.cc:1444 msgid "Use 'apt-get autoremove' to remove them." msgstr "" -#: cmdline/apt-get.cc:1442 +#: cmdline/apt-get.cc:1449 msgid "" "Hmm, seems like the AutoRemover destroyed something which really\n" "shouldn't happen. Please file a bug report against apt." @@ -919,49 +924,49 @@ msgstr "" #. "that package should be filed.") << endl; #. } #. -#: cmdline/apt-get.cc:1445 cmdline/apt-get.cc:1735 +#: cmdline/apt-get.cc:1452 cmdline/apt-get.cc:1742 msgid "The following information may help to resolve the situation:" msgstr "" -#: cmdline/apt-get.cc:1449 +#: cmdline/apt-get.cc:1456 msgid "Internal Error, AutoRemover broke stuff" msgstr "" -#: cmdline/apt-get.cc:1468 +#: cmdline/apt-get.cc:1475 msgid "Internal error, AllUpgrade broke stuff" msgstr "" -#: cmdline/apt-get.cc:1523 +#: cmdline/apt-get.cc:1530 #, c-format msgid "Couldn't find task %s" msgstr "" -#: cmdline/apt-get.cc:1638 cmdline/apt-get.cc:1674 +#: cmdline/apt-get.cc:1645 cmdline/apt-get.cc:1681 #, c-format msgid "Couldn't find package %s" msgstr "" -#: cmdline/apt-get.cc:1661 +#: cmdline/apt-get.cc:1668 #, c-format msgid "Note, selecting %s for regex '%s'\n" msgstr "" -#: cmdline/apt-get.cc:1692 +#: cmdline/apt-get.cc:1699 #, c-format msgid "%s set to manually installed.\n" msgstr "" -#: cmdline/apt-get.cc:1705 +#: cmdline/apt-get.cc:1712 msgid "You might want to run `apt-get -f install' to correct these:" msgstr "" -#: cmdline/apt-get.cc:1708 +#: cmdline/apt-get.cc:1715 msgid "" "Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a " "solution)." msgstr "" -#: cmdline/apt-get.cc:1720 +#: cmdline/apt-get.cc:1727 msgid "" "Some packages could not be installed. This may mean that you have\n" "requested an impossible situation or if you are using the unstable\n" @@ -969,152 +974,152 @@ msgid "" "or been moved out of Incoming." msgstr "" -#: cmdline/apt-get.cc:1738 +#: cmdline/apt-get.cc:1745 msgid "Broken packages" msgstr "" -#: cmdline/apt-get.cc:1767 +#: cmdline/apt-get.cc:1774 msgid "The following extra packages will be installed:" msgstr "" -#: cmdline/apt-get.cc:1856 +#: cmdline/apt-get.cc:1863 msgid "Suggested packages:" msgstr "" -#: cmdline/apt-get.cc:1857 +#: cmdline/apt-get.cc:1864 msgid "Recommended packages:" msgstr "" -#: cmdline/apt-get.cc:1885 +#: cmdline/apt-get.cc:1892 msgid "Calculating upgrade... " msgstr "" -#: cmdline/apt-get.cc:1888 methods/ftp.cc:702 methods/connect.cc:112 +#: cmdline/apt-get.cc:1895 methods/ftp.cc:702 methods/connect.cc:112 msgid "Failed" msgstr "" -#: cmdline/apt-get.cc:1893 +#: cmdline/apt-get.cc:1900 msgid "Done" msgstr "" -#: cmdline/apt-get.cc:1960 cmdline/apt-get.cc:1968 +#: cmdline/apt-get.cc:1967 cmdline/apt-get.cc:1975 msgid "Internal error, problem resolver broke stuff" msgstr "" -#: cmdline/apt-get.cc:2068 +#: cmdline/apt-get.cc:2075 msgid "Must specify at least one package to fetch source for" msgstr "" -#: cmdline/apt-get.cc:2098 cmdline/apt-get.cc:2337 +#: cmdline/apt-get.cc:2105 cmdline/apt-get.cc:2344 #, c-format msgid "Unable to find a source package for %s" msgstr "" -#: cmdline/apt-get.cc:2147 +#: cmdline/apt-get.cc:2154 #, c-format msgid "Skipping already downloaded file '%s'\n" msgstr "" -#: cmdline/apt-get.cc:2175 +#: cmdline/apt-get.cc:2182 #, c-format msgid "You don't have enough free space in %s" msgstr "" -#: cmdline/apt-get.cc:2181 +#: cmdline/apt-get.cc:2188 #, c-format msgid "Need to get %sB/%sB of source archives.\n" msgstr "" -#: cmdline/apt-get.cc:2184 +#: cmdline/apt-get.cc:2191 #, c-format msgid "Need to get %sB of source archives.\n" msgstr "" -#: cmdline/apt-get.cc:2190 +#: cmdline/apt-get.cc:2197 #, c-format msgid "Fetch source %s\n" msgstr "" -#: cmdline/apt-get.cc:2221 +#: cmdline/apt-get.cc:2228 msgid "Failed to fetch some archives." msgstr "" -#: cmdline/apt-get.cc:2249 +#: cmdline/apt-get.cc:2256 #, c-format msgid "Skipping unpack of already unpacked source in %s\n" msgstr "" -#: cmdline/apt-get.cc:2261 +#: cmdline/apt-get.cc:2268 #, c-format msgid "Unpack command '%s' failed.\n" msgstr "" -#: cmdline/apt-get.cc:2262 +#: cmdline/apt-get.cc:2269 #, c-format msgid "Check if the 'dpkg-dev' package is installed.\n" msgstr "" -#: cmdline/apt-get.cc:2279 +#: cmdline/apt-get.cc:2286 #, c-format msgid "Build command '%s' failed.\n" msgstr "" -#: cmdline/apt-get.cc:2298 +#: cmdline/apt-get.cc:2305 msgid "Child process failed" msgstr "" -#: cmdline/apt-get.cc:2314 +#: cmdline/apt-get.cc:2321 msgid "Must specify at least one package to check builddeps for" msgstr "" -#: cmdline/apt-get.cc:2342 +#: cmdline/apt-get.cc:2349 #, c-format msgid "Unable to get build-dependency information for %s" msgstr "" -#: cmdline/apt-get.cc:2362 +#: cmdline/apt-get.cc:2369 #, c-format msgid "%s has no build depends.\n" msgstr "" -#: cmdline/apt-get.cc:2414 +#: cmdline/apt-get.cc:2421 #, c-format msgid "" "%s dependency for %s cannot be satisfied because the package %s cannot be " "found" msgstr "" -#: cmdline/apt-get.cc:2467 +#: cmdline/apt-get.cc:2474 #, c-format msgid "" "%s dependency for %s cannot be satisfied because no available versions of " "package %s can satisfy version requirements" msgstr "" -#: cmdline/apt-get.cc:2503 +#: cmdline/apt-get.cc:2510 #, c-format msgid "Failed to satisfy %s dependency for %s: Installed package %s is too new" msgstr "" -#: cmdline/apt-get.cc:2528 +#: cmdline/apt-get.cc:2537 #, c-format msgid "Failed to satisfy %s dependency for %s: %s" msgstr "" -#: cmdline/apt-get.cc:2542 +#: cmdline/apt-get.cc:2551 #, c-format msgid "Build-dependencies for %s could not be satisfied." msgstr "" -#: cmdline/apt-get.cc:2546 +#: cmdline/apt-get.cc:2555 msgid "Failed to process build dependencies" msgstr "" -#: cmdline/apt-get.cc:2578 +#: cmdline/apt-get.cc:2587 msgid "Supported modules:" msgstr "" -#: cmdline/apt-get.cc:2619 +#: cmdline/apt-get.cc:2628 msgid "" "Usage: apt-get [options] command\n" " apt-get [options] install|remove pkg1 [pkg2 ...]\n" @@ -1130,7 +1135,7 @@ msgid "" " install - Install new packages (pkg is libc6 not libc6.deb)\n" " remove - Remove packages\n" " autoremove - Remove automatically all unused packages\n" -" purge - Remove and purge packages\n" +" purge - Remove packages and config files\n" " source - Download source archives\n" " build-dep - Configure build-dependencies for source packages\n" " dist-upgrade - Distribution upgrade, see apt-get(8)\n" @@ -1158,6 +1163,14 @@ msgid "" " This APT has Super Cow Powers.\n" msgstr "" +#: cmdline/apt-get.cc:2795 +msgid "" +"NOTE: This is only a simulation!\n" +" apt-get needs root privileges for real execution.\n" +" Keep also in mind that locking is deactivated,\n" +" so don't depend on the relevance to the real current situation!" +msgstr "" + #: cmdline/acqprogress.cc:55 msgid "Hit " msgstr "" @@ -1373,7 +1386,7 @@ msgstr "" msgid "File %s/%s overwrites the one in the package %s" msgstr "" -#: apt-inst/extract.cc:464 apt-pkg/contrib/configuration.cc:821 +#: apt-inst/extract.cc:464 apt-pkg/contrib/configuration.cc:822 #: apt-pkg/contrib/cdromutl.cc:150 apt-pkg/sourcelist.cc:320 #: apt-pkg/acquire.cc:418 apt-pkg/clean.cc:34 #, c-format @@ -1666,7 +1679,7 @@ msgstr "" msgid "Unable to accept connection" msgstr "" -#: methods/ftp.cc:864 methods/http.cc:960 methods/rsh.cc:303 +#: methods/ftp.cc:864 methods/http.cc:991 methods/rsh.cc:303 msgid "Problem hashing file" msgstr "" @@ -1750,38 +1763,38 @@ msgstr "" msgid "Unable to connect to %s %s:" msgstr "" -#: methods/gpgv.cc:65 +#: methods/gpgv.cc:71 #, c-format msgid "Couldn't access keyring: '%s'" msgstr "" -#: methods/gpgv.cc:101 +#: methods/gpgv.cc:107 msgid "E: Argument list from Acquire::gpgv::Options too long. Exiting." msgstr "" -#: methods/gpgv.cc:205 +#: methods/gpgv.cc:223 msgid "" "Internal error: Good signature, but could not determine key fingerprint?!" msgstr "" -#: methods/gpgv.cc:210 +#: methods/gpgv.cc:228 msgid "At least one invalid signature was encountered." msgstr "" -#: methods/gpgv.cc:214 +#: methods/gpgv.cc:232 #, c-format msgid "Could not execute '%s' to verify signature (is gpgv installed?)" msgstr "" -#: methods/gpgv.cc:219 +#: methods/gpgv.cc:237 msgid "Unknown error executing gpgv" msgstr "" -#: methods/gpgv.cc:250 +#: methods/gpgv.cc:271 methods/gpgv.cc:278 msgid "The following signatures were invalid:\n" msgstr "" -#: methods/gpgv.cc:257 +#: methods/gpgv.cc:285 msgid "" "The following signatures couldn't be verified because the public key is not " "available:\n" @@ -1797,80 +1810,80 @@ msgstr "" msgid "Read error from %s process" msgstr "" -#: methods/http.cc:377 +#: methods/http.cc:379 msgid "Waiting for headers" msgstr "" -#: methods/http.cc:523 +#: methods/http.cc:525 #, c-format msgid "Got a single header line over %u chars" msgstr "" -#: methods/http.cc:531 +#: methods/http.cc:533 msgid "Bad header line" msgstr "" -#: methods/http.cc:550 methods/http.cc:557 +#: methods/http.cc:552 methods/http.cc:559 msgid "The HTTP server sent an invalid reply header" msgstr "" -#: methods/http.cc:586 +#: methods/http.cc:588 msgid "The HTTP server sent an invalid Content-Length header" msgstr "" -#: methods/http.cc:601 +#: methods/http.cc:603 msgid "The HTTP server sent an invalid Content-Range header" msgstr "" -#: methods/http.cc:603 +#: methods/http.cc:605 msgid "This HTTP server has broken range support" msgstr "" -#: methods/http.cc:627 +#: methods/http.cc:629 msgid "Unknown date format" msgstr "" -#: methods/http.cc:774 +#: methods/http.cc:782 msgid "Select failed" msgstr "" -#: methods/http.cc:779 +#: methods/http.cc:787 msgid "Connection timed out" msgstr "" -#: methods/http.cc:802 +#: methods/http.cc:810 msgid "Error writing to output file" msgstr "" -#: methods/http.cc:833 +#: methods/http.cc:841 msgid "Error writing to file" msgstr "" -#: methods/http.cc:861 +#: methods/http.cc:869 msgid "Error writing to the file" msgstr "" -#: methods/http.cc:875 +#: methods/http.cc:883 msgid "Error reading from server. Remote end closed connection" msgstr "" -#: methods/http.cc:877 +#: methods/http.cc:885 msgid "Error reading from server" msgstr "" -#: methods/http.cc:945 apt-pkg/contrib/mmap.cc:196 +#: methods/http.cc:976 apt-pkg/contrib/mmap.cc:196 msgid "Failed to truncate file" msgstr "" -#: methods/http.cc:1105 +#: methods/http.cc:1141 msgid "Bad header data" msgstr "" -#: methods/http.cc:1122 methods/http.cc:1177 +#: methods/http.cc:1158 methods/http.cc:1213 msgid "Connection failed" msgstr "" -#: methods/http.cc:1229 +#: methods/http.cc:1305 msgid "Internal error" msgstr "" @@ -1890,7 +1903,31 @@ msgid "" "Current value: %lu. (man 5 apt.conf)" msgstr "" -#: apt-pkg/contrib/strutl.cc:1014 +#. d means days, h means hours, min means minutes, s means seconds +#: apt-pkg/contrib/strutl.cc:335 +#, c-format +msgid "%lid %lih %limin %lis" +msgstr "" + +#. h means hours, min means minutes, s means seconds +#: apt-pkg/contrib/strutl.cc:342 +#, c-format +msgid "%lih %limin %lis" +msgstr "" + +#. min means minutes, s means seconds +#: apt-pkg/contrib/strutl.cc:349 +#, c-format +msgid "%limin %lis" +msgstr "" + +#. s means seconds +#: apt-pkg/contrib/strutl.cc:354 +#, c-format +msgid "%lis" +msgstr "" + +#: apt-pkg/contrib/strutl.cc:1018 #, c-format msgid "Selection %s not found" msgstr "" @@ -1905,42 +1942,42 @@ msgstr "" msgid "Opening configuration file %s" msgstr "" -#: apt-pkg/contrib/configuration.cc:662 +#: apt-pkg/contrib/configuration.cc:663 #, c-format msgid "Syntax error %s:%u: Block starts with no name." msgstr "" -#: apt-pkg/contrib/configuration.cc:681 +#: apt-pkg/contrib/configuration.cc:682 #, c-format msgid "Syntax error %s:%u: Malformed tag" msgstr "" -#: apt-pkg/contrib/configuration.cc:698 +#: apt-pkg/contrib/configuration.cc:699 #, c-format msgid "Syntax error %s:%u: Extra junk after value" msgstr "" -#: apt-pkg/contrib/configuration.cc:738 +#: apt-pkg/contrib/configuration.cc:739 #, c-format msgid "Syntax error %s:%u: Directives can only be done at the top level" msgstr "" -#: apt-pkg/contrib/configuration.cc:745 +#: apt-pkg/contrib/configuration.cc:746 #, c-format msgid "Syntax error %s:%u: Too many nested includes" msgstr "" -#: apt-pkg/contrib/configuration.cc:749 apt-pkg/contrib/configuration.cc:754 +#: apt-pkg/contrib/configuration.cc:750 apt-pkg/contrib/configuration.cc:755 #, c-format msgid "Syntax error %s:%u: Included from here" msgstr "" -#: apt-pkg/contrib/configuration.cc:758 +#: apt-pkg/contrib/configuration.cc:759 #, c-format msgid "Syntax error %s:%u: Unsupported directive '%s'" msgstr "" -#: apt-pkg/contrib/configuration.cc:809 +#: apt-pkg/contrib/configuration.cc:810 #, c-format msgid "Syntax error %s:%u: Extra junk at end of file" msgstr "" @@ -2083,101 +2120,105 @@ msgstr "" msgid "Problem syncing the file" msgstr "" -#: apt-pkg/pkgcache.cc:132 +#: apt-pkg/pkgcache.cc:133 msgid "Empty package cache" msgstr "" -#: apt-pkg/pkgcache.cc:138 +#: apt-pkg/pkgcache.cc:139 msgid "The package cache file is corrupted" msgstr "" -#: apt-pkg/pkgcache.cc:143 +#: apt-pkg/pkgcache.cc:144 msgid "The package cache file is an incompatible version" msgstr "" -#: apt-pkg/pkgcache.cc:148 +#: apt-pkg/pkgcache.cc:149 #, c-format msgid "This APT does not support the versioning system '%s'" msgstr "" -#: apt-pkg/pkgcache.cc:153 +#: apt-pkg/pkgcache.cc:154 msgid "The package cache was built for a different architecture" msgstr "" -#: apt-pkg/pkgcache.cc:224 +#: apt-pkg/pkgcache.cc:225 msgid "Depends" msgstr "" -#: apt-pkg/pkgcache.cc:224 +#: apt-pkg/pkgcache.cc:225 msgid "PreDepends" msgstr "" -#: apt-pkg/pkgcache.cc:224 +#: apt-pkg/pkgcache.cc:225 msgid "Suggests" msgstr "" -#: apt-pkg/pkgcache.cc:225 +#: apt-pkg/pkgcache.cc:226 msgid "Recommends" msgstr "" -#: apt-pkg/pkgcache.cc:225 +#: apt-pkg/pkgcache.cc:226 msgid "Conflicts" msgstr "" -#: apt-pkg/pkgcache.cc:225 +#: apt-pkg/pkgcache.cc:226 msgid "Replaces" msgstr "" -#: apt-pkg/pkgcache.cc:226 +#: apt-pkg/pkgcache.cc:227 msgid "Obsoletes" msgstr "" -#: apt-pkg/pkgcache.cc:226 +#: apt-pkg/pkgcache.cc:227 msgid "Breaks" msgstr "" -#: apt-pkg/pkgcache.cc:237 +#: apt-pkg/pkgcache.cc:227 +msgid "Enhances" +msgstr "" + +#: apt-pkg/pkgcache.cc:238 msgid "important" msgstr "" -#: apt-pkg/pkgcache.cc:237 +#: apt-pkg/pkgcache.cc:238 msgid "required" msgstr "" -#: apt-pkg/pkgcache.cc:237 +#: apt-pkg/pkgcache.cc:238 msgid "standard" msgstr "" -#: apt-pkg/pkgcache.cc:238 +#: apt-pkg/pkgcache.cc:239 msgid "optional" msgstr "" -#: apt-pkg/pkgcache.cc:238 +#: apt-pkg/pkgcache.cc:239 msgid "extra" msgstr "" -#: apt-pkg/depcache.cc:121 apt-pkg/depcache.cc:150 +#: apt-pkg/depcache.cc:130 apt-pkg/depcache.cc:159 msgid "Building dependency tree" msgstr "" -#: apt-pkg/depcache.cc:122 +#: apt-pkg/depcache.cc:131 msgid "Candidate versions" msgstr "" -#: apt-pkg/depcache.cc:151 +#: apt-pkg/depcache.cc:160 msgid "Dependency generation" msgstr "" -#: apt-pkg/depcache.cc:172 apt-pkg/depcache.cc:191 apt-pkg/depcache.cc:195 +#: apt-pkg/depcache.cc:181 apt-pkg/depcache.cc:200 apt-pkg/depcache.cc:204 msgid "Reading state information" msgstr "" -#: apt-pkg/depcache.cc:219 +#: apt-pkg/depcache.cc:228 #, c-format msgid "Failed to open StateFile %s" msgstr "" -#: apt-pkg/depcache.cc:225 +#: apt-pkg/depcache.cc:234 #, c-format msgid "Failed to write temporary StateFile %s" msgstr "" @@ -2309,7 +2350,7 @@ msgstr "" msgid "Method %s did not start correctly" msgstr "" -#: apt-pkg/acquire-worker.cc:399 +#: apt-pkg/acquire-worker.cc:413 #, c-format msgid "Please insert the disc labeled: '%s' in the drive '%s' and press enter." msgstr "" @@ -2340,16 +2381,16 @@ msgstr "" msgid "You may want to run apt-get update to correct these problems" msgstr "" -#: apt-pkg/policy.cc:267 +#: apt-pkg/policy.cc:281 msgid "Invalid record in the preferences file, no Package header" msgstr "" -#: apt-pkg/policy.cc:289 +#: apt-pkg/policy.cc:303 #, c-format msgid "Did not understand pin type %s" msgstr "" -#: apt-pkg/policy.cc:297 +#: apt-pkg/policy.cc:311 msgid "No priority (or zero) specified for pin" msgstr "" @@ -2660,10 +2701,14 @@ msgstr "" msgid "Completely removed %s" msgstr "" -#: apt-pkg/deb/dpkgpm.cc:791 +#: apt-pkg/deb/dpkgpm.cc:789 msgid "Can not write log, openpty() failed (/dev/pts not mounted?)\n" msgstr "" +#: apt-pkg/deb/debsystem.cc:100 +msgid "Not locked" +msgstr "" + #: methods/rred.cc:219 msgid "Could not patch file" msgstr "" -- cgit v1.2.3-70-g09d2 From 8b4894fe9e917409f3ea4cbb189c1648f2cea4df Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 29 Jun 2009 18:07:30 +0200 Subject: * add Debug::pkgDepCache::Marker with more detailed debug output * add Debug::pkgProblemResolver::ShowScores and make the scores adjustable --- apt-pkg/algorithms.cc | 91 +++++++++++++++++++++++++++++++------------- debian/changelog | 4 +- doc/apt.conf.5.xml | 11 ++++++ doc/examples/configure-index | 1 + po/apt-all.pot | 8 ++-- 5 files changed, 84 insertions(+), 31 deletions(-) (limited to 'debian') diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc index bd33d5ef1..4b1bb4430 100644 --- a/apt-pkg/algorithms.cc +++ b/apt-pkg/algorithms.cc @@ -489,6 +489,34 @@ void pkgProblemResolver::MakeScores() unsigned long Size = Cache.Head().PackageCount; memset(Scores,0,sizeof(*Scores)*Size); + // Important Required Standard Optional Extra + signed short PrioMap[] = { + 0, + _config->FindI("pkgProblemResolver::Scores::Important",3), + _config->FindI("pkgProblemResolver::Scores::Required",2), + _config->FindI("pkgProblemResolver::Scores::Standard",1), + _config->FindI("pkgProblemResolver::Scores::Optional",-1), + _config->FindI("pkgProblemResolver::Scores::Extra",-2) + }; + signed short PrioEssentials = _config->FindI("pkgProblemResolver::Scores::Essentials",100); + signed short PrioInstalledAndNotObsolete = _config->FindI("pkgProblemResolver::Scores::NotObsolete",1); + signed short PrioDepends = _config->FindI("pkgProblemResolver::Scores::Depends",1); + signed short AddProtected = _config->FindI("pkgProblemResolver::Scores::AddProtected",10000); + signed short AddEssential = _config->FindI("pkgProblemResolver::Scores::AddEssential",5000); + + if (_config->FindB("Debug::pkgProblemResolver::ShowScores",false) == true) + clog << "Settings used to calculate pkgProblemResolver::Scores::" << endl + << " Important => " << PrioMap[1] << endl + << " Required => " << PrioMap[2] << endl + << " Standard => " << PrioMap[3] << endl + << " Optional => " << PrioMap[4] << endl + << " Extra => " << PrioMap[5] << endl + << " Essentials => " << PrioEssentials << endl + << " InstalledAndNotObsolete => " << PrioInstalledAndNotObsolete << endl + << " Depends => " << PrioDepends << endl + << " AddProtected => " << AddProtected << endl + << " AddEssential => " << AddEssential << endl; + // Generate the base scores for a package based on its properties for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; I++) { @@ -502,11 +530,9 @@ void pkgProblemResolver::MakeScores() to allow an obsolete essential packages to be removed by a conflicts on a powerfull normal package (ie libc6) */ if ((I->Flags & pkgCache::Flag::Essential) == pkgCache::Flag::Essential) - Score += 100; + Score += PrioEssentials; // We transform the priority - // Important Required Standard Optional Extra - signed short PrioMap[] = {0,3,2,1,-1,-2}; if (Cache[I].InstVerIter(Cache)->Priority <= 5) Score += PrioMap[Cache[I].InstVerIter(Cache)->Priority]; @@ -515,7 +541,7 @@ void pkgProblemResolver::MakeScores() if those are not obsolete */ if (I->CurrentVer != 0 && Cache[I].CandidateVer != 0 && Cache[I].CandidateVerIter(Cache).Downloadable()) - Score += 1; + Score += PrioInstalledAndNotObsolete; } // Now that we have the base scores we go and propogate dependencies @@ -527,7 +553,7 @@ void pkgProblemResolver::MakeScores() for (pkgCache::DepIterator D = Cache[I].InstVerIter(Cache).DependsList(); D.end() == false; D++) { if (D->Type == pkgCache::Dep::Depends || D->Type == pkgCache::Dep::PreDepends) - Scores[D.TargetPkg()->ID]++; + Scores[D.TargetPkg()->ID]+= PrioDepends; } } @@ -572,10 +598,10 @@ void pkgProblemResolver::MakeScores() for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; I++) { if ((Flags[I->ID] & Protected) != 0) - Scores[I->ID] += 10000; + Scores[I->ID] += AddProtected; if ((I->Flags & pkgCache::Flag::Essential) == pkgCache::Flag::Essential) - Scores[I->ID] += 5000; - } + Scores[I->ID] += AddEssential; + } } /*}}}*/ // ProblemResolver::DoUpgrade - Attempt to upgrade this package /*{{{*/ @@ -751,19 +777,21 @@ bool pkgProblemResolver::Resolve(bool BrokenFix) *PEnd++ = I; This = this; qsort(PList,PEnd - PList,sizeof(*PList),&ScoreSort); - -/* for (pkgCache::Package **K = PList; K != PEnd; K++) - if (Scores[(*K)->ID] != 0) - { - pkgCache::PkgIterator Pkg(Cache,*K); - clog << Scores[(*K)->ID] << ' ' << Pkg.Name() << - ' ' << (pkgCache::Version *)Pkg.CurrentVer() << ' ' << - Cache[Pkg].InstallVer << ' ' << Cache[Pkg].CandidateVer << endl; - } */ + + if (_config->FindB("Debug::pkgProblemResolver::ShowScores",false) == true) + { + clog << "Show Scores" << endl; + for (pkgCache::Package **K = PList; K != PEnd; K++) + if (Scores[(*K)->ID] != 0) + { + pkgCache::PkgIterator Pkg(Cache,*K); + clog << Scores[(*K)->ID] << ' ' << Pkg << std::endl; + } + } if (Debug == true) clog << "Starting 2" << endl; - + /* Now consider all broken packages. For each broken package we either remove the package or fix it's problem. We do this once, it should not be possible for a loop to form (that is a < b < c and fixing b by @@ -878,7 +906,7 @@ bool pkgProblemResolver::Resolve(bool BrokenFix) } if (Debug == true) - clog << "Package " << I.Name() << " has broken dep on " << Start.TargetPkg().Name() << endl; + clog << "Package " << I.Name() << " has broken " << Start.DepType() << " on " << Start.TargetPkg().Name() << endl; /* Look across the version list. If there are no possible targets then we keep the package and bail. This is necessary @@ -1137,9 +1165,6 @@ bool pkgProblemResolver::ResolveByKeep() unsigned long Size = Cache.Head().PackageCount; - if (Debug == true) - clog << "Entering ResolveByKeep" << endl; - MakeScores(); /* We have to order the packages so that the broken fixing pass @@ -1152,7 +1177,21 @@ bool pkgProblemResolver::ResolveByKeep() *PEnd++ = I; This = this; qsort(PList,PEnd - PList,sizeof(*PList),&ScoreSort); - + + if (_config->FindB("Debug::pkgProblemResolver::ShowScores",false) == true) + { + clog << "Show Scores" << endl; + for (pkgCache::Package **K = PList; K != PEnd; K++) + if (Scores[(*K)->ID] != 0) + { + pkgCache::PkgIterator Pkg(Cache,*K); + clog << Scores[(*K)->ID] << ' ' << Pkg << std::endl; + } + } + + if (Debug == true) + clog << "Entering ResolveByKeep" << endl; + // Consider each broken package pkgCache::Package **LastStop = 0; for (pkgCache::Package **K = PList; K != PEnd; K++) @@ -1198,8 +1237,8 @@ bool pkgProblemResolver::ResolveByKeep() while (true) { if (Debug == true) - clog << "Package " << I.Name() << " has broken dep on " << Start.TargetPkg().Name() << endl; - + clog << "Package " << I.Name() << " has broken " << Start.DepType() << " on " << Start.TargetPkg().Name() << endl; + // Look at all the possible provides on this package SPtrArray VList = Start.AllTargets(); for (pkgCache::Version **V = VList; *V != 0; V++) @@ -1215,7 +1254,7 @@ bool pkgProblemResolver::ResolveByKeep() if ((Flags[I->ID] & Protected) == 0) { if (Debug == true) - clog << " Keeping Package " << Pkg.Name() << " due to dep" << endl; + clog << " Keeping Package " << Pkg.Name() << " due to " << Start.DepType() << endl; Cache.MarkKeep(Pkg, false, false); } diff --git a/debian/changelog b/debian/changelog index bb75ad8af..d1959c074 100644 --- a/debian/changelog +++ b/debian/changelog @@ -24,8 +24,10 @@ apt (0.7.22) UNRELEASED; urgency=low * support running "--simulate" as user * add depth information to the debug output and show what depends type triggers a autoinst (closes: #458389) - * add debug::pkgDepCache::Marker with more detailed debug output + * add Debug::pkgDepCache::Marker with more detailed debug output (closes: #87520) + * add Debug::pkgProblemResolver::ShowScores and make the scores + adjustable [ Julian Andres Klode ] * apt-pkg/contrib/configuration.cc: Fix a small memory leak in diff --git a/doc/apt.conf.5.xml b/doc/apt.conf.5.xml index 841bb8f66..eece75d28 100644 --- a/doc/apt.conf.5.xml +++ b/doc/apt.conf.5.xml @@ -777,6 +777,17 @@ DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt";}; + + Debug::pkgProblemResolver::ShowScores + + + Display a list of all installed packages with their calculated score + used by the pkgProblemResolver. The description of the package + is the same as described in Debug::pkgDepCache::Marker + + + + Debug::sourceList diff --git a/doc/examples/configure-index b/doc/examples/configure-index index dd8d667db..cea0dcc09 100644 --- a/doc/examples/configure-index +++ b/doc/examples/configure-index @@ -288,6 +288,7 @@ DPkg Debug { pkgProblemResolver "false"; + pkgProblemResolver::ShowScores "false"; pkgDepCache::AutoInstall "false"; // what packages apt install to satify dependencies pkgDepCache::Marker "false"; pkgAcquire "false"; diff --git a/po/apt-all.pot b/po/apt-all.pot index 2aa99cfa2..a1d7cb99d 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:984 cmdline/apt-get.cc:2223 apt-pkg/algorithms.cc:1349 +#: cmdline/apt-get.cc:984 cmdline/apt-get.cc:2223 apt-pkg/algorithms.cc:1388 #, 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:1107 +#: apt-pkg/algorithms.cc:1135 msgid "" "Error, pkgProblemResolver::Resolve generated breaks, this may be caused by " "held packages." msgstr "" -#: apt-pkg/algorithms.cc:1109 +#: apt-pkg/algorithms.cc:1137 msgid "Unable to correct problems, you have held broken packages." msgstr "" -#: apt-pkg/algorithms.cc:1375 apt-pkg/algorithms.cc:1377 +#: apt-pkg/algorithms.cc:1414 apt-pkg/algorithms.cc:1416 msgid "" "Some index files failed to download, they have been ignored, or old ones " "used instead." -- cgit v1.2.3-70-g09d2 From 9964a721855b74b4f6008d30ebc637198776ca04 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 29 Jun 2009 18:13:23 +0200 Subject: do not write state file in simulate mode (closes: #433007) --- cmdline/apt-get.cc | 3 ++- debian/changelog | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index faad2ed6b..93b3a83dc 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1870,7 +1870,8 @@ bool DoInstall(CommandLine &CmdL) // cache.commit() if (AutoMarkChanged > 0 && Cache->DelCount() == 0 && Cache->InstCount() == 0 && - Cache->BadCount() == 0) + Cache->BadCount() == 0 && + _config->FindB("APT::Get::Simulate",false) == false) Cache->writeStateFile(NULL); // See if we need to prompt diff --git a/debian/changelog b/debian/changelog index d1959c074..dd79639c6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -28,6 +28,7 @@ apt (0.7.22) UNRELEASED; urgency=low (closes: #87520) * add Debug::pkgProblemResolver::ShowScores and make the scores adjustable + * do not write state file in simulate mode (closes: #433007) [ Julian Andres Klode ] * apt-pkg/contrib/configuration.cc: Fix a small memory leak in -- 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 'debian') 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 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 'debian') 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 'debian') 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 7a9f09bd66d51b92bb68f07e7fbc111df6206c93 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 30 Jun 2009 14:11:31 +0200 Subject: merged r1811..1815 from lp:~donkult/apt/experimental --- apt-pkg/deb/debmetaindex.cc | 7 ++ apt-pkg/deb/debmetaindex.h | 1 + apt-pkg/deb/debsrcrecords.cc | 8 ++ apt-pkg/deb/debsrcrecords.h | 1 + apt-pkg/metaindex.h | 8 +- cmdline/apt-get.cc | 3 + debian/control | 2 +- po/apt-all.pot | 270 +++++++++++++++++++++---------------------- 8 files changed, 163 insertions(+), 137 deletions(-) (limited to 'debian') diff --git a/apt-pkg/deb/debmetaindex.cc b/apt-pkg/deb/debmetaindex.cc index ee035191f..f3ab6960c 100644 --- a/apt-pkg/deb/debmetaindex.cc +++ b/apt-pkg/deb/debmetaindex.cc @@ -115,6 +115,13 @@ debReleaseIndex::debReleaseIndex(string URI,string Dist) this->Type = "deb"; } +debReleaseIndex::~debReleaseIndex() +{ + for (vector::const_iterator I = SectionEntries.begin(); + I != SectionEntries.end(); I++) + delete *I; +} + vector * debReleaseIndex::ComputeIndexTargets() const { vector * IndexTargets = new vector ; diff --git a/apt-pkg/deb/debmetaindex.h b/apt-pkg/deb/debmetaindex.h index c021a1b5a..8e6a1463b 100644 --- a/apt-pkg/deb/debmetaindex.h +++ b/apt-pkg/deb/debmetaindex.h @@ -22,6 +22,7 @@ class debReleaseIndex : public metaIndex { public: debReleaseIndex(string URI, string Dist); + ~debReleaseIndex(); virtual string ArchiveURI(string File) const {return URI + File;}; virtual bool GetIndexes(pkgAcquire *Owner, bool GetAll=false) const; diff --git a/apt-pkg/deb/debsrcrecords.cc b/apt-pkg/deb/debsrcrecords.cc index ace4e00b5..2f87c767b 100644 --- a/apt-pkg/deb/debsrcrecords.cc +++ b/apt-pkg/deb/debsrcrecords.cc @@ -152,3 +152,11 @@ bool debSrcRecordParser::Files(vector &List) return true; } /*}}}*/ +// SrcRecordParser::~SrcRecordParser - Destructor /*{{{*/ +// --------------------------------------------------------------------- +/* */ +debSrcRecordParser::~debSrcRecordParser() +{ + delete[] Buffer; +} + /*}}}*/ diff --git a/apt-pkg/deb/debsrcrecords.h b/apt-pkg/deb/debsrcrecords.h index 8b1237ccd..a3b5a8286 100644 --- a/apt-pkg/deb/debsrcrecords.h +++ b/apt-pkg/deb/debsrcrecords.h @@ -50,6 +50,7 @@ class debSrcRecordParser : public pkgSrcRecords::Parser debSrcRecordParser(string File,pkgIndexFile const *Index) : Parser(Index), Fd(File,FileFd::ReadOnly), Tags(&Fd,102400), Buffer(0), BufSize(0) {} + ~debSrcRecordParser(); }; #endif diff --git a/apt-pkg/metaindex.h b/apt-pkg/metaindex.h index 2b87d7da9..779b6ab14 100644 --- a/apt-pkg/metaindex.h +++ b/apt-pkg/metaindex.h @@ -39,7 +39,13 @@ class metaIndex virtual vector *GetIndexFiles() = 0; virtual bool IsTrusted() const = 0; - virtual ~metaIndex() {}; + virtual ~metaIndex() { + if (Indexes == 0) + return; + for (vector::iterator I = (*Indexes).begin(); I != (*Indexes).end(); ++I) + delete *I; + delete Indexes; + } }; #endif diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 93b3a83dc..f5642c04d 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -111,6 +111,9 @@ class CacheFile : public pkgCacheFile return Open(true); } CacheFile() : List(0) {}; + ~CacheFile() { + delete[] List; + } }; /*}}}*/ diff --git a/debian/control b/debian/control index ba9e32e4b..8f5d6ff75 100644 --- a/debian/control +++ b/debian/control @@ -5,7 +5,7 @@ Maintainer: APT Development Team Uploaders: Michael Vogt , Otavio Salvador , Christian Perrier , Daniel Burrows , Luca Bruno , Eugene V. Lyubimkin -Standards-Version: 3.8.0 +Standards-Version: 3.8.1.0 Build-Depends: debhelper (>= 5.0), libdb-dev, gettext (>= 0.12), libcurl4-gnutls-dev | libcurl3-gnutls-dev (>= 7.15.5), debiandoc-sgml, docbook-utils (>= 0.6.12), xsltproc, docbook-xsl, xmlto Vcs-Bzr: http://bzr.debian.org/apt/debian-sid/ diff --git a/po/apt-all.pot b/po/apt-all.pot index a1d7cb99d..d1b705837 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-29 17:01+0200\n" +"POT-Creation-Date: 2009-06-30 14:09+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -156,7 +156,7 @@ msgstr "" #: cmdline/apt-cache.cc:1714 cmdline/apt-cdrom.cc:138 cmdline/apt-config.cc:70 #: cmdline/apt-extracttemplates.cc:225 ftparchive/apt-ftparchive.cc:547 -#: cmdline/apt-get.cc:2582 cmdline/apt-sortpkgs.cc:144 +#: cmdline/apt-get.cc:2586 cmdline/apt-sortpkgs.cc:144 #, c-format msgid "%s %s for %s compiled on %s %s\n" msgstr "" @@ -550,221 +550,221 @@ msgstr "" msgid "Failed to rename %s to %s" msgstr "" -#: cmdline/apt-get.cc:124 +#: cmdline/apt-get.cc:127 msgid "Y" msgstr "" -#: cmdline/apt-get.cc:146 cmdline/apt-get.cc:1658 +#: cmdline/apt-get.cc:149 cmdline/apt-get.cc:1661 #, c-format msgid "Regex compilation error - %s" msgstr "" -#: cmdline/apt-get.cc:241 +#: cmdline/apt-get.cc:244 msgid "The following packages have unmet dependencies:" msgstr "" -#: cmdline/apt-get.cc:331 +#: cmdline/apt-get.cc:334 #, c-format msgid "but %s is installed" msgstr "" -#: cmdline/apt-get.cc:333 +#: cmdline/apt-get.cc:336 #, c-format msgid "but %s is to be installed" msgstr "" -#: cmdline/apt-get.cc:340 +#: cmdline/apt-get.cc:343 msgid "but it is not installable" msgstr "" -#: cmdline/apt-get.cc:342 +#: cmdline/apt-get.cc:345 msgid "but it is a virtual package" msgstr "" -#: cmdline/apt-get.cc:345 +#: cmdline/apt-get.cc:348 msgid "but it is not installed" msgstr "" -#: cmdline/apt-get.cc:345 +#: cmdline/apt-get.cc:348 msgid "but it is not going to be installed" msgstr "" -#: cmdline/apt-get.cc:350 +#: cmdline/apt-get.cc:353 msgid " or" msgstr "" -#: cmdline/apt-get.cc:379 +#: cmdline/apt-get.cc:382 msgid "The following NEW packages will be installed:" msgstr "" -#: cmdline/apt-get.cc:405 +#: cmdline/apt-get.cc:408 msgid "The following packages will be REMOVED:" msgstr "" -#: cmdline/apt-get.cc:427 +#: cmdline/apt-get.cc:430 msgid "The following packages have been kept back:" msgstr "" -#: cmdline/apt-get.cc:448 +#: cmdline/apt-get.cc:451 msgid "The following packages will be upgraded:" msgstr "" -#: cmdline/apt-get.cc:469 +#: cmdline/apt-get.cc:472 msgid "The following packages will be DOWNGRADED:" msgstr "" -#: cmdline/apt-get.cc:489 +#: cmdline/apt-get.cc:492 msgid "The following held packages will be changed:" msgstr "" -#: cmdline/apt-get.cc:542 +#: cmdline/apt-get.cc:545 #, c-format msgid "%s (due to %s) " msgstr "" -#: cmdline/apt-get.cc:550 +#: cmdline/apt-get.cc:553 msgid "" "WARNING: The following essential packages will be removed.\n" "This should NOT be done unless you know exactly what you are doing!" msgstr "" -#: cmdline/apt-get.cc:581 +#: cmdline/apt-get.cc:584 #, c-format msgid "%lu upgraded, %lu newly installed, " msgstr "" -#: cmdline/apt-get.cc:585 +#: cmdline/apt-get.cc:588 #, c-format msgid "%lu reinstalled, " msgstr "" -#: cmdline/apt-get.cc:587 +#: cmdline/apt-get.cc:590 #, c-format msgid "%lu downgraded, " msgstr "" -#: cmdline/apt-get.cc:589 +#: cmdline/apt-get.cc:592 #, c-format msgid "%lu to remove and %lu not upgraded.\n" msgstr "" -#: cmdline/apt-get.cc:593 +#: cmdline/apt-get.cc:596 #, c-format msgid "%lu not fully installed or removed.\n" msgstr "" -#: cmdline/apt-get.cc:667 +#: cmdline/apt-get.cc:670 msgid "Correcting dependencies..." msgstr "" -#: cmdline/apt-get.cc:670 +#: cmdline/apt-get.cc:673 msgid " failed." msgstr "" -#: cmdline/apt-get.cc:673 +#: cmdline/apt-get.cc:676 msgid "Unable to correct dependencies" msgstr "" -#: cmdline/apt-get.cc:676 +#: cmdline/apt-get.cc:679 msgid "Unable to minimize the upgrade set" msgstr "" -#: cmdline/apt-get.cc:678 +#: cmdline/apt-get.cc:681 msgid " Done" msgstr "" -#: cmdline/apt-get.cc:682 +#: cmdline/apt-get.cc:685 msgid "You might want to run `apt-get -f install' to correct these." msgstr "" -#: cmdline/apt-get.cc:685 +#: cmdline/apt-get.cc:688 msgid "Unmet dependencies. Try using -f." msgstr "" -#: cmdline/apt-get.cc:707 +#: cmdline/apt-get.cc:710 msgid "WARNING: The following packages cannot be authenticated!" msgstr "" -#: cmdline/apt-get.cc:711 +#: cmdline/apt-get.cc:714 msgid "Authentication warning overridden.\n" msgstr "" -#: cmdline/apt-get.cc:718 +#: cmdline/apt-get.cc:721 msgid "Install these packages without verification [y/N]? " msgstr "" -#: cmdline/apt-get.cc:720 +#: cmdline/apt-get.cc:723 msgid "Some packages could not be authenticated" msgstr "" -#: cmdline/apt-get.cc:729 cmdline/apt-get.cc:881 +#: cmdline/apt-get.cc:732 cmdline/apt-get.cc:884 msgid "There are problems and -y was used without --force-yes" msgstr "" -#: cmdline/apt-get.cc:773 +#: cmdline/apt-get.cc:776 msgid "Internal error, InstallPackages was called with broken packages!" msgstr "" -#: cmdline/apt-get.cc:782 +#: cmdline/apt-get.cc:785 msgid "Packages need to be removed but remove is disabled." msgstr "" -#: cmdline/apt-get.cc:793 +#: cmdline/apt-get.cc:796 msgid "Internal error, Ordering didn't finish" msgstr "" -#: cmdline/apt-get.cc:809 cmdline/apt-get.cc:1999 cmdline/apt-get.cc:2032 +#: cmdline/apt-get.cc:812 cmdline/apt-get.cc:2003 cmdline/apt-get.cc:2036 msgid "Unable to lock the download directory" msgstr "" -#: cmdline/apt-get.cc:819 cmdline/apt-get.cc:2080 cmdline/apt-get.cc:2326 +#: cmdline/apt-get.cc:822 cmdline/apt-get.cc:2084 cmdline/apt-get.cc:2330 #: apt-pkg/cachefile.cc:65 msgid "The list of sources could not be read." msgstr "" -#: cmdline/apt-get.cc:834 +#: cmdline/apt-get.cc:837 msgid "How odd.. The sizes didn't match, email apt@packages.debian.org" msgstr "" -#: cmdline/apt-get.cc:839 +#: cmdline/apt-get.cc:842 #, c-format msgid "Need to get %sB/%sB of archives.\n" msgstr "" -#: cmdline/apt-get.cc:842 +#: cmdline/apt-get.cc:845 #, c-format msgid "Need to get %sB of archives.\n" msgstr "" -#: cmdline/apt-get.cc:847 +#: cmdline/apt-get.cc:850 #, c-format msgid "After this operation, %sB of additional disk space will be used.\n" msgstr "" -#: cmdline/apt-get.cc:850 +#: cmdline/apt-get.cc:853 #, c-format msgid "After this operation, %sB disk space will be freed.\n" msgstr "" -#: cmdline/apt-get.cc:864 cmdline/apt-get.cc:2175 +#: cmdline/apt-get.cc:867 cmdline/apt-get.cc:2179 #, c-format msgid "Couldn't determine free space in %s" msgstr "" -#: cmdline/apt-get.cc:871 +#: cmdline/apt-get.cc:874 #, c-format msgid "You don't have enough free space in %s." msgstr "" -#: cmdline/apt-get.cc:887 cmdline/apt-get.cc:907 +#: cmdline/apt-get.cc:890 cmdline/apt-get.cc:910 msgid "Trivial Only specified but this is not a trivial operation." msgstr "" -#: cmdline/apt-get.cc:889 +#: cmdline/apt-get.cc:892 msgid "Yes, do as I say!" msgstr "" -#: cmdline/apt-get.cc:891 +#: cmdline/apt-get.cc:894 #, c-format msgid "" "You are about to do something potentially harmful.\n" @@ -772,74 +772,74 @@ msgid "" " ?] " msgstr "" -#: cmdline/apt-get.cc:897 cmdline/apt-get.cc:916 +#: cmdline/apt-get.cc:900 cmdline/apt-get.cc:919 msgid "Abort." msgstr "" -#: cmdline/apt-get.cc:912 +#: cmdline/apt-get.cc:915 msgid "Do you want to continue [Y/n]? " msgstr "" -#: cmdline/apt-get.cc:984 cmdline/apt-get.cc:2223 apt-pkg/algorithms.cc:1388 +#: cmdline/apt-get.cc:987 cmdline/apt-get.cc:2227 apt-pkg/algorithms.cc:1400 #, c-format msgid "Failed to fetch %s %s\n" msgstr "" -#: cmdline/apt-get.cc:1002 +#: cmdline/apt-get.cc:1005 msgid "Some files failed to download" msgstr "" -#: cmdline/apt-get.cc:1003 cmdline/apt-get.cc:2232 +#: cmdline/apt-get.cc:1006 cmdline/apt-get.cc:2236 msgid "Download complete and in download only mode" msgstr "" -#: cmdline/apt-get.cc:1009 +#: cmdline/apt-get.cc:1012 msgid "" "Unable to fetch some archives, maybe run apt-get update or try with --fix-" "missing?" msgstr "" -#: cmdline/apt-get.cc:1013 +#: cmdline/apt-get.cc:1016 msgid "--fix-missing and media swapping is not currently supported" msgstr "" -#: cmdline/apt-get.cc:1018 +#: cmdline/apt-get.cc:1021 msgid "Unable to correct missing packages." msgstr "" -#: cmdline/apt-get.cc:1019 +#: cmdline/apt-get.cc:1022 msgid "Aborting install." msgstr "" -#: cmdline/apt-get.cc:1053 +#: cmdline/apt-get.cc:1056 #, c-format msgid "Note, selecting %s instead of %s\n" msgstr "" -#: cmdline/apt-get.cc:1063 +#: cmdline/apt-get.cc:1066 #, c-format msgid "Skipping %s, it is already installed and upgrade is not set.\n" msgstr "" -#: cmdline/apt-get.cc:1081 +#: cmdline/apt-get.cc:1084 #, c-format msgid "Package %s is not installed, so not removed\n" msgstr "" -#: cmdline/apt-get.cc:1092 +#: cmdline/apt-get.cc:1095 #, c-format msgid "Package %s is a virtual package provided by:\n" msgstr "" -#: cmdline/apt-get.cc:1104 +#: cmdline/apt-get.cc:1107 msgid " [Installed]" msgstr "" -#: cmdline/apt-get.cc:1109 +#: cmdline/apt-get.cc:1112 msgid "You should explicitly select one to install." msgstr "" -#: cmdline/apt-get.cc:1114 +#: cmdline/apt-get.cc:1117 #, 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:1133 +#: cmdline/apt-get.cc:1136 msgid "However the following packages replace it:" msgstr "" -#: cmdline/apt-get.cc:1136 +#: cmdline/apt-get.cc:1139 #, c-format msgid "Package %s has no installation candidate" msgstr "" -#: cmdline/apt-get.cc:1156 +#: cmdline/apt-get.cc:1159 #, c-format msgid "Reinstallation of %s is not possible, it cannot be downloaded.\n" msgstr "" -#: cmdline/apt-get.cc:1164 +#: cmdline/apt-get.cc:1167 #, c-format msgid "%s is already the newest version.\n" msgstr "" -#: cmdline/apt-get.cc:1193 +#: cmdline/apt-get.cc:1196 #, c-format msgid "Release '%s' for '%s' was not found" msgstr "" -#: cmdline/apt-get.cc:1195 +#: cmdline/apt-get.cc:1198 #, c-format msgid "Version '%s' for '%s' was not found" msgstr "" -#: cmdline/apt-get.cc:1201 +#: cmdline/apt-get.cc:1204 #, c-format msgid "Selected version %s (%s) for %s\n" msgstr "" -#: cmdline/apt-get.cc:1307 +#: cmdline/apt-get.cc:1310 #, c-format msgid "No source package '%s' picking '%s' instead\n" msgstr "" -#: cmdline/apt-get.cc:1345 +#: cmdline/apt-get.cc:1348 msgid "The update command takes no arguments" msgstr "" -#: cmdline/apt-get.cc:1358 +#: cmdline/apt-get.cc:1361 msgid "Unable to lock the list directory" msgstr "" -#: cmdline/apt-get.cc:1410 +#: cmdline/apt-get.cc:1413 msgid "We are not supposed to delete stuff, can't start AutoRemover" msgstr "" -#: cmdline/apt-get.cc:1442 +#: cmdline/apt-get.cc:1445 msgid "" "The following packages were automatically installed and are no longer " "required:" msgstr "" -#: cmdline/apt-get.cc:1444 +#: cmdline/apt-get.cc:1447 msgid "Use 'apt-get autoremove' to remove them." msgstr "" -#: cmdline/apt-get.cc:1449 +#: cmdline/apt-get.cc:1452 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:1452 cmdline/apt-get.cc:1742 +#: cmdline/apt-get.cc:1455 cmdline/apt-get.cc:1745 msgid "The following information may help to resolve the situation:" msgstr "" -#: cmdline/apt-get.cc:1456 +#: cmdline/apt-get.cc:1459 msgid "Internal Error, AutoRemover broke stuff" msgstr "" -#: cmdline/apt-get.cc:1475 +#: cmdline/apt-get.cc:1478 msgid "Internal error, AllUpgrade broke stuff" msgstr "" -#: cmdline/apt-get.cc:1530 +#: cmdline/apt-get.cc:1533 #, c-format msgid "Couldn't find task %s" msgstr "" -#: cmdline/apt-get.cc:1645 cmdline/apt-get.cc:1681 +#: cmdline/apt-get.cc:1648 cmdline/apt-get.cc:1684 #, c-format msgid "Couldn't find package %s" msgstr "" -#: cmdline/apt-get.cc:1668 +#: cmdline/apt-get.cc:1671 #, c-format msgid "Note, selecting %s for regex '%s'\n" msgstr "" -#: cmdline/apt-get.cc:1699 +#: cmdline/apt-get.cc:1702 #, c-format msgid "%s set to manually installed.\n" msgstr "" -#: cmdline/apt-get.cc:1712 +#: cmdline/apt-get.cc:1715 msgid "You might want to run `apt-get -f install' to correct these:" msgstr "" -#: cmdline/apt-get.cc:1715 +#: cmdline/apt-get.cc:1718 msgid "" "Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a " "solution)." msgstr "" -#: cmdline/apt-get.cc:1727 +#: cmdline/apt-get.cc:1730 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:1745 +#: cmdline/apt-get.cc:1748 msgid "Broken packages" msgstr "" -#: cmdline/apt-get.cc:1774 +#: cmdline/apt-get.cc:1777 msgid "The following extra packages will be installed:" msgstr "" -#: cmdline/apt-get.cc:1863 +#: cmdline/apt-get.cc:1866 msgid "Suggested packages:" msgstr "" -#: cmdline/apt-get.cc:1864 +#: cmdline/apt-get.cc:1867 msgid "Recommended packages:" msgstr "" -#: cmdline/apt-get.cc:1892 +#: cmdline/apt-get.cc:1896 msgid "Calculating upgrade... " msgstr "" -#: cmdline/apt-get.cc:1895 methods/ftp.cc:702 methods/connect.cc:112 +#: cmdline/apt-get.cc:1899 methods/ftp.cc:702 methods/connect.cc:112 msgid "Failed" msgstr "" -#: cmdline/apt-get.cc:1900 +#: cmdline/apt-get.cc:1904 msgid "Done" msgstr "" -#: cmdline/apt-get.cc:1967 cmdline/apt-get.cc:1975 +#: cmdline/apt-get.cc:1971 cmdline/apt-get.cc:1979 msgid "Internal error, problem resolver broke stuff" msgstr "" -#: cmdline/apt-get.cc:2075 +#: cmdline/apt-get.cc:2079 msgid "Must specify at least one package to fetch source for" msgstr "" -#: cmdline/apt-get.cc:2105 cmdline/apt-get.cc:2344 +#: cmdline/apt-get.cc:2109 cmdline/apt-get.cc:2348 #, c-format msgid "Unable to find a source package for %s" msgstr "" -#: cmdline/apt-get.cc:2154 +#: cmdline/apt-get.cc:2158 #, c-format msgid "Skipping already downloaded file '%s'\n" msgstr "" -#: cmdline/apt-get.cc:2182 +#: cmdline/apt-get.cc:2186 #, c-format msgid "You don't have enough free space in %s" msgstr "" -#: cmdline/apt-get.cc:2188 +#: cmdline/apt-get.cc:2192 #, c-format msgid "Need to get %sB/%sB of source archives.\n" msgstr "" -#: cmdline/apt-get.cc:2191 +#: cmdline/apt-get.cc:2195 #, c-format msgid "Need to get %sB of source archives.\n" msgstr "" -#: cmdline/apt-get.cc:2197 +#: cmdline/apt-get.cc:2201 #, c-format msgid "Fetch source %s\n" msgstr "" -#: cmdline/apt-get.cc:2228 +#: cmdline/apt-get.cc:2232 msgid "Failed to fetch some archives." msgstr "" -#: cmdline/apt-get.cc:2256 +#: cmdline/apt-get.cc:2260 #, c-format msgid "Skipping unpack of already unpacked source in %s\n" msgstr "" -#: cmdline/apt-get.cc:2268 +#: cmdline/apt-get.cc:2272 #, c-format msgid "Unpack command '%s' failed.\n" msgstr "" -#: cmdline/apt-get.cc:2269 +#: cmdline/apt-get.cc:2273 #, c-format msgid "Check if the 'dpkg-dev' package is installed.\n" msgstr "" -#: cmdline/apt-get.cc:2286 +#: cmdline/apt-get.cc:2290 #, c-format msgid "Build command '%s' failed.\n" msgstr "" -#: cmdline/apt-get.cc:2305 +#: cmdline/apt-get.cc:2309 msgid "Child process failed" msgstr "" -#: cmdline/apt-get.cc:2321 +#: cmdline/apt-get.cc:2325 msgid "Must specify at least one package to check builddeps for" msgstr "" -#: cmdline/apt-get.cc:2349 +#: cmdline/apt-get.cc:2353 #, c-format msgid "Unable to get build-dependency information for %s" msgstr "" -#: cmdline/apt-get.cc:2369 +#: cmdline/apt-get.cc:2373 #, c-format msgid "%s has no build depends.\n" msgstr "" -#: cmdline/apt-get.cc:2421 +#: cmdline/apt-get.cc:2425 #, c-format msgid "" "%s dependency for %s cannot be satisfied because the package %s cannot be " "found" msgstr "" -#: cmdline/apt-get.cc:2474 +#: cmdline/apt-get.cc:2478 #, 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:2510 +#: cmdline/apt-get.cc:2514 #, c-format msgid "Failed to satisfy %s dependency for %s: Installed package %s is too new" msgstr "" -#: cmdline/apt-get.cc:2537 +#: cmdline/apt-get.cc:2541 #, c-format msgid "Failed to satisfy %s dependency for %s: %s" msgstr "" -#: cmdline/apt-get.cc:2551 +#: cmdline/apt-get.cc:2555 #, c-format msgid "Build-dependencies for %s could not be satisfied." msgstr "" -#: cmdline/apt-get.cc:2555 +#: cmdline/apt-get.cc:2559 msgid "Failed to process build dependencies" msgstr "" -#: cmdline/apt-get.cc:2587 +#: cmdline/apt-get.cc:2591 msgid "Supported modules:" msgstr "" -#: cmdline/apt-get.cc:2628 +#: cmdline/apt-get.cc:2632 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:2795 +#: cmdline/apt-get.cc:2799 msgid "" "NOTE: This is only a simulation!\n" " apt-get needs root privileges for real execution.\n" @@ -1927,7 +1927,7 @@ msgstr "" msgid "%lis" msgstr "" -#: apt-pkg/contrib/strutl.cc:1018 +#: apt-pkg/contrib/strutl.cc:1029 #, c-format msgid "Selection %s not found" msgstr "" @@ -2197,28 +2197,28 @@ msgstr "" msgid "extra" msgstr "" -#: apt-pkg/depcache.cc:130 apt-pkg/depcache.cc:159 +#: apt-pkg/depcache.cc:123 apt-pkg/depcache.cc:152 msgid "Building dependency tree" msgstr "" -#: apt-pkg/depcache.cc:131 +#: apt-pkg/depcache.cc:124 msgid "Candidate versions" msgstr "" -#: apt-pkg/depcache.cc:160 +#: apt-pkg/depcache.cc:153 msgid "Dependency generation" msgstr "" -#: apt-pkg/depcache.cc:181 apt-pkg/depcache.cc:200 apt-pkg/depcache.cc:204 +#: apt-pkg/depcache.cc:174 apt-pkg/depcache.cc:193 apt-pkg/depcache.cc:197 msgid "Reading state information" msgstr "" -#: apt-pkg/depcache.cc:228 +#: apt-pkg/depcache.cc:221 #, c-format msgid "Failed to open StateFile %s" msgstr "" -#: apt-pkg/depcache.cc:234 +#: apt-pkg/depcache.cc:227 #, c-format msgid "Failed to write temporary StateFile %s" 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:1135 +#: apt-pkg/algorithms.cc:1147 msgid "" "Error, pkgProblemResolver::Resolve generated breaks, this may be caused by " "held packages." msgstr "" -#: apt-pkg/algorithms.cc:1137 +#: apt-pkg/algorithms.cc:1149 msgid "Unable to correct problems, you have held broken packages." msgstr "" -#: apt-pkg/algorithms.cc:1414 apt-pkg/algorithms.cc:1416 +#: apt-pkg/algorithms.cc:1426 apt-pkg/algorithms.cc:1428 msgid "" "Some index files failed to download, they have been ignored, or old ones " "used instead." -- cgit v1.2.3-70-g09d2 From 4b65cc13c74231e14a313ea05a2376cbc5155c5f Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 30 Jun 2009 14:16:32 +0200 Subject: fix typo in apt-pkg/acquire.cc which prevents Dl-Limit to work correctly when downloading from multiple sites (Closes: #534752) --- apt-pkg/acquire.cc | 2 +- debian/changelog | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc index 38944bbac..daea234d3 100644 --- a/apt-pkg/acquire.cc +++ b/apt-pkg/acquire.cc @@ -265,7 +265,7 @@ pkgAcquire::MethodConfig *pkgAcquire::GetConfig(string Access) return 0; /* if a method uses DownloadLimit, we switch to SingleInstance mode */ - if(_config->FindI("Acquire::"+Access+"::DlLimit",0) > 0) + if(_config->FindI("Acquire::"+Access+"::Dl-Limit",0) > 0) Conf->SingleInstance = true; return Conf; diff --git a/debian/changelog b/debian/changelog index 333640b18..fd37b9c71 100644 --- a/debian/changelog +++ b/debian/changelog @@ -31,6 +31,8 @@ apt (0.7.22) UNRELEASED; urgency=low * do not write state file in simulate mode (closes: #433007) * add hook for auto-install (closes: #470035) * 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) [ Michael Vogt ] * honor the dpkg hold state in AutoInstOk (closes: #64141) -- 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 'debian') 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 'debian') 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 9f5bf66a6218d1aec3f42713084078c18947eade Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 1 Jul 2009 10:25:41 +0200 Subject: versions with a pin of -1 shouldn't be a candidate (Closes: #355237) --- apt-pkg/policy.cc | 8 ++++++++ debian/changelog | 1 + po/apt-all.pot | 8 ++++---- 3 files changed, 13 insertions(+), 4 deletions(-) (limited to 'debian') diff --git a/apt-pkg/policy.cc b/apt-pkg/policy.cc index 98576fc91..e33d563a1 100644 --- a/apt-pkg/policy.cc +++ b/apt-pkg/policy.cc @@ -120,6 +120,14 @@ pkgCache::VerIterator pkgPolicy::GetCandidateVer(pkgCache::PkgIterator Pkg) signed Max = GetPriority(Pkg); pkgCache::VerIterator Pref = GetMatch(Pkg); + // no package = no candidate version + if (Pkg.end() == true) + return Pref; + + // packages with a pin lower than 0 have no newer candidate than the current version + if (Max < 0) + return Pkg.CurrentVer(); + /* Falling through to the default version.. Setting Max to zero effectively excludes everything <= 0 which are the non-automatic priorities.. The status file is given a prio of 100 which will exclude diff --git a/debian/changelog b/debian/changelog index ab8da4c6c..412435fad 100644 --- a/debian/changelog +++ b/debian/changelog @@ -33,6 +33,7 @@ apt (0.7.22) UNRELEASED; urgency=low * 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) + * versions with a pin of -1 shouldn't be a candidate (Closes: #355237) [ Michael Vogt ] * honor the dpkg hold state in new Marker hooks (closes: #64141) diff --git a/po/apt-all.pot b/po/apt-all.pot index 12e15110e..199b7f843 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 21:08+0200\n" +"POT-Creation-Date: 2009-07-01 10:24+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -2381,16 +2381,16 @@ msgstr "" msgid "You may want to run apt-get update to correct these problems" msgstr "" -#: apt-pkg/policy.cc:281 +#: apt-pkg/policy.cc:289 msgid "Invalid record in the preferences file, no Package header" msgstr "" -#: apt-pkg/policy.cc:303 +#: apt-pkg/policy.cc:311 #, c-format msgid "Did not understand pin type %s" msgstr "" -#: apt-pkg/policy.cc:311 +#: apt-pkg/policy.cc:319 msgid "No priority (or zero) specified for pin" msgstr "" -- cgit v1.2.3-70-g09d2 From d2b08f7e6e4b82d04df2412f55549b0ee5d38dc4 Mon Sep 17 00:00:00 2001 From: Marcos Alvarez Costales Date: Wed, 1 Jul 2009 22:43:12 +0200 Subject: Updated Asturian translation --- debian/changelog | 2 +- po/ast.po | 449 +++++++++++++++++++++++++++++++------------------------ 2 files changed, 251 insertions(+), 200 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index fd37b9c71..668192967 100644 --- a/debian/changelog +++ b/debian/changelog @@ -15,7 +15,7 @@ apt (0.7.22) UNRELEASED; urgency=low - ca.po. Closes: #531921 * Added translations - ast.po (Asturian by Marcos Alvareez Costales). - Closes: #529007, #529730 + Closes: #529007, #529730, #535328 [ David Kalnischkies ] * [ABI break] support '#' in apt.conf and /etc/apt/preferences diff --git a/po/ast.po b/po/ast.po index 01ee81acd..0af6d0c18 100644 --- a/po/ast.po +++ b/po/ast.po @@ -2,9 +2,10 @@ msgid "" msgstr "" "Project-Id-Version: apt 0.7.18\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-11-12 22:07+0100\n" -"PO-Revision-Date: 2009-05-21 09:37+0100\n" -"Last-Translator: Marcos \n" +"POT-Creation-Date: 2009-06-30 14:09+0200\n" +"PO-Revision-Date: 2009-07-01 18:09+0100\n" +"Last-Translator: Marcos Alvarez Costales \n" "Language-Team: Asturian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-1\n" @@ -152,7 +153,7 @@ msgstr " %4i %s\n" #: cmdline/apt-cache.cc:1714 cmdline/apt-cdrom.cc:138 cmdline/apt-config.cc:70 #: cmdline/apt-extracttemplates.cc:225 ftparchive/apt-ftparchive.cc:547 -#: cmdline/apt-get.cc:2573 cmdline/apt-sortpkgs.cc:144 +#: cmdline/apt-get.cc:2586 cmdline/apt-sortpkgs.cc:144 #, c-format msgid "%s %s for %s compiled on %s %s\n" msgstr "%s %s pa %s compiláu en %s %s\n" @@ -647,79 +648,79 @@ msgstr "Problema al desenllazar %s" msgid "Failed to rename %s to %s" msgstr "Nun pudo renomase %s como %s" -#: cmdline/apt-get.cc:124 +#: cmdline/apt-get.cc:127 msgid "Y" msgstr "S" -#: cmdline/apt-get.cc:146 cmdline/apt-get.cc:1651 +#: cmdline/apt-get.cc:149 cmdline/apt-get.cc:1661 #, c-format msgid "Regex compilation error - %s" msgstr "Error de compilación d'espresión regular - %s" -#: cmdline/apt-get.cc:241 +#: cmdline/apt-get.cc:244 msgid "The following packages have unmet dependencies:" msgstr "Los siguientes paquetes nun cumplen dependencies:" -#: cmdline/apt-get.cc:331 +#: cmdline/apt-get.cc:334 #, c-format msgid "but %s is installed" msgstr "pero %s ta instaláu" -#: cmdline/apt-get.cc:333 +#: cmdline/apt-get.cc:336 #, c-format msgid "but %s is to be installed" msgstr "pero %s ta pa instalar" -#: cmdline/apt-get.cc:340 +#: cmdline/apt-get.cc:343 msgid "but it is not installable" msgstr "pero nun ye instalable" -#: cmdline/apt-get.cc:342 +#: cmdline/apt-get.cc:345 msgid "but it is a virtual package" msgstr "pero ye un paquete virtual" -#: cmdline/apt-get.cc:345 +#: cmdline/apt-get.cc:348 msgid "but it is not installed" msgstr "pero nun ta instaláu" -#: cmdline/apt-get.cc:345 +#: cmdline/apt-get.cc:348 msgid "but it is not going to be installed" msgstr "pero nun va instalase" -#: cmdline/apt-get.cc:350 +#: cmdline/apt-get.cc:353 msgid " or" msgstr " o" -#: cmdline/apt-get.cc:379 +#: cmdline/apt-get.cc:382 msgid "The following NEW packages will be installed:" msgstr "Van instalase los siguientes paquetes NUEVOS:" -#: cmdline/apt-get.cc:405 +#: cmdline/apt-get.cc:408 msgid "The following packages will be REMOVED:" msgstr "Los siguientes paquetes van DESANICIASE:" -#: cmdline/apt-get.cc:427 +#: cmdline/apt-get.cc:430 msgid "The following packages have been kept back:" msgstr "Los siguientes paquetes tan reteníos:" -#: cmdline/apt-get.cc:448 +#: cmdline/apt-get.cc:451 msgid "The following packages will be upgraded:" msgstr "Los siguientes paquetes van actualizase:" -#: cmdline/apt-get.cc:469 +#: cmdline/apt-get.cc:472 msgid "The following packages will be DOWNGRADED:" msgstr "Los siguientes paquetes van DESACTUALIZASE:" -#: cmdline/apt-get.cc:489 +#: cmdline/apt-get.cc:492 msgid "The following held packages will be changed:" msgstr "Van camudase los siguientes paquetes reteníos:" -#: cmdline/apt-get.cc:542 +#: cmdline/apt-get.cc:545 #, c-format msgid "%s (due to %s) " msgstr "%s (por %s) " -#: cmdline/apt-get.cc:550 +#: cmdline/apt-get.cc:553 msgid "" "WARNING: The following essential packages will be removed.\n" "This should NOT be done unless you know exactly what you are doing!" @@ -727,143 +728,143 @@ msgstr "" "AVISU: Los siguientes paquetes esenciales van desaniciase.\n" "¡Esto NUN hai que facelo si nun sabes esautamente lo que faes!" -#: cmdline/apt-get.cc:581 +#: cmdline/apt-get.cc:584 #, c-format msgid "%lu upgraded, %lu newly installed, " msgstr "%lu actualizaos, %lu nuevos instalaos, " -#: cmdline/apt-get.cc:585 +#: cmdline/apt-get.cc:588 #, c-format msgid "%lu reinstalled, " msgstr "%lu reinstalaos, " -#: cmdline/apt-get.cc:587 +#: cmdline/apt-get.cc:590 #, c-format msgid "%lu downgraded, " msgstr "%lu desactualizaos, " -#: cmdline/apt-get.cc:589 +#: cmdline/apt-get.cc:592 #, c-format msgid "%lu to remove and %lu not upgraded.\n" msgstr "%lu para desaniciar y %lu nun actualizaos.\n" -#: cmdline/apt-get.cc:593 +#: cmdline/apt-get.cc:596 #, c-format msgid "%lu not fully installed or removed.\n" msgstr "%lu nun instalaos dafechu o desaniciaos.\n" -#: cmdline/apt-get.cc:667 +#: cmdline/apt-get.cc:670 msgid "Correcting dependencies..." msgstr "Iguando dependencies..." -#: cmdline/apt-get.cc:670 +#: cmdline/apt-get.cc:673 msgid " failed." msgstr " falló." -#: cmdline/apt-get.cc:673 +#: cmdline/apt-get.cc:676 msgid "Unable to correct dependencies" msgstr "Nun pudieron iguase les dependencies" -#: cmdline/apt-get.cc:676 +#: cmdline/apt-get.cc:679 msgid "Unable to minimize the upgrade set" msgstr "Nun pue amenorgase'l conxuntu d'actualización" -#: cmdline/apt-get.cc:678 +#: cmdline/apt-get.cc:681 msgid " Done" msgstr " Fecho" -#: cmdline/apt-get.cc:682 +#: cmdline/apt-get.cc:685 msgid "You might want to run `apt-get -f install' to correct these." msgstr "Habríes d'executar `apt-get -f install' para igualo." -#: cmdline/apt-get.cc:685 +#: cmdline/apt-get.cc:688 msgid "Unmet dependencies. Try using -f." msgstr "Dependencies incumplíes. Téntalo usando -f." -#: cmdline/apt-get.cc:707 +#: cmdline/apt-get.cc:710 msgid "WARNING: The following packages cannot be authenticated!" msgstr "AVISU: ¡Nun pudieron autenticase los siguientes paquetes!" -#: cmdline/apt-get.cc:711 +#: cmdline/apt-get.cc:714 msgid "Authentication warning overridden.\n" msgstr "Avisu d'autenticación saltáu.\n" -#: cmdline/apt-get.cc:718 +#: cmdline/apt-get.cc:721 msgid "Install these packages without verification [y/N]? " msgstr "¿Instalar esos paquetes ensin verificación [s/N]? " -#: cmdline/apt-get.cc:720 +#: cmdline/apt-get.cc:723 msgid "Some packages could not be authenticated" msgstr "Dellos paquetes nun pudieron autenticase" -#: cmdline/apt-get.cc:729 cmdline/apt-get.cc:881 +#: cmdline/apt-get.cc:732 cmdline/apt-get.cc:884 msgid "There are problems and -y was used without --force-yes" msgstr "Hai problemes y utilizose -y ensin --force-yes" -#: cmdline/apt-get.cc:773 +#: cmdline/apt-get.cc:776 msgid "Internal error, InstallPackages was called with broken packages!" msgstr "Error internu, ¡InstallPackages llamose con paquetes frañaos!" -#: cmdline/apt-get.cc:782 +#: cmdline/apt-get.cc:785 msgid "Packages need to be removed but remove is disabled." msgstr "Fai falta desaniciar los paquetes pero desaniciar ta torgáu." -#: cmdline/apt-get.cc:793 +#: cmdline/apt-get.cc:796 msgid "Internal error, Ordering didn't finish" msgstr "Error internu, ordenar nun finó" -#: cmdline/apt-get.cc:809 cmdline/apt-get.cc:1992 cmdline/apt-get.cc:2025 +#: cmdline/apt-get.cc:812 cmdline/apt-get.cc:2003 cmdline/apt-get.cc:2036 msgid "Unable to lock the download directory" msgstr "Nun pue bloquiase'l direutoriu de descarga" -#: cmdline/apt-get.cc:819 cmdline/apt-get.cc:2073 cmdline/apt-get.cc:2319 +#: cmdline/apt-get.cc:822 cmdline/apt-get.cc:2084 cmdline/apt-get.cc:2330 #: apt-pkg/cachefile.cc:65 msgid "The list of sources could not be read." msgstr "Nun pudo lleese la llista de fontes." -#: cmdline/apt-get.cc:834 +#: cmdline/apt-get.cc:837 msgid "How odd.. The sizes didn't match, email apt@packages.debian.org" msgstr "Que raro.. Los tamaños nun concasen, escribe a apt@packages.debian.org" -#: cmdline/apt-get.cc:839 +#: cmdline/apt-get.cc:842 #, c-format msgid "Need to get %sB/%sB of archives.\n" msgstr "Hai que descargar %sB/%sB d'archivos.\n" -#: cmdline/apt-get.cc:842 +#: cmdline/apt-get.cc:845 #, c-format msgid "Need to get %sB of archives.\n" msgstr "Hai que descargar %sB d'archivos.\n" -#: cmdline/apt-get.cc:847 +#: cmdline/apt-get.cc:850 #, c-format msgid "After this operation, %sB of additional disk space will be used.\n" msgstr "Tres d'esta operación, van usase %sB d'espaciu de discu adicional.\n" -#: cmdline/apt-get.cc:850 +#: cmdline/apt-get.cc:853 #, c-format msgid "After this operation, %sB disk space will be freed.\n" msgstr "Tres d'esta operación, van lliberase %sB d'espaciu de discu.\n" -#: cmdline/apt-get.cc:864 cmdline/apt-get.cc:2168 +#: cmdline/apt-get.cc:867 cmdline/apt-get.cc:2179 #, c-format msgid "Couldn't determine free space in %s" msgstr "Nun pue determinase l'espaciu llibre de %s" -#: cmdline/apt-get.cc:871 +#: cmdline/apt-get.cc:874 #, c-format msgid "You don't have enough free space in %s." msgstr "Nun tienes espaciu libre bastante en %s." -#: cmdline/apt-get.cc:887 cmdline/apt-get.cc:907 +#: cmdline/apt-get.cc:890 cmdline/apt-get.cc:910 msgid "Trivial Only specified but this is not a trivial operation." msgstr "Conseñose Trivial Only pero ésta nun ye una operación trivial." -#: cmdline/apt-get.cc:889 +#: cmdline/apt-get.cc:892 msgid "Yes, do as I say!" msgstr "Sí, ¡facer lo que digo!" -#: cmdline/apt-get.cc:891 +#: cmdline/apt-get.cc:894 #, c-format msgid "" "You are about to do something potentially harmful.\n" @@ -874,28 +875,28 @@ msgstr "" "Pa continuar escribe la frase '%s'\n" " ?] " -#: cmdline/apt-get.cc:897 cmdline/apt-get.cc:916 +#: cmdline/apt-get.cc:900 cmdline/apt-get.cc:919 msgid "Abort." msgstr "Encaboxar." -#: cmdline/apt-get.cc:912 +#: cmdline/apt-get.cc:915 msgid "Do you want to continue [Y/n]? " msgstr "¿Quies continuar [S/n]? " -#: cmdline/apt-get.cc:984 cmdline/apt-get.cc:2216 apt-pkg/algorithms.cc:1349 +#: cmdline/apt-get.cc:987 cmdline/apt-get.cc:2227 apt-pkg/algorithms.cc:1400 #, c-format msgid "Failed to fetch %s %s\n" msgstr "Falló algamar %s %s\n" -#: cmdline/apt-get.cc:1002 +#: cmdline/apt-get.cc:1005 msgid "Some files failed to download" msgstr "Dellos ficheros nun pudieron descargase" -#: cmdline/apt-get.cc:1003 cmdline/apt-get.cc:2225 +#: cmdline/apt-get.cc:1006 cmdline/apt-get.cc:2236 msgid "Download complete and in download only mode" msgstr "Descarga completa y en mou de sólo descarga" -#: cmdline/apt-get.cc:1009 +#: cmdline/apt-get.cc:1012 msgid "" "Unable to fetch some archives, maybe run apt-get update or try with --fix-" "missing?" @@ -903,47 +904,47 @@ msgstr "" "Nun pudieron algamase dellos archivos, ¿seique executando apt-get update o " "tentando --fix-missing?" -#: cmdline/apt-get.cc:1013 +#: cmdline/apt-get.cc:1016 msgid "--fix-missing and media swapping is not currently supported" msgstr "--fix-missing y cambéu de mediu nun ta sofitao actualmente" -#: cmdline/apt-get.cc:1018 +#: cmdline/apt-get.cc:1021 msgid "Unable to correct missing packages." msgstr "Nun pudieron iguase los paquetes que falten." -#: cmdline/apt-get.cc:1019 +#: cmdline/apt-get.cc:1022 msgid "Aborting install." msgstr "Encaboxando la instalación." -#: cmdline/apt-get.cc:1053 +#: cmdline/apt-get.cc:1056 #, c-format msgid "Note, selecting %s instead of %s\n" msgstr "Nota, escoyendo %s nel llugar de %s\n" -#: cmdline/apt-get.cc:1063 +#: cmdline/apt-get.cc:1066 #, c-format msgid "Skipping %s, it is already installed and upgrade is not set.\n" msgstr "Saltando %s, ya ta instalau y la actualización nun ta activada.\n" -#: cmdline/apt-get.cc:1081 +#: cmdline/apt-get.cc:1084 #, c-format msgid "Package %s is not installed, so not removed\n" msgstr "El paquete %s nun ta instalau, nun va desaniciase\n" -#: cmdline/apt-get.cc:1092 +#: cmdline/apt-get.cc:1095 #, c-format msgid "Package %s is a virtual package provided by:\n" msgstr "El paquete %s ye un paquete virtual ufríu por:\n" -#: cmdline/apt-get.cc:1104 +#: cmdline/apt-get.cc:1107 msgid " [Installed]" msgstr " [Instaláu]" -#: cmdline/apt-get.cc:1109 +#: cmdline/apt-get.cc:1112 msgid "You should explicitly select one to install." msgstr "Has d'escoyer esplícitamente unu pa instalar." -#: cmdline/apt-get.cc:1114 +#: cmdline/apt-get.cc:1117 #, c-format msgid "" "Package %s is not available, but is referred to by another package.\n" @@ -954,53 +955,58 @@ msgstr "" "Esto puede significar que falta el paquete, ta arrumbáu, o sólo\n" "ta disponible dende otra fonte\n" -#: cmdline/apt-get.cc:1133 +#: cmdline/apt-get.cc:1136 msgid "However the following packages replace it:" msgstr "Sicasí, los siguientes paquetes reemplacenlu:" -#: cmdline/apt-get.cc:1136 +#: cmdline/apt-get.cc:1139 #, c-format msgid "Package %s has no installation candidate" msgstr "El paquete %s nun tien candidatu pa instalación" -#: cmdline/apt-get.cc:1156 +#: cmdline/apt-get.cc:1159 #, c-format msgid "Reinstallation of %s is not possible, it cannot be downloaded.\n" msgstr "La reinstalación de %s nun ye dable, nun pue descargase.\n" -#: cmdline/apt-get.cc:1164 +#: cmdline/apt-get.cc:1167 #, c-format msgid "%s is already the newest version.\n" msgstr "%s yá ta na versión más nueva.\n" -#: cmdline/apt-get.cc:1193 +#: cmdline/apt-get.cc:1196 #, c-format msgid "Release '%s' for '%s' was not found" msgstr "Nun s'alcontró la distribución '%s' pa '%s'" -#: cmdline/apt-get.cc:1195 +#: cmdline/apt-get.cc:1198 #, c-format msgid "Version '%s' for '%s' was not found" msgstr "Nun s'alcontró la versión '%s' pa '%s'" -#: cmdline/apt-get.cc:1201 +#: cmdline/apt-get.cc:1204 #, c-format msgid "Selected version %s (%s) for %s\n" msgstr "Escoyida la versión %s (%s) pa %s\n" -#: cmdline/apt-get.cc:1338 +#: cmdline/apt-get.cc:1310 +#, c-format +msgid "No source package '%s' picking '%s' instead\n" +msgstr "Nenguna fonte de paquetes'% s' esbillada '% s' ehí\n" + +#: cmdline/apt-get.cc:1348 msgid "The update command takes no arguments" msgstr "La orde update nun lleva argumentos" -#: cmdline/apt-get.cc:1351 +#: cmdline/apt-get.cc:1361 msgid "Unable to lock the list directory" msgstr "Nun pudo bloquiase'l direutoriu de llista" -#: cmdline/apt-get.cc:1403 +#: cmdline/apt-get.cc:1413 msgid "We are not supposed to delete stuff, can't start AutoRemover" msgstr "Suponse que nun vamos esborrar coses; nun pue entamase AutoRemover" -#: cmdline/apt-get.cc:1435 +#: cmdline/apt-get.cc:1445 msgid "" "The following packages were automatically installed and are no longer " "required:" @@ -1008,11 +1014,11 @@ msgstr "" "Los siguientes paquetes instalaronse de manera automática y ya nun se " "necesiten:" -#: cmdline/apt-get.cc:1437 +#: cmdline/apt-get.cc:1447 msgid "Use 'apt-get autoremove' to remove them." msgstr "Usa 'apt-get autoremove' pa desinstalalos." -#: cmdline/apt-get.cc:1442 +#: cmdline/apt-get.cc:1452 msgid "" "Hmm, seems like the AutoRemover destroyed something which really\n" "shouldn't happen. Please file a bug report against apt." @@ -1030,43 +1036,43 @@ msgstr "" #. "that package should be filed.") << endl; #. } #. -#: cmdline/apt-get.cc:1445 cmdline/apt-get.cc:1735 +#: cmdline/apt-get.cc:1455 cmdline/apt-get.cc:1745 msgid "The following information may help to resolve the situation:" msgstr "La siguiente información pue aidar a resolver la situación:" -#: cmdline/apt-get.cc:1449 +#: cmdline/apt-get.cc:1459 msgid "Internal Error, AutoRemover broke stuff" msgstr "Error internu, AutoRemover rompió coses" -#: cmdline/apt-get.cc:1468 +#: cmdline/apt-get.cc:1478 msgid "Internal error, AllUpgrade broke stuff" msgstr "Error internu, AllUpgrade rompió coses" -#: cmdline/apt-get.cc:1523 +#: cmdline/apt-get.cc:1533 #, c-format msgid "Couldn't find task %s" msgstr "Nun pudo alcontrase la tarea %s" -#: cmdline/apt-get.cc:1638 cmdline/apt-get.cc:1674 +#: cmdline/apt-get.cc:1648 cmdline/apt-get.cc:1684 #, c-format msgid "Couldn't find package %s" msgstr "Nun pudo alcontrase'l paquete %s" -#: cmdline/apt-get.cc:1661 +#: cmdline/apt-get.cc:1671 #, c-format msgid "Note, selecting %s for regex '%s'\n" msgstr "Nota, escoyendo %s pa la espresión regular '%s'\n" -#: cmdline/apt-get.cc:1692 +#: cmdline/apt-get.cc:1702 #, c-format msgid "%s set to manually installed.\n" msgstr "%s axustáu como instaláu manualmente.\n" -#: cmdline/apt-get.cc:1705 +#: cmdline/apt-get.cc:1715 msgid "You might want to run `apt-get -f install' to correct these:" msgstr "Habríes d'executar `apt-get -f install' para iguar estos:" -#: cmdline/apt-get.cc:1708 +#: cmdline/apt-get.cc:1718 msgid "" "Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a " "solution)." @@ -1074,7 +1080,7 @@ msgstr "" "Dependencies ensin cubrir. Tenta 'apt-get -f install' ensin paquetes (o " "conseña una solución)." -#: cmdline/apt-get.cc:1720 +#: cmdline/apt-get.cc:1730 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" @@ -1086,117 +1092,117 @@ msgstr "" "inestable, que dellos paquetes necesarios nun se crearon o que\n" "s'allugaron fuera d'Incoming." -#: cmdline/apt-get.cc:1738 +#: cmdline/apt-get.cc:1748 msgid "Broken packages" msgstr "Paquetes frañaos" -#: cmdline/apt-get.cc:1767 +#: cmdline/apt-get.cc:1777 msgid "The following extra packages will be installed:" msgstr "Instalaránse los siguientes paquetes extra:" -#: cmdline/apt-get.cc:1856 +#: cmdline/apt-get.cc:1866 msgid "Suggested packages:" msgstr "Paquetes afalaos:" -#: cmdline/apt-get.cc:1857 +#: cmdline/apt-get.cc:1867 msgid "Recommended packages:" msgstr "Paquetes encamentaos" -#: cmdline/apt-get.cc:1885 +#: cmdline/apt-get.cc:1896 msgid "Calculating upgrade... " msgstr "Calculando l'autualización... " -#: cmdline/apt-get.cc:1888 methods/ftp.cc:702 methods/connect.cc:112 +#: cmdline/apt-get.cc:1899 methods/ftp.cc:702 methods/connect.cc:112 msgid "Failed" msgstr "Falló" -#: cmdline/apt-get.cc:1893 +#: cmdline/apt-get.cc:1904 msgid "Done" msgstr "Fecho" -#: cmdline/apt-get.cc:1960 cmdline/apt-get.cc:1968 +#: cmdline/apt-get.cc:1971 cmdline/apt-get.cc:1979 msgid "Internal error, problem resolver broke stuff" msgstr "Error internu, l'iguador de problemes frañó coses" -#: cmdline/apt-get.cc:2068 +#: cmdline/apt-get.cc:2079 msgid "Must specify at least one package to fetch source for" msgstr "Has de conseñar polo menos un paquete p'algamar so fonte" -#: cmdline/apt-get.cc:2098 cmdline/apt-get.cc:2337 +#: cmdline/apt-get.cc:2109 cmdline/apt-get.cc:2348 #, c-format msgid "Unable to find a source package for %s" msgstr "Nun pudo alcontrase un paquete fonte pa %s" -#: cmdline/apt-get.cc:2147 +#: cmdline/apt-get.cc:2158 #, c-format msgid "Skipping already downloaded file '%s'\n" msgstr "Saltando'l ficheru yá descargáu '%s'\n" -#: cmdline/apt-get.cc:2175 +#: cmdline/apt-get.cc:2186 #, c-format msgid "You don't have enough free space in %s" msgstr "Nun hai espaciu llibre bastante en %s" -#: cmdline/apt-get.cc:2181 +#: cmdline/apt-get.cc:2192 #, c-format msgid "Need to get %sB/%sB of source archives.\n" msgstr "Hai falta descargar %sB/%sB d'archivos fonte.\n" -#: cmdline/apt-get.cc:2184 +#: cmdline/apt-get.cc:2195 #, c-format msgid "Need to get %sB of source archives.\n" msgstr "Hai falta descargar %sB d'archivos fonte.\n" -#: cmdline/apt-get.cc:2190 +#: cmdline/apt-get.cc:2201 #, c-format msgid "Fetch source %s\n" msgstr "Fonte descargada %s\n" -#: cmdline/apt-get.cc:2221 +#: cmdline/apt-get.cc:2232 msgid "Failed to fetch some archives." msgstr "Falló la descarga de dellos archivos." -#: cmdline/apt-get.cc:2249 +#: cmdline/apt-get.cc:2260 #, c-format msgid "Skipping unpack of already unpacked source in %s\n" msgstr "Saltando'l desempaquetáu de la fonte yá desempaquetada en %s\n" -#: cmdline/apt-get.cc:2261 +#: cmdline/apt-get.cc:2272 #, c-format msgid "Unpack command '%s' failed.\n" msgstr "Falló la orde de desempaquetáu '%s'.\n" -#: cmdline/apt-get.cc:2262 +#: cmdline/apt-get.cc:2273 #, c-format msgid "Check if the 'dpkg-dev' package is installed.\n" msgstr "Comprueba qu'el paquete 'dpkg-dev' ta instaláu.\n" -#: cmdline/apt-get.cc:2279 +#: cmdline/apt-get.cc:2290 #, c-format msgid "Build command '%s' failed.\n" msgstr "Falló la orde build '%s'.\n" -#: cmdline/apt-get.cc:2298 +#: cmdline/apt-get.cc:2309 msgid "Child process failed" msgstr "Falló el procesu fíu" -#: cmdline/apt-get.cc:2314 +#: cmdline/apt-get.cc:2325 msgid "Must specify at least one package to check builddeps for" msgstr "" "Hai que conseñar polo menos un paquete pa verificar les dependencies de " "construcción" -#: cmdline/apt-get.cc:2342 +#: cmdline/apt-get.cc:2353 #, c-format msgid "Unable to get build-dependency information for %s" msgstr "Nun pudo algamase información de dependencies de construcción pa %s" -#: cmdline/apt-get.cc:2362 +#: cmdline/apt-get.cc:2373 #, c-format msgid "%s has no build depends.\n" msgstr "%s nun tien dependencies de construcción.\n" -#: cmdline/apt-get.cc:2414 +#: cmdline/apt-get.cc:2425 #, c-format msgid "" "%s dependency for %s cannot be satisfied because the package %s cannot be " @@ -1205,7 +1211,7 @@ msgstr "" "La dependencia %s en %s nun puede satisfacese porque nun se puede atopar el " "paquete %s" -#: cmdline/apt-get.cc:2467 +#: cmdline/apt-get.cc:2478 #, c-format msgid "" "%s dependency for %s cannot be satisfied because no available versions of " @@ -1214,32 +1220,32 @@ msgstr "" "La dependencia %s en %s nun puede satisfacese porque denguna versión " "disponible del paquete %s satisfaz los requisitos de versión" -#: cmdline/apt-get.cc:2503 +#: cmdline/apt-get.cc:2514 #, c-format msgid "Failed to satisfy %s dependency for %s: Installed package %s is too new" msgstr "" "Nun se pudo satisfacer la dependencia %s pa %s: El paquete instaláu %s ye " "demasiao nuevu" -#: cmdline/apt-get.cc:2528 +#: cmdline/apt-get.cc:2541 #, c-format msgid "Failed to satisfy %s dependency for %s: %s" msgstr "Fallu pa satisfacer la dependencia %s pa %s: %s" -#: cmdline/apt-get.cc:2542 +#: cmdline/apt-get.cc:2555 #, c-format msgid "Build-dependencies for %s could not be satisfied." msgstr "Les dependencies de construcción de %s nun pudieron satisfacese." -#: cmdline/apt-get.cc:2546 +#: cmdline/apt-get.cc:2559 msgid "Failed to process build dependencies" msgstr "Fallu al procesar les dependencies de construcción" -#: cmdline/apt-get.cc:2578 +#: cmdline/apt-get.cc:2591 msgid "Supported modules:" msgstr "Módulos sofitaos:" -#: cmdline/apt-get.cc:2619 +#: cmdline/apt-get.cc:2632 msgid "" "Usage: apt-get [options] command\n" " apt-get [options] install|remove pkg1 [pkg2 ...]\n" @@ -1255,7 +1261,7 @@ msgid "" " install - Install new packages (pkg is libc6 not libc6.deb)\n" " remove - Remove packages\n" " autoremove - Remove automatically all unused packages\n" -" purge - Remove and purge packages\n" +" purge - Remove packages and config files\n" " source - Download source archives\n" " build-dep - Configure build-dependencies for source packages\n" " dist-upgrade - Distribution upgrade, see apt-get(8)\n" @@ -1292,8 +1298,8 @@ msgstr "" "\n" "Comandos:\n" " update - Algamar nueva llista de paquetes\n" -" upgrade - Facer una actualización\n" -" install - Instalar nuevos paquetes (pkg ye libc6 no libc6.deb)\n" +" upgrade - Facer una anovación\n" +" install - Instalar nuevos paquetes (pkg ye libc6 non libc6.deb)\n" " remove - Desaniciar paquetes\n" " autoremove - Desaniciar automáticamente tolos paquetes non usaos\n" " purge - Quitar y desaniciar paquetes\n" @@ -1310,7 +1316,7 @@ msgstr "" " -q Salida Log - ensín indicación de progresu\n" " -qq Ensín salida excepto pa fallos\n" " -d Baxar sólo - NON instalar o desempaquetar los archivos\n" -" -s No aición. Facer una simulación ordenada\n" +" -s Non aición. Facer una simulación ordenada\n" " -y Asumir Yes pa toles entruges y nun visualizar la petición\n" " -f Intentar correxir un sistema con dependencies frayaes\n" " -m Intentar siguir si los archivos nun tan disponibles\n" @@ -1325,6 +1331,19 @@ msgstr "" "pa más información y opciones.\n" " Esti APT tien Poderes de Super Vaca.\n" +#: cmdline/apt-get.cc:2799 +msgid "" +"NOTE: This is only a simulation!\n" +" apt-get needs root privileges for real execution.\n" +" Keep also in mind that locking is deactivated,\n" +" so don't depend on the relevance to the real current situation!" +msgstr "" +"NOTA: ¡Esto sólo ye una simulación!\n" +" apt-get necesita privilexos de root pa la execución real.\n" +" ¡Ten tamién en cuenta que'l bloquéu ta desactiváu,\n" +" asina que nun dependen de la pertinencia de la verdadera situación " +"actual!" + #: cmdline/acqprogress.cc:55 msgid "Hit " msgstr "Oxe " @@ -1557,7 +1576,7 @@ msgstr "Sobreescribiendo concordancia del paquete ensin versi msgid "File %s/%s overwrites the one in the package %s" msgstr "El ficheru %s/%s sobreescribe al que ta nel paquete %s" -#: apt-inst/extract.cc:464 apt-pkg/contrib/configuration.cc:821 +#: apt-inst/extract.cc:464 apt-pkg/contrib/configuration.cc:822 #: apt-pkg/contrib/cdromutl.cc:150 apt-pkg/sourcelist.cc:320 #: apt-pkg/acquire.cc:418 apt-pkg/clean.cc:34 #, c-format @@ -1858,7 +1877,7 @@ msgstr "Gandi msgid "Unable to accept connection" msgstr "Nun se pudo aceptar la conexón" -#: methods/ftp.cc:864 methods/http.cc:960 methods/rsh.cc:303 +#: methods/ftp.cc:864 methods/http.cc:991 methods/rsh.cc:303 msgid "Problem hashing file" msgstr "Hebo un problema al xenerar el hash del ficheru" @@ -1942,40 +1961,40 @@ msgstr "Daqu msgid "Unable to connect to %s %s:" msgstr "Nun se pudo coneutar a %s %s:" -#: methods/gpgv.cc:65 +#: methods/gpgv.cc:71 #, c-format msgid "Couldn't access keyring: '%s'" msgstr "Nun se pudo acceder al aniellu de claves '%s'" -#: methods/gpgv.cc:101 +#: methods/gpgv.cc:107 msgid "E: Argument list from Acquire::gpgv::Options too long. Exiting." msgstr "" "E: Llista d'argumentos d'Acquire::gpgv::Options demasiao llarga. Colando." -#: methods/gpgv.cc:205 +#: methods/gpgv.cc:223 msgid "" "Internal error: Good signature, but could not determine key fingerprint?!" msgstr "" "Fallu internu: Robla bona, pero nun se pudo determinar la so güella dixital?!" -#: methods/gpgv.cc:210 +#: methods/gpgv.cc:228 msgid "At least one invalid signature was encountered." msgstr "Atopóse polo menos una robla mala." -#: methods/gpgv.cc:214 +#: methods/gpgv.cc:232 #, c-format msgid "Could not execute '%s' to verify signature (is gpgv installed?)" msgstr "Nun se pudo executar '%s' pa verificar la robla (¿ta instaláu gpgv?)" -#: methods/gpgv.cc:219 +#: methods/gpgv.cc:237 msgid "Unknown error executing gpgv" msgstr "Fallu desconocíu al executar gpgv" -#: methods/gpgv.cc:250 +#: methods/gpgv.cc:271 methods/gpgv.cc:278 msgid "The following signatures were invalid:\n" msgstr "Les siguientes robles nun valieron:\n" -#: methods/gpgv.cc:257 +#: methods/gpgv.cc:285 msgid "" "The following signatures couldn't be verified because the public key is not " "available:\n" @@ -1993,80 +2012,80 @@ msgstr "Nun se pudo abrir una tuber msgid "Read error from %s process" msgstr "Fallu de llectura dende'l procesu %s" -#: methods/http.cc:377 +#: methods/http.cc:379 msgid "Waiting for headers" msgstr "Esperando les testeres" -#: methods/http.cc:523 +#: methods/http.cc:525 #, c-format msgid "Got a single header line over %u chars" msgstr "Obtúvose una sola llinia de testera penriba de %u carauteres" -#: methods/http.cc:531 +#: methods/http.cc:533 msgid "Bad header line" msgstr "Fallu na llinia testera" -#: methods/http.cc:550 methods/http.cc:557 +#: methods/http.cc:552 methods/http.cc:559 msgid "The HTTP server sent an invalid reply header" msgstr "El sirvidor HTTP mandó una testera incorreuta de rempuesta" -#: methods/http.cc:586 +#: methods/http.cc:588 msgid "The HTTP server sent an invalid Content-Length header" msgstr "El sirvidor HTTP mandó una testera incorreuta de Content-Length" -#: methods/http.cc:601 +#: methods/http.cc:603 msgid "The HTTP server sent an invalid Content-Range header" msgstr "El sirvidor HTTP mandó una testera incorreuta de Content-Range" -#: methods/http.cc:603 +#: methods/http.cc:605 msgid "This HTTP server has broken range support" msgstr "Esti sirvidor HTTP tien rotu'l soporte d'alcance" -#: methods/http.cc:627 +#: methods/http.cc:629 msgid "Unknown date format" msgstr "Formatu de data desconocíu" -#: methods/http.cc:774 +#: methods/http.cc:782 msgid "Select failed" msgstr "Falló la escoyeta" -#: methods/http.cc:779 +#: methods/http.cc:787 msgid "Connection timed out" msgstr "Gandió'l tiempu de conexón" -#: methods/http.cc:802 +#: methods/http.cc:810 msgid "Error writing to output file" msgstr "Fallu al escribir nel ficheru de salida" -#: methods/http.cc:833 +#: methods/http.cc:841 msgid "Error writing to file" msgstr "Fallu al escribir nel ficheru" -#: methods/http.cc:861 +#: methods/http.cc:869 msgid "Error writing to the file" msgstr "Fallu al escribir nel ficheru" -#: methods/http.cc:875 +#: methods/http.cc:883 msgid "Error reading from server. Remote end closed connection" msgstr "Fallu al lleer nel sirvidor. El llau remotu zarró la conexón." -#: methods/http.cc:877 +#: methods/http.cc:885 msgid "Error reading from server" msgstr "Fallu al lleer nel sirvidor" -#: methods/http.cc:945 apt-pkg/contrib/mmap.cc:196 +#: methods/http.cc:976 apt-pkg/contrib/mmap.cc:196 msgid "Failed to truncate file" msgstr "Falló al francer el ficheru" -#: methods/http.cc:1105 +#: methods/http.cc:1141 msgid "Bad header data" msgstr "Datos de testera incorreutos" -#: methods/http.cc:1122 methods/http.cc:1177 +#: methods/http.cc:1158 methods/http.cc:1213 msgid "Connection failed" msgstr "Fallo la conexón" -#: methods/http.cc:1229 +#: methods/http.cc:1305 msgid "Internal error" msgstr "Fallu internu" @@ -2088,7 +2107,31 @@ msgstr "" "Dynamic MMap escosó l'espaciu. Por favor aumenta'l tamañu de APT::Cache-" "Limit. El valor actual ye : %lu. (man 5 apt.conf)" -#: apt-pkg/contrib/strutl.cc:1014 +#. d means days, h means hours, min means minutes, s means seconds +#: apt-pkg/contrib/strutl.cc:335 +#, c-format +msgid "%lid %lih %limin %lis" +msgstr "%lid %lih %limin %lis" + +#. h means hours, min means minutes, s means seconds +#: apt-pkg/contrib/strutl.cc:342 +#, c-format +msgid "%lih %limin %lis" +msgstr "%lih %limin %lis" + +#. min means minutes, s means seconds +#: apt-pkg/contrib/strutl.cc:349 +#, c-format +msgid "%limin %lis" +msgstr "%limin %lis" + +#. s means seconds +#: apt-pkg/contrib/strutl.cc:354 +#, c-format +msgid "%lis" +msgstr "%lis" + +#: apt-pkg/contrib/strutl.cc:1029 #, c-format msgid "Selection %s not found" msgstr "Escoyeta %s que nun s'atopa" @@ -2103,43 +2146,43 @@ msgstr "Triba d'abreviatura que nun se reconoz: msgid "Opening configuration file %s" msgstr "Abriendo ficheros de configuración %s" -#: apt-pkg/contrib/configuration.cc:662 +#: apt-pkg/contrib/configuration.cc:663 #, c-format msgid "Syntax error %s:%u: Block starts with no name." msgstr "Fallu de sintaxis %s:%u: Nun hai un nome al entamu del bloque." -#: apt-pkg/contrib/configuration.cc:681 +#: apt-pkg/contrib/configuration.cc:682 #, c-format msgid "Syntax error %s:%u: Malformed tag" msgstr "Fallu de sintaxis %s:%u: Marca mal formada" -#: apt-pkg/contrib/configuration.cc:698 +#: apt-pkg/contrib/configuration.cc:699 #, c-format msgid "Syntax error %s:%u: Extra junk after value" msgstr "Fallu de sintaxis %s:%u: Puxarra extra dempués del valor" -#: apt-pkg/contrib/configuration.cc:738 +#: apt-pkg/contrib/configuration.cc:739 #, c-format msgid "Syntax error %s:%u: Directives can only be done at the top level" msgstr "" "Error de sintaxis %s:%u: Les directives pueden facese sólo nel nivel cimeru" -#: apt-pkg/contrib/configuration.cc:745 +#: apt-pkg/contrib/configuration.cc:746 #, c-format msgid "Syntax error %s:%u: Too many nested includes" msgstr "Fallu de sintaxis %s:%u: Demasiaes inclusiones añeraes" -#: apt-pkg/contrib/configuration.cc:749 apt-pkg/contrib/configuration.cc:754 +#: apt-pkg/contrib/configuration.cc:750 apt-pkg/contrib/configuration.cc:755 #, c-format msgid "Syntax error %s:%u: Included from here" msgstr "Fallu de sintaxis %s:%u: Incluyendo dende equí" -#: apt-pkg/contrib/configuration.cc:758 +#: apt-pkg/contrib/configuration.cc:759 #, c-format msgid "Syntax error %s:%u: Unsupported directive '%s'" msgstr "Error de sintaxis %s:%u: La directiva '%s' nun ta sofitada" -#: apt-pkg/contrib/configuration.cc:809 +#: apt-pkg/contrib/configuration.cc:810 #, c-format msgid "Syntax error %s:%u: Extra junk at end of file" msgstr "Fallu de sintaxis %s:%u: Puxarra extra al final del ficheru" @@ -2282,101 +2325,105 @@ msgstr "Hai problemes desvenceyando'l ficheru %s" msgid "Problem syncing the file" msgstr "Hai problemes al sincronizar el ficheru" -#: apt-pkg/pkgcache.cc:132 +#: apt-pkg/pkgcache.cc:133 msgid "Empty package cache" msgstr "Caché de paquetes balera." -#: apt-pkg/pkgcache.cc:138 +#: apt-pkg/pkgcache.cc:139 msgid "The package cache file is corrupted" msgstr "El ficheru de caché de paquetes ta tollíu" -#: apt-pkg/pkgcache.cc:143 +#: apt-pkg/pkgcache.cc:144 msgid "The package cache file is an incompatible version" msgstr "El ficheru de caché de paquetes ye una versión incompatible" -#: apt-pkg/pkgcache.cc:148 +#: apt-pkg/pkgcache.cc:149 #, c-format msgid "This APT does not support the versioning system '%s'" msgstr "Esti APT nun soporta'l sistema de versiones '%s'" -#: apt-pkg/pkgcache.cc:153 +#: apt-pkg/pkgcache.cc:154 msgid "The package cache was built for a different architecture" msgstr "La caché de paquetes creóse pa una arquitectura estremada" -#: apt-pkg/pkgcache.cc:224 +#: apt-pkg/pkgcache.cc:225 msgid "Depends" msgstr "Depende de" -#: apt-pkg/pkgcache.cc:224 +#: apt-pkg/pkgcache.cc:225 msgid "PreDepends" msgstr "Predepende de" -#: apt-pkg/pkgcache.cc:224 +#: apt-pkg/pkgcache.cc:225 msgid "Suggests" msgstr "Suxer" -#: apt-pkg/pkgcache.cc:225 +#: apt-pkg/pkgcache.cc:226 msgid "Recommends" msgstr "Recomienda" -#: apt-pkg/pkgcache.cc:225 +#: apt-pkg/pkgcache.cc:226 msgid "Conflicts" msgstr "En conflictu con" -#: apt-pkg/pkgcache.cc:225 +#: apt-pkg/pkgcache.cc:226 msgid "Replaces" msgstr "Sustituye a" -#: apt-pkg/pkgcache.cc:226 +#: apt-pkg/pkgcache.cc:227 msgid "Obsoletes" msgstr "Fai obsoletu a" -#: apt-pkg/pkgcache.cc:226 +#: apt-pkg/pkgcache.cc:227 msgid "Breaks" msgstr "Ruempe" -#: apt-pkg/pkgcache.cc:237 +#: apt-pkg/pkgcache.cc:227 +msgid "Enhances" +msgstr "Aumenta" + +#: apt-pkg/pkgcache.cc:238 msgid "important" msgstr "importante" -#: apt-pkg/pkgcache.cc:237 +#: apt-pkg/pkgcache.cc:238 msgid "required" msgstr "requeríu" -#: apt-pkg/pkgcache.cc:237 +#: apt-pkg/pkgcache.cc:238 msgid "standard" msgstr "estándar" -#: apt-pkg/pkgcache.cc:238 +#: apt-pkg/pkgcache.cc:239 msgid "optional" msgstr "opcional" -#: apt-pkg/pkgcache.cc:238 +#: apt-pkg/pkgcache.cc:239 msgid "extra" msgstr "extra" -#: apt-pkg/depcache.cc:121 apt-pkg/depcache.cc:150 +#: apt-pkg/depcache.cc:123 apt-pkg/depcache.cc:152 msgid "Building dependency tree" msgstr "Creando árbol de dependencies" -#: apt-pkg/depcache.cc:122 +#: apt-pkg/depcache.cc:124 msgid "Candidate versions" msgstr "Versiones candidates" -#: apt-pkg/depcache.cc:151 +#: apt-pkg/depcache.cc:153 msgid "Dependency generation" msgstr "Xeneración de dependencies" -#: apt-pkg/depcache.cc:172 apt-pkg/depcache.cc:191 apt-pkg/depcache.cc:195 +#: apt-pkg/depcache.cc:174 apt-pkg/depcache.cc:193 apt-pkg/depcache.cc:197 msgid "Reading state information" msgstr "Lleendo información d'estáu" -#: apt-pkg/depcache.cc:219 +#: apt-pkg/depcache.cc:221 #, c-format msgid "Failed to open StateFile %s" msgstr "Nun se pudo abrir el ficheru d'estáu %s" -#: apt-pkg/depcache.cc:225 +#: apt-pkg/depcache.cc:227 #, c-format msgid "Failed to write temporary StateFile %s" msgstr "Falló la escritura del ficheru temporal d'estáu %s" @@ -2464,7 +2511,7 @@ msgid "" msgstr "" "El paquete %s necesita reinstalase, pero nun s'alcuentra un archivu pa el." -#: apt-pkg/algorithms.cc:1107 +#: apt-pkg/algorithms.cc:1147 msgid "" "Error, pkgProblemResolver::Resolve generated breaks, this may be caused by " "held packages." @@ -2472,11 +2519,11 @@ msgstr "" "Error, pkgProblemResolver::Resolve xeneró frañaures, esto puede ser pola mor " "de paquetes reteníos." -#: apt-pkg/algorithms.cc:1109 +#: apt-pkg/algorithms.cc:1149 msgid "Unable to correct problems, you have held broken packages." msgstr "Nun pueden iguase los problemes; tienes paquetes frañaos retenidos." -#: apt-pkg/algorithms.cc:1375 apt-pkg/algorithms.cc:1377 +#: apt-pkg/algorithms.cc:1426 apt-pkg/algorithms.cc:1428 msgid "" "Some index files failed to download, they have been ignored, or old ones " "used instead." @@ -2516,7 +2563,7 @@ msgstr "Nun pudo alncontrase'l controlador de m msgid "Method %s did not start correctly" msgstr "El métodu %s nun entamó correchamente" -#: apt-pkg/acquire-worker.cc:399 +#: apt-pkg/acquire-worker.cc:413 #, c-format msgid "Please insert the disc labeled: '%s' in the drive '%s' and press enter." msgstr "Por favor, introduz el discu '%s' nel preséu '%s' y calca Intro." @@ -2548,17 +2595,17 @@ msgstr "" msgid "You may want to run apt-get update to correct these problems" msgstr "Has d'executar apt-get update pa iguar estos problemes" -#: apt-pkg/policy.cc:267 +#: apt-pkg/policy.cc:281 msgid "Invalid record in the preferences file, no Package header" msgstr "" "Rexistru inválidu nel ficheru de preferencies, nun hai cabecera Paquete" -#: apt-pkg/policy.cc:289 +#: apt-pkg/policy.cc:303 #, c-format msgid "Did not understand pin type %s" msgstr "Nun s'entiende'l tipu de pin %s" -#: apt-pkg/policy.cc:297 +#: apt-pkg/policy.cc:311 msgid "No priority (or zero) specified for pin" msgstr "Nun hai prioridá (o ye cero) conseñada pa pin" @@ -2884,12 +2931,16 @@ msgstr "Prepar msgid "Completely removed %s" msgstr "Desinstalóse dafechu %s" -#: apt-pkg/deb/dpkgpm.cc:791 +#: apt-pkg/deb/dpkgpm.cc:789 msgid "Can not write log, openpty() failed (/dev/pts not mounted?)\n" msgstr "" "Nun puede escribise nel rexistru, falló openpty() (¿/dev/pts nun ta " "montáu?)\n" +#: apt-pkg/deb/debsystem.cc:100 +msgid "Not locked" +msgstr "Non bloquiáu" + #: methods/rred.cc:219 msgid "Could not patch file" msgstr "Nun fui quien a parchiar el ficheru" -- cgit v1.2.3-70-g09d2 From ab7f4d7ca647270ffd34b5b6c67339b0cfde51ac Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 2 Jul 2009 14:07:18 +0200 Subject: * apt-pkg/acquire-worker.cc: - show error details of failed methods * apt-pkg/contrib/fileutl.cc: - if a process aborts with signal, show signal number * methods/http.cc: - ignore SIGPIPE, we deal with EPIPE from write in HttpMethod::ServerDie() (LP: #385144) --- apt-pkg/acquire-worker.cc | 7 ++----- apt-pkg/contrib/fileutl.cc | 7 +++++-- debian/changelog | 7 +++++++ methods/http.cc | 4 +++- 4 files changed, 17 insertions(+), 8 deletions(-) (limited to 'debian') diff --git a/apt-pkg/acquire-worker.cc b/apt-pkg/acquire-worker.cc index 78c68737c..4f0b52af9 100644 --- a/apt-pkg/acquire-worker.cc +++ b/apt-pkg/acquire-worker.cc @@ -527,10 +527,6 @@ bool pkgAcquire::Worker::OutFdReady() if (Res <= 0) return MethodFailure(); - - // Hmm.. this should never happen. - if (Res < 0) - return true; OutQueue.erase(0,Res); if (OutQueue.empty() == true) @@ -558,7 +554,8 @@ bool pkgAcquire::Worker::MethodFailure() { _error->Error("Method %s has died unexpectedly!",Access.c_str()); - ExecWait(Process,Access.c_str(),true); + // do not reap the child here to show meaningfull error to the user + ExecWait(Process,Access.c_str(),false); Process = -1; close(InFd); close(OutFd); diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc index a5976cf3a..a7de09c44 100644 --- a/apt-pkg/contrib/fileutl.cc +++ b/apt-pkg/contrib/fileutl.cc @@ -450,8 +450,11 @@ bool ExecWait(pid_t Pid,const char *Name,bool Reap) { if (Reap == true) return false; - if (WIFSIGNALED(Status) != 0 && WTERMSIG(Status) == SIGSEGV) - return _error->Error(_("Sub-process %s received a segmentation fault."),Name); + if (WIFSIGNALED(Status) != 0) + if( WTERMSIG(Status) == SIGSEGV) + return _error->Error(_("Sub-process %s received a segmentation fault."),Name); + else + return _error->Error(_("Sub-process %s received signal %u."),Name, WTERMSIG(Status)); if (WIFEXITED(Status) != 0) return _error->Error(_("Sub-process %s returned an error code (%u)"),Name,WEXITSTATUS(Status)); diff --git a/debian/changelog b/debian/changelog index ba57dbadc..65fd9e590 100644 --- a/debian/changelog +++ b/debian/changelog @@ -20,6 +20,13 @@ apt (0.7.21) UNRELEASED; urgency=low * apt-pkg/algorithms.cc: - consider recommends when making the scores for the problem resolver + * apt-pkg/acquire-worker.cc: + - show error details of failed methods + * apt-pkg/contrib/fileutl.cc: + - if a process aborts with signal, show signal number + * methods/http.cc: + - ignore SIGPIPE, we deal with EPIPE from write in + HttpMethod::ServerDie() (LP: #385144) -- Michael Vogt Thu, 28 May 2009 17:51:42 +0200 diff --git a/methods/http.cc b/methods/http.cc index 1bf798da4..006e89394 100644 --- a/methods/http.cc +++ b/methods/http.cc @@ -1316,9 +1316,11 @@ int HttpMethod::Loop() int main() { setlocale(LC_ALL, ""); + // ignore SIGPIPE, this can happen on write() if the socket + // closes the connection (this is dealt with via ServerDie()) + signal(SIGPIPE, SIG_IGN); HttpMethod Mth; - return Mth.Loop(); } -- cgit v1.2.3-70-g09d2 From e68ca100711326895126dc1fca86a2124a8e8d63 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Mon, 6 Jul 2009 15:46:54 +0200 Subject: Support /etc/apt/preferences.d (Closes: #535512) --- apt-pkg/cachefile.cc | 2 +- apt-pkg/init.cc | 1 + apt-pkg/policy.cc | 50 +++++++++++++++++++++++++++++++++++++++++++++++++- apt-pkg/policy.h | 1 + cmdline/apt-cache.cc | 4 ++-- debian/apt.dirs | 1 + debian/changelog | 3 ++- 7 files changed, 57 insertions(+), 5 deletions(-) (limited to 'debian') diff --git a/apt-pkg/cachefile.cc b/apt-pkg/cachefile.cc index 1a84aea54..5b5e26497 100644 --- a/apt-pkg/cachefile.cc +++ b/apt-pkg/cachefile.cc @@ -92,7 +92,7 @@ bool pkgCacheFile::Open(OpProgress &Progress,bool WithLock) Policy = new pkgPolicy(Cache); if (_error->PendingError() == true) return false; - if (ReadPinFile(*Policy) == false) + if (ReadPinFile(*Policy) == false || ReadPinDir(*Policy) == false) return false; // Create the dependency cache diff --git a/apt-pkg/init.cc b/apt-pkg/init.cc index 338bef66c..4abfb726f 100644 --- a/apt-pkg/init.cc +++ b/apt-pkg/init.cc @@ -67,6 +67,7 @@ bool pkgInitConfig(Configuration &Cnf) Cnf.Set("Dir::Etc::main","apt.conf"); Cnf.Set("Dir::Etc::parts","apt.conf.d"); Cnf.Set("Dir::Etc::preferences","preferences"); + Cnf.Set("Dir::Etc::preferencesparts","preferences.d"); Cnf.Set("Dir::Bin::methods","/usr/lib/apt/methods"); // State diff --git a/apt-pkg/policy.cc b/apt-pkg/policy.cc index 98576fc91..b9a951990 100644 --- a/apt-pkg/policy.cc +++ b/apt-pkg/policy.cc @@ -32,6 +32,9 @@ #include +#include +#include +#include #include #include /*}}}*/ @@ -253,6 +256,51 @@ class PreferenceSection : public pkgTagSection Stop = (const char*) memchr(Stop,'\n',End-Stop); } }; + + +bool ReadPinDir(pkgPolicy &Plcy,string Dir) +{ + if (Dir.empty() == true) + Dir = _config->FindDir("Dir::Etc::PreferencesParts"); + + DIR *D = opendir(Dir.c_str()); + if (D == 0) + return _error->Errno("opendir",_("Unable to read %s"),Dir.c_str()); + + vector List; + + for (struct dirent *Ent = readdir(D); Ent != 0; Ent = readdir(D)) + { + if (Ent->d_name[0] == '.') + continue; + + // Skip bad file names ala run-parts + const char *C = Ent->d_name; + for (; *C != 0; C++) + if (isalpha(*C) == 0 && isdigit(*C) == 0 && *C != '_' && *C != '-') + break; + if (*C != 0) + continue; + + // Make sure it is a file and not something else + string File = flCombine(Dir,Ent->d_name); + struct stat St; + if (stat(File.c_str(),&St) != 0 || S_ISREG(St.st_mode) == 0) + continue; + + List.push_back(File); + } + closedir(D); + + sort(List.begin(),List.end()); + + // Read the files + for (vector::const_iterator I = List.begin(); I != List.end(); I++) + if (ReadPinFile(Plcy, *I) == false) + return false; + return true; +} + /*}}}*/ // ReadPinFile - Load the pin file into a Policy /*{{{*/ // --------------------------------------------------------------------- @@ -278,7 +326,7 @@ bool ReadPinFile(pkgPolicy &Plcy,string File) { string Name = Tags.FindS("Package"); if (Name.empty() == true) - return _error->Error(_("Invalid record in the preferences file, no Package header")); + return _error->Error(_("Invalid record in the preferences file %s, no Package header"), File.c_str()); if (Name == "*") Name = string(); diff --git a/apt-pkg/policy.h b/apt-pkg/policy.h index d5f3b2f75..4894682fa 100644 --- a/apt-pkg/policy.h +++ b/apt-pkg/policy.h @@ -84,5 +84,6 @@ class pkgPolicy : public pkgDepCache::Policy }; bool ReadPinFile(pkgPolicy &Plcy,string File = ""); +bool ReadPinDir(pkgPolicy &Plcy,string Dir = ""); #endif diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc index 4431fd4f9..acef8dc5e 100644 --- a/cmdline/apt-cache.cc +++ b/cmdline/apt-cache.cc @@ -401,7 +401,7 @@ bool DumpAvail(CommandLine &Cmd) pkgCache &Cache = *GCache; pkgPolicy Plcy(&Cache); - if (ReadPinFile(Plcy) == false) + if (ReadPinFile(Plcy) == false || ReadPinDir(Plcy) == false) return false; unsigned long Count = Cache.HeaderP->PackageCount+1; @@ -1515,7 +1515,7 @@ bool Policy(CommandLine &CmdL) pkgCache &Cache = *GCache; pkgPolicy Plcy(&Cache); - if (ReadPinFile(Plcy) == false) + if (ReadPinFile(Plcy) == false || ReadPinDir(Plcy) == false) return false; // Print out all of the package files diff --git a/debian/apt.dirs b/debian/apt.dirs index 47f60e7e3..fb6716c35 100644 --- a/debian/apt.dirs +++ b/debian/apt.dirs @@ -3,6 +3,7 @@ usr/lib/apt/methods usr/lib/dpkg/methods/apt etc/apt etc/apt/apt.conf.d +etc/apt/preferences.d etc/apt/sources.list.d etc/logrotate.d var/cache/apt/archives/partial diff --git a/debian/changelog b/debian/changelog index 668192967..9024f687d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -41,8 +41,9 @@ apt (0.7.22) UNRELEASED; urgency=low * apt-pkg/contrib/configuration.cc: Fix a small memory leak in ReadConfigFile. * Introduce support for the Enhances field. (Closes: #137583) + * Support /etc/apt/preferences.d (Closes: #535512) - -- Christian Perrier Wed, 22 Apr 2009 10:13:54 +0200 + -- 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 5541fea3f0c6b4b40048c161b9201b03243ac3a9 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Mon, 6 Jul 2009 16:20:13 +0200 Subject: configure-index: document Dir::Etc::SourceParts and some other options (Closes: #459605) --- debian/changelog | 2 ++ doc/examples/configure-index | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 668192967..6ffd0459f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -41,6 +41,8 @@ apt (0.7.22) UNRELEASED; urgency=low * apt-pkg/contrib/configuration.cc: Fix a small memory leak in ReadConfigFile. * Introduce support for the Enhances field. (Closes: #137583) + * configure-index: document Dir::Etc::SourceParts and some other options + (Closes: #459605) -- Christian Perrier Wed, 22 Apr 2009 10:13:54 +0200 diff --git a/doc/examples/configure-index b/doc/examples/configure-index index cea0dcc09..b2bc95e69 100644 --- a/doc/examples/configure-index +++ b/doc/examples/configure-index @@ -219,10 +219,13 @@ Dir "/" // Config files Etc "etc/apt/" { - SourceList "sources.list"; Main "apt.conf"; - Preferences "preferences"; Parts "apt.conf.d/"; + Preferences "preferences"; + SourceList "sources.list"; + SourceParts "sources.list.d"; + VendorList "vendors.list"; + VendorParts "vendors.list.d"; }; // Locations of binaries -- cgit v1.2.3-70-g09d2 From 2db5a2dd1b2e9690f73c6c41f3d67b7d7956c293 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Mon, 6 Jul 2009 17:29:12 +0200 Subject: Remove Eugene V. Lyubimkin from uploaders as requested. --- debian/changelog | 1 + debian/control | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 615a0efcb..f4aa1eebf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -44,6 +44,7 @@ apt (0.7.22) UNRELEASED; urgency=low * Support /etc/apt/preferences.d, by adding ReadPinDir() (Closes: #535512) * configure-index: document Dir::Etc::SourceParts and some other options (Closes: #459605) + * Remove Eugene V. Lyubimkin from uploaders as requested. -- Julian Andres Klode Fri, 03 Jul 2009 08:27:35 +0200 diff --git a/debian/control b/debian/control index 8f5d6ff75..84c411509 100644 --- a/debian/control +++ b/debian/control @@ -4,7 +4,7 @@ Priority: important Maintainer: APT Development Team Uploaders: Michael Vogt , Otavio Salvador , Christian Perrier , Daniel Burrows , - Luca Bruno , Eugene V. Lyubimkin + Luca Bruno Standards-Version: 3.8.1.0 Build-Depends: debhelper (>= 5.0), libdb-dev, gettext (>= 0.12), libcurl4-gnutls-dev | libcurl3-gnutls-dev (>= 7.15.5), debiandoc-sgml, docbook-utils (>= 0.6.12), xsltproc, docbook-xsl, xmlto Vcs-Bzr: http://bzr.debian.org/apt/debian-sid/ -- cgit v1.2.3-70-g09d2 From f1c6a8ca0511c623a16bb804ed2c5b6c26c83d78 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 8 Jul 2009 01:03:15 +0200 Subject: [contrib/mmap] implements a theoretical dynamic growing mmap based on Michael Vogts patch in #195018 this commit implements the use of mmap (as preferred) instead of a static char array. In theory this made it possible to grow the mmap as needed, but as it is currently impossible to move the mmap around in the memory the grow is likely to fail but it improve the memory usage a bit, so it is not totally useless for now - and maybe we can adjust the pointers in the future... --- apt-pkg/contrib/mmap.cc | 84 ++++++++++++++++++++++++++++++++++++------------- apt-pkg/contrib/mmap.h | 2 ++ debian/changelog | 2 ++ 3 files changed, 67 insertions(+), 21 deletions(-) (limited to 'debian') diff --git a/apt-pkg/contrib/mmap.cc b/apt-pkg/contrib/mmap.cc index 04a45811b..073bc9eb3 100644 --- a/apt-pkg/contrib/mmap.cc +++ b/apt-pkg/contrib/mmap.cc @@ -13,11 +13,6 @@ libc6 generates warnings -- which should be errors, g++ isn't properly strict. - The configure test notes that some OS's have broken private mmap's - so on those OS's we can't use mmap. This means we have to use - configure to test mmap and can't rely on the POSIX - _POSIX_MAPPED_FILES test. - ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ @@ -166,13 +161,23 @@ DynamicMMap::DynamicMMap(FileFd &F,unsigned long Flags,unsigned long WorkSpace) /*}}}*/ // DynamicMMap::DynamicMMap - Constructor for a non-file backed map /*{{{*/ // --------------------------------------------------------------------- -/* This is just a fancy malloc really.. */ +/* We try here to use mmap to reserve some space - this is much more + cooler than the fallback solution to simply allocate a char array + and could come in handy later than we are able to grow such an mmap */ DynamicMMap::DynamicMMap(unsigned long Flags,unsigned long WorkSpace) : MMap(Flags | NoImmMap | UnMapped), Fd(0), WorkSpace(WorkSpace) { if (_error->PendingError() == true) return; - + +#ifdef _POSIX_MAPPED_FILES + // use anonymous mmap() to get the memory + Base = (unsigned char*) mmap(0, WorkSpace, PROT_READ|PROT_WRITE, + MAP_ANONYMOUS|MAP_PRIVATE, -1, 0); + if(Base != MAP_FAILED) + return; +#endif + // fallback to a static allocated space Base = new unsigned char[WorkSpace]; memset(Base,0,WorkSpace); iSize = 0; @@ -185,7 +190,11 @@ DynamicMMap::~DynamicMMap() { if (Fd == 0) { +#ifdef _POSIX_MAPPED_FILES + munmap(Base, WorkSpace); +#else delete [] (unsigned char *)Base; +#endif return; } @@ -207,14 +216,16 @@ unsigned long DynamicMMap::RawAllocate(unsigned long Size,unsigned long Aln) iSize = Result + Size; - // Just in case error check - if (Result + Size > WorkSpace) + // try to grow the buffer + while(Result + Size > WorkSpace) { - _error->Error(_("Dynamic MMap ran out of room. Please increase the size " - "of APT::Cache-Limit. Current value: %lu. (man 5 apt.conf)"), WorkSpace); - return 0; + if(!Grow()) + { + _error->Error(_("Dynamic MMap ran out of room. Please increase the size " + "of APT::Cache-Limit. Current value: %lu. (man 5 apt.conf)"), WorkSpace); + return 0; + } } - return Result; } /*}}}*/ @@ -234,7 +245,6 @@ unsigned long DynamicMMap::Allocate(unsigned long ItemSize) if (I->ItemSize == ItemSize) break; } - // No pool is allocated, use an unallocated one if (I == Pools + PoolCount) { @@ -270,14 +280,17 @@ unsigned long DynamicMMap::WriteString(const char *String, unsigned long Len) { unsigned long Result = iSize; - // Just in case error check - if (Result + Len > WorkSpace) + // try to grow the buffer + while(Result + Len > WorkSpace) { - _error->Error(_("Dynamic MMap ran out of room. Please increase the size " - "of APT::Cache-Limit. Current value: %lu. (man 5 apt.conf)"), WorkSpace); - return 0; - } - + if(!Grow()) + { + _error->Error(_("Dynamic MMap ran out of room. Please increase the size " + "of APT::Cache-Limit. Current value: %lu. (man 5 apt.conf)"), WorkSpace); + return 0; + } + } + if (Len == (unsigned long)-1) Len = strlen(String); iSize += Len + 1; @@ -286,3 +299,32 @@ unsigned long DynamicMMap::WriteString(const char *String, return Result; } /*}}}*/ +// DynamicMMap::Grow - Grow the mmap /*{{{*/ +// --------------------------------------------------------------------- +/* This method will try to grow the mmap we currently use. This doesn't + work most of the time because we can't move the mmap around in the + memory for now as this would require to adjust quite a lot of pointers + but why we should not at least try to grow it before we give up? */ +bool DynamicMMap::Grow() +{ +#ifdef _POSIX_MAPPED_FILES + unsigned long newSize = WorkSpace + 1024*1024; + + if(Fd != 0) + { + Fd->Seek(newSize - 1); + char C = 0; + Fd->Write(&C,sizeof(C)); + } + + Base = mremap(Base, WorkSpace, newSize, 0); + if(Base == MAP_FAILED) + return false; + + WorkSpace = newSize; + return true; +#else + return false; +#endif +} + /*}}}*/ diff --git a/apt-pkg/contrib/mmap.h b/apt-pkg/contrib/mmap.h index 19cf7582d..bde62217d 100644 --- a/apt-pkg/contrib/mmap.h +++ b/apt-pkg/contrib/mmap.h @@ -84,6 +84,8 @@ class DynamicMMap : public MMap unsigned long WorkSpace; Pool *Pools; unsigned int PoolCount; + + bool Grow(); public: diff --git a/debian/changelog b/debian/changelog index 412435fad..27b798fe5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -34,6 +34,8 @@ apt (0.7.22) UNRELEASED; urgency=low correctly when downloading from multiple sites (Closes: #534752) * add the various foldmarkers in apt-pkg & cmdline (no code change) * versions with a pin of -1 shouldn't be a candidate (Closes: #355237) + * prefer mmap as memory allocator in MMap instead of a static char + array which can (at least in theory) grow dynamic [ Michael Vogt ] * honor the dpkg hold state in new Marker hooks (closes: #64141) -- cgit v1.2.3-70-g09d2 From 13eb93fcb6a03afd8fc05fa2b4c60046473e8507 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 8 Jul 2009 01:11:16 +0200 Subject: add a segfault handler to MMap to show the Cache-Limit message, which can be deactivated with MMap::SegfaultHandler=false (Closes: 535218) --- apt-pkg/contrib/mmap.cc | 24 ++++++++++++++++++++++++ debian/changelog | 2 ++ 2 files changed, 26 insertions(+) (limited to 'debian') diff --git a/apt-pkg/contrib/mmap.cc b/apt-pkg/contrib/mmap.cc index 073bc9eb3..5f56178f4 100644 --- a/apt-pkg/contrib/mmap.cc +++ b/apt-pkg/contrib/mmap.cc @@ -19,6 +19,7 @@ #define _BSD_SOURCE #include #include +#include #include @@ -26,6 +27,8 @@ #include #include #include +#include +#include #include /*}}}*/ @@ -136,6 +139,20 @@ bool MMap::Sync(unsigned long Start,unsigned long Stop) } /*}}}*/ +// DynamicMMapSegfaultHandler /*{{{*/ +// --------------------------------------------------------------------- +/* In theory, the mmap should never segfault because we check the available + size of our mmap before we use it, but there are a few reports out there + which state that the mmap segfaults without further notice. So this handler + will take care of all these segfaults which should never happen... */ +void DynamicMMapSegfaultHandler(int) +{ + _error->Error(_("Dynamic MMap segfaults, most likely because it ran out of room. " + "Please increase the size of APT::Cache-Limit. (man 5 apt.conf)")); + _error->DumpErrors(); + exit(EXIT_FAILURE); +} + /*}}}*/ // DynamicMMap::DynamicMMap - Constructor /*{{{*/ // --------------------------------------------------------------------- /* */ @@ -170,6 +187,13 @@ DynamicMMap::DynamicMMap(unsigned long Flags,unsigned long WorkSpace) : if (_error->PendingError() == true) return; + if (_config->FindB("MMap::SegfaultHandler",true) == true) + { + struct sigaction sa; + sa.sa_handler = DynamicMMapSegfaultHandler; + sigaction(SIGSEGV, &sa, NULL); + } + #ifdef _POSIX_MAPPED_FILES // use anonymous mmap() to get the memory Base = (unsigned char*) mmap(0, WorkSpace, PROT_READ|PROT_WRITE, diff --git a/debian/changelog b/debian/changelog index 27b798fe5..aba5e4cf4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -36,6 +36,8 @@ apt (0.7.22) UNRELEASED; urgency=low * versions with a pin of -1 shouldn't be a candidate (Closes: #355237) * prefer mmap as memory allocator in MMap instead of a static char array which can (at least in theory) grow dynamic + * add a segfault handler to MMap to show the Cache-Limit message, which + can be deactivated with MMap::SegfaultHandler=false (Closes: 535218) [ Michael Vogt ] * honor the dpkg hold state in new Marker hooks (closes: #64141) -- cgit v1.2.3-70-g09d2 From db13bafbde62b4ce4624e8166162a82e33052d38 Mon Sep 17 00:00:00 2001 From: "bubulle@debian.org" <> Date: Fri, 10 Jul 2009 08:00:45 +0200 Subject: German translation update --- debian/changelog | 1 + po/de.po | 383 ++++++++++++++++++++++++++++--------------------------- 2 files changed, 193 insertions(+), 191 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index f4aa1eebf..fe03eb8e0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,6 +13,7 @@ apt (0.7.22) UNRELEASED; urgency=low - fr.po - it.po. Closes: #531758 - ca.po. Closes: #531921 + - de.po. Closes: #536430 * Added translations - ast.po (Asturian by Marcos Alvareez Costales). Closes: #529007, #529730, #535328 diff --git a/po/de.po b/po/de.po index 8dcd52cd8..44ea7132c 100644 --- a/po/de.po +++ b/po/de.po @@ -1,21 +1,23 @@ # German messages for the apt suite. # Copyright (C) 1997, 1998, 1999 Jason Gunthorpe and others. -# Holger Wansing , 2008. +# Holger Wansing , 2008, 2009. # Jens Seidel , 2008. # Michael Piefel , 2001, 2002, 2003, 2004, 2006. # Rüdiger Kuhlmann , 2002. # +# msgid "" msgstr "" -"Project-Id-Version: apt 0.7.14\n" +"Project-Id-Version: apt 0.7.21\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-04-22 12:25+0200\n" -"PO-Revision-Date: 2008-11-13 21:31+0100\n" +"POT-Creation-Date: 2009-06-30 14:09+0200\n" +"PO-Revision-Date: 2009-07-09 22:22+0200\n" "Last-Translator: Holger Wansing \n" -"Language-Team: \n" +"Language-Team: Debian German \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);>\n" #: cmdline/apt-cache.cc:143 #, c-format @@ -158,7 +160,7 @@ msgstr " %4i %s\n" #: cmdline/apt-cache.cc:1714 cmdline/apt-cdrom.cc:138 cmdline/apt-config.cc:70 #: cmdline/apt-extracttemplates.cc:225 ftparchive/apt-ftparchive.cc:547 -#: cmdline/apt-get.cc:2582 cmdline/apt-sortpkgs.cc:144 +#: cmdline/apt-get.cc:2586 cmdline/apt-sortpkgs.cc:144 #, c-format msgid "%s %s for %s compiled on %s %s\n" msgstr "%s %s für %s, kompiliert am %s %s\n" @@ -201,7 +203,7 @@ msgid "" " -o=? Set an arbitrary configuration option, eg -o dir::cache=/tmp\n" "See the apt-cache(8) and apt.conf(5) manual pages for more information.\n" msgstr "" -"Aufruf: apt-cache [Optionen] Befehl\n" +"Aufruf: apt-cache [Optionen] befehl\n" " apt-cache [Optionen] add datei1 [datei2 ...]\n" " apt-cache [Optionen] showpkg paket1 [paket2 ...]\n" " apt-cache [Optionen] showsrc paket1 [paket2 ...]\n" @@ -663,79 +665,79 @@ msgstr "Problem beim Unlinking von %s" msgid "Failed to rename %s to %s" msgstr "Konnte %s nicht in %s umbenennen" -#: cmdline/apt-get.cc:124 +#: cmdline/apt-get.cc:127 msgid "Y" msgstr "J" -#: cmdline/apt-get.cc:146 cmdline/apt-get.cc:1658 +#: cmdline/apt-get.cc:149 cmdline/apt-get.cc:1661 #, c-format msgid "Regex compilation error - %s" msgstr "Fehler beim Kompilieren eines regulären Ausdrucks – %s" -#: cmdline/apt-get.cc:241 +#: cmdline/apt-get.cc:244 msgid "The following packages have unmet dependencies:" msgstr "Die folgenden Pakete haben nicht erfüllte Abhängigkeiten:" -#: cmdline/apt-get.cc:331 +#: cmdline/apt-get.cc:334 #, c-format msgid "but %s is installed" msgstr "aber %s ist installiert" -#: cmdline/apt-get.cc:333 +#: cmdline/apt-get.cc:336 #, c-format msgid "but %s is to be installed" msgstr "aber %s soll installiert werden" -#: cmdline/apt-get.cc:340 +#: cmdline/apt-get.cc:343 msgid "but it is not installable" msgstr "ist aber nicht installierbar" -#: cmdline/apt-get.cc:342 +#: cmdline/apt-get.cc:345 msgid "but it is a virtual package" msgstr "ist aber ein virtuelles Paket" -#: cmdline/apt-get.cc:345 +#: cmdline/apt-get.cc:348 msgid "but it is not installed" msgstr "ist aber nicht installiert" -#: cmdline/apt-get.cc:345 +#: cmdline/apt-get.cc:348 msgid "but it is not going to be installed" msgstr "soll aber nicht installiert werden" -#: cmdline/apt-get.cc:350 +#: cmdline/apt-get.cc:353 msgid " or" msgstr " oder" -#: cmdline/apt-get.cc:379 +#: cmdline/apt-get.cc:382 msgid "The following NEW packages will be installed:" msgstr "Die folgenden NEUEN Pakete werden installiert:" -#: cmdline/apt-get.cc:405 +#: cmdline/apt-get.cc:408 msgid "The following packages will be REMOVED:" msgstr "Die folgenden Pakete werden ENTFERNT:" -#: cmdline/apt-get.cc:427 +#: cmdline/apt-get.cc:430 msgid "The following packages have been kept back:" msgstr "Die folgenden Pakete sind zurückgehalten worden:" -#: cmdline/apt-get.cc:448 +#: cmdline/apt-get.cc:451 msgid "The following packages will be upgraded:" msgstr "Die folgenden Pakete werden aktualisiert:" -#: cmdline/apt-get.cc:469 +#: cmdline/apt-get.cc:472 msgid "The following packages will be DOWNGRADED:" msgstr "Die folgenden Pakete werden DEAKTUALISIERT:" -#: cmdline/apt-get.cc:489 +#: cmdline/apt-get.cc:492 msgid "The following held packages will be changed:" msgstr "Die folgenden gehaltenen Pakete werden verändert:" -#: cmdline/apt-get.cc:542 +#: cmdline/apt-get.cc:545 #, c-format msgid "%s (due to %s) " msgstr "%s (wegen %s) " -#: cmdline/apt-get.cc:550 +#: cmdline/apt-get.cc:553 msgid "" "WARNING: The following essential packages will be removed.\n" "This should NOT be done unless you know exactly what you are doing!" @@ -743,145 +745,145 @@ msgstr "" "WARNUNG: Die folgenden essentiellen Pakete werden entfernt.\n" "Dies sollte NICHT geschehen, außer Sie wissen genau, was Sie tun!" -#: cmdline/apt-get.cc:581 +#: cmdline/apt-get.cc:584 #, c-format msgid "%lu upgraded, %lu newly installed, " msgstr "%lu aktualisiert, %lu neu installiert, " -#: cmdline/apt-get.cc:585 +#: cmdline/apt-get.cc:588 #, c-format msgid "%lu reinstalled, " msgstr "%lu erneut installiert, " -#: cmdline/apt-get.cc:587 +#: cmdline/apt-get.cc:590 #, c-format msgid "%lu downgraded, " msgstr "%lu deaktualisiert, " -#: cmdline/apt-get.cc:589 +#: cmdline/apt-get.cc:592 #, c-format msgid "%lu to remove and %lu not upgraded.\n" msgstr "%lu zu entfernen und %lu nicht aktualisiert.\n" -#: cmdline/apt-get.cc:593 +#: cmdline/apt-get.cc:596 #, c-format msgid "%lu not fully installed or removed.\n" msgstr "%lu nicht vollständig installiert oder entfernt.\n" -#: cmdline/apt-get.cc:667 +#: cmdline/apt-get.cc:670 msgid "Correcting dependencies..." msgstr "Abhängigkeiten werden korrigiert..." -#: cmdline/apt-get.cc:670 +#: cmdline/apt-get.cc:673 msgid " failed." msgstr " fehlgeschlagen." -#: cmdline/apt-get.cc:673 +#: cmdline/apt-get.cc:676 msgid "Unable to correct dependencies" msgstr "Kann Abhängigkeiten nicht korrigieren" -#: cmdline/apt-get.cc:676 +#: cmdline/apt-get.cc:679 msgid "Unable to minimize the upgrade set" msgstr "Kann die Menge zu aktualisierender Pakete nicht minimieren" -#: cmdline/apt-get.cc:678 +#: cmdline/apt-get.cc:681 msgid " Done" msgstr " Fertig" -#: cmdline/apt-get.cc:682 +#: cmdline/apt-get.cc:685 msgid "You might want to run `apt-get -f install' to correct these." msgstr "Probieren Sie »apt-get -f install«, um dies zu korrigieren." -#: cmdline/apt-get.cc:685 +#: cmdline/apt-get.cc:688 msgid "Unmet dependencies. Try using -f." msgstr "Nicht erfüllte Abhängigkeiten. Versuchen Sie, -f zu benutzen." -#: cmdline/apt-get.cc:707 +#: cmdline/apt-get.cc:710 msgid "WARNING: The following packages cannot be authenticated!" msgstr "WARNUNG: Die folgenden Pakete können nicht authentifiziert werden!" -#: cmdline/apt-get.cc:711 +#: cmdline/apt-get.cc:714 msgid "Authentication warning overridden.\n" msgstr "Authentifizierungswarnung überstimmt.\n" -#: cmdline/apt-get.cc:718 +#: cmdline/apt-get.cc:721 msgid "Install these packages without verification [y/N]? " msgstr "Diese Pakete ohne Überprüfung installieren [j/N]? " -#: cmdline/apt-get.cc:720 +#: cmdline/apt-get.cc:723 msgid "Some packages could not be authenticated" msgstr "Einige Pakete konnten nicht authentifiziert werden" -#: cmdline/apt-get.cc:729 cmdline/apt-get.cc:881 +#: cmdline/apt-get.cc:732 cmdline/apt-get.cc:884 msgid "There are problems and -y was used without --force-yes" msgstr "Es gab Probleme und -y wurde ohne --force-yes verwendet" -#: cmdline/apt-get.cc:773 +#: cmdline/apt-get.cc:776 msgid "Internal error, InstallPackages was called with broken packages!" msgstr "Interner Fehler, InstallPackages mit defekten Paketen aufgerufen!" -#: cmdline/apt-get.cc:782 +#: cmdline/apt-get.cc:785 msgid "Packages need to be removed but remove is disabled." msgstr "Pakete müssen entfernt werden, aber Entfernen ist abgeschaltet." -#: cmdline/apt-get.cc:793 +#: cmdline/apt-get.cc:796 msgid "Internal error, Ordering didn't finish" msgstr "Interner Fehler, Anordnung beendete nicht" -#: cmdline/apt-get.cc:809 cmdline/apt-get.cc:1999 cmdline/apt-get.cc:2032 +#: cmdline/apt-get.cc:812 cmdline/apt-get.cc:2003 cmdline/apt-get.cc:2036 msgid "Unable to lock the download directory" msgstr "Kann das Downloadverzeichnis nicht sperren." -#: cmdline/apt-get.cc:819 cmdline/apt-get.cc:2080 cmdline/apt-get.cc:2326 +#: cmdline/apt-get.cc:822 cmdline/apt-get.cc:2084 cmdline/apt-get.cc:2330 #: apt-pkg/cachefile.cc:65 msgid "The list of sources could not be read." msgstr "Die Liste der Quellen konnte nicht gelesen werden." -#: cmdline/apt-get.cc:834 +#: cmdline/apt-get.cc:837 msgid "How odd.. The sizes didn't match, email apt@packages.debian.org" msgstr "" "Wie merkwürdig ... die Größen haben nicht übereingestimmt; schreiben Sie an " "apt@packages.debian.org" -#: cmdline/apt-get.cc:839 +#: cmdline/apt-get.cc:842 #, c-format msgid "Need to get %sB/%sB of archives.\n" msgstr "Es müssen noch %sB von %sB an Archiven heruntergeladen werden.\n" -#: cmdline/apt-get.cc:842 +#: cmdline/apt-get.cc:845 #, c-format msgid "Need to get %sB of archives.\n" msgstr "Es müssen %sB an Archiven heruntergeladen werden.\n" -#: cmdline/apt-get.cc:847 +#: cmdline/apt-get.cc:850 #, c-format msgid "After this operation, %sB of additional disk space will be used.\n" msgstr "Nach dieser Operation werden %sB Plattenplatz zusätzlich benutzt.\n" -#: cmdline/apt-get.cc:850 +#: cmdline/apt-get.cc:853 #, c-format msgid "After this operation, %sB disk space will be freed.\n" msgstr "Nach dieser Operation werden %sB Plattenplatz freigegeben.\n" -#: cmdline/apt-get.cc:864 cmdline/apt-get.cc:2175 +#: cmdline/apt-get.cc:867 cmdline/apt-get.cc:2179 #, c-format msgid "Couldn't determine free space in %s" msgstr "Konnte freien Platz in %s nicht bestimmen" -#: cmdline/apt-get.cc:871 +#: cmdline/apt-get.cc:874 #, c-format msgid "You don't have enough free space in %s." msgstr "Sie haben nicht genug Platz in %s." -#: cmdline/apt-get.cc:887 cmdline/apt-get.cc:907 +#: cmdline/apt-get.cc:890 cmdline/apt-get.cc:910 msgid "Trivial Only specified but this is not a trivial operation." msgstr "»Nur triviale« angegeben, aber dies ist keine triviale Operation." -#: cmdline/apt-get.cc:889 +#: cmdline/apt-get.cc:892 msgid "Yes, do as I say!" msgstr "Ja, tue was ich sage!" -#: cmdline/apt-get.cc:891 +#: cmdline/apt-get.cc:894 #, c-format msgid "" "You are about to do something potentially harmful.\n" @@ -892,28 +894,28 @@ msgstr "" "Zum Fortfahren geben Sie bitte »%s« ein.\n" " ?] " -#: cmdline/apt-get.cc:897 cmdline/apt-get.cc:916 +#: cmdline/apt-get.cc:900 cmdline/apt-get.cc:919 msgid "Abort." msgstr "Abbruch." -#: cmdline/apt-get.cc:912 +#: cmdline/apt-get.cc:915 msgid "Do you want to continue [Y/n]? " msgstr "Möchten Sie fortfahren [J/n]? " -#: cmdline/apt-get.cc:984 cmdline/apt-get.cc:2223 apt-pkg/algorithms.cc:1349 +#: cmdline/apt-get.cc:987 cmdline/apt-get.cc:2227 apt-pkg/algorithms.cc:1400 #, c-format msgid "Failed to fetch %s %s\n" msgstr "Konnte %s nicht holen %s\n" -#: cmdline/apt-get.cc:1002 +#: cmdline/apt-get.cc:1005 msgid "Some files failed to download" msgstr "Einige Dateien konnten nicht heruntergeladen werden" -#: cmdline/apt-get.cc:1003 cmdline/apt-get.cc:2232 +#: cmdline/apt-get.cc:1006 cmdline/apt-get.cc:2236 msgid "Download complete and in download only mode" msgstr "Herunterladen abgeschlossen; Nur-Herunterladen-Modus aktiv" -#: cmdline/apt-get.cc:1009 +#: cmdline/apt-get.cc:1012 msgid "" "Unable to fetch some archives, maybe run apt-get update or try with --fix-" "missing?" @@ -921,48 +923,48 @@ msgstr "" "Konnte einige Archive nicht herunterladen; vielleicht »apt-get update« " "ausführen oder mit »--fix-missing« probieren?" -#: cmdline/apt-get.cc:1013 +#: cmdline/apt-get.cc:1016 msgid "--fix-missing and media swapping is not currently supported" msgstr "--fix-missing und Wechselmedien werden zurzeit nicht unterstützt" -#: cmdline/apt-get.cc:1018 +#: cmdline/apt-get.cc:1021 msgid "Unable to correct missing packages." msgstr "Konnte fehlende Pakete nicht korrigieren." -#: cmdline/apt-get.cc:1019 +#: cmdline/apt-get.cc:1022 msgid "Aborting install." msgstr "Installation abgebrochen." -#: cmdline/apt-get.cc:1053 +#: cmdline/apt-get.cc:1056 #, c-format msgid "Note, selecting %s instead of %s\n" msgstr "Hinweis: wähle %s an Stelle von %s\n" -#: cmdline/apt-get.cc:1063 +#: cmdline/apt-get.cc:1066 #, c-format msgid "Skipping %s, it is already installed and upgrade is not set.\n" msgstr "" "Überspringe %s, es ist schon installiert und »upgrade« ist nicht gesetzt.\n" -#: cmdline/apt-get.cc:1081 +#: cmdline/apt-get.cc:1084 #, c-format msgid "Package %s is not installed, so not removed\n" msgstr "Paket %s ist nicht installiert, wird also auch nicht entfernt\n" -#: cmdline/apt-get.cc:1092 +#: cmdline/apt-get.cc:1095 #, c-format msgid "Package %s is a virtual package provided by:\n" msgstr "Paket %s ist ein virtuelles Paket, das bereitgestellt wird von:\n" -#: cmdline/apt-get.cc:1104 +#: cmdline/apt-get.cc:1107 msgid " [Installed]" msgstr " [Installiert]" -#: cmdline/apt-get.cc:1109 +#: cmdline/apt-get.cc:1112 msgid "You should explicitly select one to install." msgstr "Sie sollten eines explizit zum Installieren auswählen." -#: cmdline/apt-get.cc:1114 +#: cmdline/apt-get.cc:1117 #, c-format msgid "" "Package %s is not available, but is referred to by another package.\n" @@ -973,60 +975,60 @@ msgstr "" "Paket referenziert. Das kann heißen, dass das Paket fehlt, dass es veraltet\n" "ist oder nur aus einer anderen Quelle verfügbar ist.\n" -#: cmdline/apt-get.cc:1133 +#: cmdline/apt-get.cc:1136 msgid "However the following packages replace it:" msgstr "Doch die folgenden Pakete ersetzen es:" -#: cmdline/apt-get.cc:1136 +#: cmdline/apt-get.cc:1139 #, c-format msgid "Package %s has no installation candidate" msgstr "Paket %s hat keinen Installationskandidaten" -#: cmdline/apt-get.cc:1156 +#: cmdline/apt-get.cc:1159 #, c-format msgid "Reinstallation of %s is not possible, it cannot be downloaded.\n" msgstr "" "Erneute Installation von %s ist nicht möglich,\n" "es kann nicht heruntergeladen werden.\n" -#: cmdline/apt-get.cc:1164 +#: cmdline/apt-get.cc:1167 #, c-format msgid "%s is already the newest version.\n" msgstr "%s ist schon die neueste Version.\n" -#: cmdline/apt-get.cc:1193 +#: cmdline/apt-get.cc:1196 #, c-format msgid "Release '%s' for '%s' was not found" msgstr "Release »%s« für »%s« konnte nicht gefunden werden" -#: cmdline/apt-get.cc:1195 +#: cmdline/apt-get.cc:1198 #, c-format msgid "Version '%s' for '%s' was not found" msgstr "Version »%s« für »%s« konnte nicht gefunden werden" -#: cmdline/apt-get.cc:1201 +#: cmdline/apt-get.cc:1204 #, c-format msgid "Selected version %s (%s) for %s\n" msgstr "Gewählte Version %s (%s) für %s\n" -#: cmdline/apt-get.cc:1307 +#: cmdline/apt-get.cc:1310 #, c-format msgid "No source package '%s' picking '%s' instead\n" -msgstr "" +msgstr "Kein Quellpaket »%s«, wähle stattdessen »%s«\n" -#: cmdline/apt-get.cc:1345 +#: cmdline/apt-get.cc:1348 msgid "The update command takes no arguments" msgstr "Der Befehl »update« akzeptiert keine Argumente" -#: cmdline/apt-get.cc:1358 +#: cmdline/apt-get.cc:1361 msgid "Unable to lock the list directory" msgstr "Kann das Listenverzeichnis nicht sperren" -#: cmdline/apt-get.cc:1410 +#: cmdline/apt-get.cc:1413 msgid "We are not supposed to delete stuff, can't start AutoRemover" msgstr "Es soll nichts gelöscht werden, kann AutoRemover nicht starten" -#: cmdline/apt-get.cc:1442 +#: cmdline/apt-get.cc:1445 msgid "" "The following packages were automatically installed and are no longer " "required:" @@ -1034,11 +1036,11 @@ msgstr "" "Die folgenden Pakete wurden automatisch installiert und werden nicht länger " "benötigt:" -#: cmdline/apt-get.cc:1444 +#: cmdline/apt-get.cc:1447 msgid "Use 'apt-get autoremove' to remove them." msgstr "Verwenden Sie »apt-get autoremove«, um sie zu entfernen." -#: cmdline/apt-get.cc:1449 +#: cmdline/apt-get.cc:1452 msgid "" "Hmm, seems like the AutoRemover destroyed something which really\n" "shouldn't happen. Please file a bug report against apt." @@ -1057,44 +1059,44 @@ msgstr "" #. "that package should be filed.") << endl; #. } #. -#: cmdline/apt-get.cc:1452 cmdline/apt-get.cc:1742 +#: cmdline/apt-get.cc:1455 cmdline/apt-get.cc:1745 msgid "The following information may help to resolve the situation:" msgstr "" "Die folgenden Informationen helfen Ihnen vielleicht, die Situation zu lösen:" -#: cmdline/apt-get.cc:1456 +#: cmdline/apt-get.cc:1459 msgid "Internal Error, AutoRemover broke stuff" msgstr "Interner Fehler, AutoRemover hat was kaputt gemacht" -#: cmdline/apt-get.cc:1475 +#: cmdline/apt-get.cc:1478 msgid "Internal error, AllUpgrade broke stuff" msgstr "Interner Fehler, AllUpgrade hat was kaputt gemacht" -#: cmdline/apt-get.cc:1530 +#: cmdline/apt-get.cc:1533 #, c-format msgid "Couldn't find task %s" msgstr "Konnte Task %s nicht finden" -#: cmdline/apt-get.cc:1645 cmdline/apt-get.cc:1681 +#: cmdline/apt-get.cc:1648 cmdline/apt-get.cc:1684 #, c-format msgid "Couldn't find package %s" msgstr "Konnte Paket %s nicht finden" -#: cmdline/apt-get.cc:1668 +#: cmdline/apt-get.cc:1671 #, c-format msgid "Note, selecting %s for regex '%s'\n" msgstr "Hinweis: wähle %s für regulären Ausdruck »%s«\n" -#: cmdline/apt-get.cc:1699 +#: cmdline/apt-get.cc:1702 #, c-format msgid "%s set to manually installed.\n" msgstr "%s wurde als manuell installiert festgelegt.\n" -#: cmdline/apt-get.cc:1712 +#: cmdline/apt-get.cc:1715 msgid "You might want to run `apt-get -f install' to correct these:" msgstr "Probieren Sie »apt-get -f install«, um dies zu korrigieren:" -#: cmdline/apt-get.cc:1715 +#: cmdline/apt-get.cc:1718 msgid "" "Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a " "solution)." @@ -1102,7 +1104,7 @@ msgstr "" "Nicht erfüllte Abhängigkeiten. Versuchen Sie »apt-get -f install« ohne " "jegliche Pakete (oder geben Sie eine Lösung an)." -#: cmdline/apt-get.cc:1727 +#: cmdline/apt-get.cc:1730 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" @@ -1114,120 +1116,120 @@ msgstr "" "Unstable-Distribution verwenden, einige erforderliche Pakete noch nicht\n" "erstellt wurden oder Incoming noch nicht verlassen haben." -#: cmdline/apt-get.cc:1745 +#: cmdline/apt-get.cc:1748 msgid "Broken packages" msgstr "Kaputte Pakete" -#: cmdline/apt-get.cc:1774 +#: cmdline/apt-get.cc:1777 msgid "The following extra packages will be installed:" msgstr "Die folgenden zusätzlichen Pakete werden installiert:" -#: cmdline/apt-get.cc:1863 +#: cmdline/apt-get.cc:1866 msgid "Suggested packages:" msgstr "Vorgeschlagene Pakete:" -#: cmdline/apt-get.cc:1864 +#: cmdline/apt-get.cc:1867 msgid "Recommended packages:" msgstr "Empfohlene Pakete:" -#: cmdline/apt-get.cc:1892 +#: cmdline/apt-get.cc:1896 msgid "Calculating upgrade... " msgstr "Berechne Upgrade (Paketaktualisierung) ..." -#: cmdline/apt-get.cc:1895 methods/ftp.cc:702 methods/connect.cc:112 +#: cmdline/apt-get.cc:1899 methods/ftp.cc:702 methods/connect.cc:112 msgid "Failed" msgstr "Fehlgeschlagen" -#: cmdline/apt-get.cc:1900 +#: cmdline/apt-get.cc:1904 msgid "Done" msgstr "Fertig" -#: cmdline/apt-get.cc:1967 cmdline/apt-get.cc:1975 +#: cmdline/apt-get.cc:1971 cmdline/apt-get.cc:1979 msgid "Internal error, problem resolver broke stuff" msgstr "Interner Fehler, der Problem-Löser hat was kaputt gemacht" -#: cmdline/apt-get.cc:2075 +#: cmdline/apt-get.cc:2079 msgid "Must specify at least one package to fetch source for" msgstr "" "Es muss mindestens ein Paket angegeben werden, dessen Quellen geholt werden " "sollen" -#: cmdline/apt-get.cc:2105 cmdline/apt-get.cc:2344 +#: cmdline/apt-get.cc:2109 cmdline/apt-get.cc:2348 #, c-format msgid "Unable to find a source package for %s" msgstr "Kann Quellpaket für %s nicht finden" -#: cmdline/apt-get.cc:2154 +#: cmdline/apt-get.cc:2158 #, c-format msgid "Skipping already downloaded file '%s'\n" msgstr "Überspringe schon heruntergeladene Datei »%s«\n" -#: cmdline/apt-get.cc:2182 +#: cmdline/apt-get.cc:2186 #, c-format msgid "You don't have enough free space in %s" msgstr "Sie haben nicht genug freien Platz in %s" -#: cmdline/apt-get.cc:2188 +#: cmdline/apt-get.cc:2192 #, c-format msgid "Need to get %sB/%sB of source archives.\n" msgstr "Es müssen noch %sB von %sB an Quellarchiven heruntergeladen werden.\n" -#: cmdline/apt-get.cc:2191 +#: cmdline/apt-get.cc:2195 #, c-format msgid "Need to get %sB of source archives.\n" msgstr "Es müssen %sB an Quellarchiven heruntergeladen werden.\n" -#: cmdline/apt-get.cc:2197 +#: cmdline/apt-get.cc:2201 #, c-format msgid "Fetch source %s\n" msgstr "Hole Quelle %s\n" -#: cmdline/apt-get.cc:2228 +#: cmdline/apt-get.cc:2232 msgid "Failed to fetch some archives." msgstr "Konnte einige Archive nicht holen." -#: cmdline/apt-get.cc:2256 +#: cmdline/apt-get.cc:2260 #, c-format msgid "Skipping unpack of already unpacked source in %s\n" msgstr "Überspringe Entpacken der schon entpackten Quelle in %s\n" -#: cmdline/apt-get.cc:2268 +#: cmdline/apt-get.cc:2272 #, c-format msgid "Unpack command '%s' failed.\n" msgstr "Entpack-Befehl »%s« fehlgeschlagen.\n" -#: cmdline/apt-get.cc:2269 +#: cmdline/apt-get.cc:2273 #, c-format msgid "Check if the 'dpkg-dev' package is installed.\n" msgstr "Überprüfen Sie, ob das Paket »dpkg-dev« installiert ist.\n" -#: cmdline/apt-get.cc:2286 +#: cmdline/apt-get.cc:2290 #, c-format msgid "Build command '%s' failed.\n" msgstr "Build-Befehl »%s« fehlgeschlagen.\n" -#: cmdline/apt-get.cc:2305 +#: cmdline/apt-get.cc:2309 msgid "Child process failed" msgstr "Kindprozess fehlgeschlagen" -#: cmdline/apt-get.cc:2321 +#: cmdline/apt-get.cc:2325 msgid "Must specify at least one package to check builddeps for" msgstr "" "Es muss zumindest ein Paket angegeben werden, dessen Bau-Abhängigkeiten\n" "überprüft werden sollen." -#: cmdline/apt-get.cc:2349 +#: cmdline/apt-get.cc:2353 #, c-format msgid "Unable to get build-dependency information for %s" msgstr "" "Informationen zu Bau-Abhängigkeiten für %s konnten nicht gefunden werden." -#: cmdline/apt-get.cc:2369 +#: cmdline/apt-get.cc:2373 #, c-format msgid "%s has no build depends.\n" msgstr "%s hat keine Bau-Abhängigkeiten.\n" -#: cmdline/apt-get.cc:2421 +#: cmdline/apt-get.cc:2425 #, c-format msgid "" "%s dependency for %s cannot be satisfied because the package %s cannot be " @@ -1236,7 +1238,7 @@ msgstr "" "%s-Abhängigkeit für %s kann nicht erfüllt werden, da Paket %s nicht gefunden " "werden kann." -#: cmdline/apt-get.cc:2474 +#: cmdline/apt-get.cc:2478 #, c-format msgid "" "%s dependency for %s cannot be satisfied because no available versions of " @@ -1245,33 +1247,32 @@ msgstr "" "%s-Abhängigkeit für %s kann nicht erfüllt werden, da keine verfügbare " "Version von Paket %s die Versionsanforderungen erfüllen kann." -#: cmdline/apt-get.cc:2510 +#: cmdline/apt-get.cc:2514 #, c-format msgid "Failed to satisfy %s dependency for %s: Installed package %s is too new" msgstr "" "Konnte die %s-Abhängigkeit für %s nicht erfüllen: Installiertes Paket %s ist " "zu neu." -#: cmdline/apt-get.cc:2537 +#: cmdline/apt-get.cc:2541 #, c-format msgid "Failed to satisfy %s dependency for %s: %s" msgstr "Konnte die %s-Abhängigkeit für %s nicht erfüllen: %s" -#: cmdline/apt-get.cc:2551 +#: cmdline/apt-get.cc:2555 #, c-format msgid "Build-dependencies for %s could not be satisfied." msgstr "Bau-Abhängigkeiten für %s konnten nicht erfüllt werden." -#: cmdline/apt-get.cc:2555 +#: cmdline/apt-get.cc:2559 msgid "Failed to process build dependencies" msgstr "Verarbeitung der Bau-Abhängigkeiten fehlgeschlagen" -#: cmdline/apt-get.cc:2587 +#: cmdline/apt-get.cc:2591 msgid "Supported modules:" msgstr "Unterstützte Module:" -#: cmdline/apt-get.cc:2628 -#, fuzzy +#: cmdline/apt-get.cc:2632 msgid "" "Usage: apt-get [options] command\n" " apt-get [options] install|remove pkg1 [pkg2 ...]\n" @@ -1330,7 +1331,7 @@ msgstr "" " remove – Pakete entfernen\n" " autoremove – alle nicht mehr verwendeten Pakete automatisch " "entfernen\n" -" purge – entferne Pakete restlos\n" +" purge – entferne Pakete restlos (inkl. Konfigurationsdateien)\n" " source – Quellarchive herunterladen\n" " build-dep – die Bau-Abhängigkeiten für Quellpakete konfigurieren\n" " dist-upgrade – spezielles Upgrade (Paketaktualisierung) für die " @@ -1362,6 +1363,14 @@ msgstr "" "weitergehende Informationen und Optionen.\n" " Dieses APT hat Super-Kuh-Kräfte.\n" +#: cmdline/apt-get.cc:2799 +msgid "" +"NOTE: This is only a simulation!\n" +" apt-get needs root privileges for real execution.\n" +" Keep also in mind that locking is deactivated,\n" +" so don't depend on the relevance to the real current situation!" +msgstr "" + #: cmdline/acqprogress.cc:55 msgid "Hit " msgstr "OK " @@ -1597,7 +1606,7 @@ msgstr "Überschreibe Paket-Treffer ohne Version für %s" msgid "File %s/%s overwrites the one in the package %s" msgstr "Datei %s/%s überschreibt die Datei in Paket %s" -#: apt-inst/extract.cc:464 apt-pkg/contrib/configuration.cc:821 +#: apt-inst/extract.cc:464 apt-pkg/contrib/configuration.cc:822 #: apt-pkg/contrib/cdromutl.cc:150 apt-pkg/sourcelist.cc:320 #: apt-pkg/acquire.cc:418 apt-pkg/clean.cc:34 #, c-format @@ -2135,32 +2144,34 @@ msgid "" "Dynamic MMap ran out of room. Please increase the size of APT::Cache-Limit. " "Current value: %lu. (man 5 apt.conf)" msgstr "" +"Nicht genügend Platz für Dynamic MMap. Bitte erhöhen Sie den Wert von APT::" +"Cache-Limit. Aktueller Wert: %lu. (Siehe auch man 5 apt.conf.)" #. d means days, h means hours, min means minutes, s means seconds #: apt-pkg/contrib/strutl.cc:335 #, c-format msgid "%lid %lih %limin %lis" -msgstr "" +msgstr "%liT %liS %liMin %lis" #. h means hours, min means minutes, s means seconds #: apt-pkg/contrib/strutl.cc:342 #, c-format msgid "%lih %limin %lis" -msgstr "" +msgstr "%liS %liMin %lis" #. min means minutes, s means seconds #: apt-pkg/contrib/strutl.cc:349 #, c-format msgid "%limin %lis" -msgstr "" +msgstr "%liMin %lis" #. s means seconds #: apt-pkg/contrib/strutl.cc:354 #, c-format msgid "%lis" -msgstr "" +msgstr "%lis" -#: apt-pkg/contrib/strutl.cc:1018 +#: apt-pkg/contrib/strutl.cc:1029 #, c-format msgid "Selection %s not found" msgstr "Auswahl %s nicht gefunden" @@ -2175,43 +2186,43 @@ msgstr "Nicht erkannte Typabkürzung: »%c«" msgid "Opening configuration file %s" msgstr "Öffne Konfigurationsdatei %s" -#: apt-pkg/contrib/configuration.cc:662 +#: apt-pkg/contrib/configuration.cc:663 #, c-format msgid "Syntax error %s:%u: Block starts with no name." msgstr "Syntaxfehler %s:%u: Block fängt ohne Namen an." -#: apt-pkg/contrib/configuration.cc:681 +#: apt-pkg/contrib/configuration.cc:682 #, c-format msgid "Syntax error %s:%u: Malformed tag" msgstr "Syntaxfehler %s:%u: Missgestaltetes Tag" -#: apt-pkg/contrib/configuration.cc:698 +#: apt-pkg/contrib/configuration.cc:699 #, c-format msgid "Syntax error %s:%u: Extra junk after value" msgstr "Syntaxfehler %s:%u: Zusätzlicher Müll nach Wert" -#: apt-pkg/contrib/configuration.cc:738 +#: apt-pkg/contrib/configuration.cc:739 #, c-format msgid "Syntax error %s:%u: Directives can only be done at the top level" msgstr "" "Syntaxfehler %s:%u: Direktiven können nur auf oberster Ebene benutzt werden" -#: apt-pkg/contrib/configuration.cc:745 +#: apt-pkg/contrib/configuration.cc:746 #, c-format msgid "Syntax error %s:%u: Too many nested includes" msgstr "Syntaxfehler %s:%u: Zu viele verschachtelte Einbindungen (include)" -#: apt-pkg/contrib/configuration.cc:749 apt-pkg/contrib/configuration.cc:754 +#: apt-pkg/contrib/configuration.cc:750 apt-pkg/contrib/configuration.cc:755 #, c-format msgid "Syntax error %s:%u: Included from here" msgstr "Syntaxfehler %s:%u: Eingefügt von hier" -#: apt-pkg/contrib/configuration.cc:758 +#: apt-pkg/contrib/configuration.cc:759 #, c-format msgid "Syntax error %s:%u: Unsupported directive '%s'" msgstr "Syntaxfehler %s:%u: Nicht unterstützte Direktive »%s«" -#: apt-pkg/contrib/configuration.cc:809 +#: apt-pkg/contrib/configuration.cc:810 #, c-format msgid "Syntax error %s:%u: Extra junk at end of file" msgstr "Syntaxfehler %s:%u: Zusätzlicher Müll am Dateiende" @@ -2355,101 +2366,105 @@ msgstr "Beim Unlinking der Datei trat ein Problem auf" msgid "Problem syncing the file" msgstr "Beim Synchronisieren einer Datei trat ein Problem auf" -#: apt-pkg/pkgcache.cc:132 +#: apt-pkg/pkgcache.cc:133 msgid "Empty package cache" msgstr "Leerer Paket-Cache" -#: apt-pkg/pkgcache.cc:138 +#: apt-pkg/pkgcache.cc:139 msgid "The package cache file is corrupted" msgstr "Die Paket-Cache-Datei ist beschädigt" -#: apt-pkg/pkgcache.cc:143 +#: apt-pkg/pkgcache.cc:144 msgid "The package cache file is an incompatible version" msgstr "Die Paket-Cache-Datei liegt in einer inkompatiblen Version vor" -#: apt-pkg/pkgcache.cc:148 +#: apt-pkg/pkgcache.cc:149 #, c-format msgid "This APT does not support the versioning system '%s'" msgstr "Dieses APT unterstützt das Versionssystem »%s« nicht" -#: apt-pkg/pkgcache.cc:153 +#: apt-pkg/pkgcache.cc:154 msgid "The package cache was built for a different architecture" msgstr "Der Paket-Cache wurde für eine andere Architektur aufgebaut" -#: apt-pkg/pkgcache.cc:224 +#: apt-pkg/pkgcache.cc:225 msgid "Depends" msgstr "Hängt ab" -#: apt-pkg/pkgcache.cc:224 +#: apt-pkg/pkgcache.cc:225 msgid "PreDepends" msgstr "Hängt ab (vorher)" -#: apt-pkg/pkgcache.cc:224 +#: apt-pkg/pkgcache.cc:225 msgid "Suggests" msgstr "Schlägt vor" -#: apt-pkg/pkgcache.cc:225 +#: apt-pkg/pkgcache.cc:226 msgid "Recommends" msgstr "Empfiehlt" -#: apt-pkg/pkgcache.cc:225 +#: apt-pkg/pkgcache.cc:226 msgid "Conflicts" msgstr "Kollidiert" -#: apt-pkg/pkgcache.cc:225 +#: apt-pkg/pkgcache.cc:226 msgid "Replaces" msgstr "Ersetzt" -#: apt-pkg/pkgcache.cc:226 +#: apt-pkg/pkgcache.cc:227 msgid "Obsoletes" msgstr "Veraltet" -#: apt-pkg/pkgcache.cc:226 +#: apt-pkg/pkgcache.cc:227 msgid "Breaks" msgstr "Stört" -#: apt-pkg/pkgcache.cc:237 +#: apt-pkg/pkgcache.cc:227 +msgid "Enhances" +msgstr "" + +#: apt-pkg/pkgcache.cc:238 msgid "important" msgstr "wichtig" -#: apt-pkg/pkgcache.cc:237 +#: apt-pkg/pkgcache.cc:238 msgid "required" msgstr "erforderlich" -#: apt-pkg/pkgcache.cc:237 +#: apt-pkg/pkgcache.cc:238 msgid "standard" msgstr "standard" -#: apt-pkg/pkgcache.cc:238 +#: apt-pkg/pkgcache.cc:239 msgid "optional" msgstr "optional" -#: apt-pkg/pkgcache.cc:238 +#: apt-pkg/pkgcache.cc:239 msgid "extra" msgstr "extra" -#: apt-pkg/depcache.cc:121 apt-pkg/depcache.cc:150 +#: apt-pkg/depcache.cc:123 apt-pkg/depcache.cc:152 msgid "Building dependency tree" msgstr "Abhängigkeitsbaum wird aufgebaut" -#: apt-pkg/depcache.cc:122 +#: apt-pkg/depcache.cc:124 msgid "Candidate versions" msgstr "Mögliche Versionen" -#: apt-pkg/depcache.cc:151 +#: apt-pkg/depcache.cc:153 msgid "Dependency generation" msgstr "Abhängigkeits-Generierung" -#: apt-pkg/depcache.cc:172 apt-pkg/depcache.cc:191 apt-pkg/depcache.cc:195 +#: apt-pkg/depcache.cc:174 apt-pkg/depcache.cc:193 apt-pkg/depcache.cc:197 msgid "Reading state information" msgstr "Lese Status-Informationen ein" -#: apt-pkg/depcache.cc:219 +#: apt-pkg/depcache.cc:221 #, c-format msgid "Failed to open StateFile %s" msgstr "Konnte Statusdatei %s nicht öffnen" -#: apt-pkg/depcache.cc:225 +#: apt-pkg/depcache.cc:227 #, c-format msgid "Failed to write temporary StateFile %s" msgstr "Konnte temporäre Statusdatei %s nicht schreiben" @@ -2539,7 +2554,7 @@ msgstr "" "Das Paket %s muss neu installiert werden, ich kann aber kein Archiv dafür " "finden." -#: apt-pkg/algorithms.cc:1107 +#: apt-pkg/algorithms.cc:1147 msgid "" "Error, pkgProblemResolver::Resolve generated breaks, this may be caused by " "held packages." @@ -2547,11 +2562,11 @@ msgstr "" "Fehler: pkgProblemResolver::Resolve hat Unterbrechungen hervorgerufen, dies " "könnte durch gehaltene Pakete hervorgerufen worden sein." -#: apt-pkg/algorithms.cc:1109 +#: apt-pkg/algorithms.cc:1149 msgid "Unable to correct problems, you have held broken packages." msgstr "Kann Probleme nicht korrigieren, Sie haben gehaltene defekte Pakete." -#: apt-pkg/algorithms.cc:1375 apt-pkg/algorithms.cc:1377 +#: apt-pkg/algorithms.cc:1426 apt-pkg/algorithms.cc:1428 msgid "" "Some index files failed to download, they have been ignored, or old ones " "used instead." @@ -2628,16 +2643,16 @@ msgstr "" msgid "You may want to run apt-get update to correct these problems" msgstr "Probieren Sie »apt-get update«, um diese Probleme zu korrigieren." -#: apt-pkg/policy.cc:267 +#: apt-pkg/policy.cc:281 msgid "Invalid record in the preferences file, no Package header" msgstr "Ungültiger Eintrag in Einstellungsdatei, keine »Package«-Kopfzeilen" -#: apt-pkg/policy.cc:289 +#: apt-pkg/policy.cc:303 #, c-format msgid "Did not understand pin type %s" msgstr "Konnte Pinning-Typ (pin type) %s nicht verstehen" -#: apt-pkg/policy.cc:297 +#: apt-pkg/policy.cc:311 msgid "No priority (or zero) specified for pin" msgstr "Keine Priorität (oder Null) für Pin angegeben" @@ -2979,7 +2994,7 @@ msgstr "" #: apt-pkg/deb/debsystem.cc:100 msgid "Not locked" -msgstr "" +msgstr "Nicht gesperrt" #: methods/rred.cc:219 msgid "Could not patch file" @@ -2988,17 +3003,3 @@ msgstr "Konnte Datei nicht patchen" #: methods/rsh.cc:330 msgid "Connection closed prematurely" msgstr "Verbindung zu früh beendet" - -#~ msgid "Dynamic MMap ran out of room" -#~ msgstr "Kein Platz für Dynamic MMap" - -#~ msgid "" -#~ "Since you only requested a single operation it is extremely likely that\n" -#~ "the package is simply not installable and a bug report against\n" -#~ "that package should be filed." -#~ msgstr "" -#~ "Da Sie nur eine einzige Operation angefordert haben, ist es sehr " -#~ "wahrscheinlich,\n" -#~ "dass das Paket einfach nicht installierbar ist; Sie sollten einen " -#~ "Fehlerbericht\n" -#~ "gegen dieses Paket erstellen." -- cgit v1.2.3-70-g09d2 From 6e7c6c3f58193fd5db3d9d598ac65a1571522a58 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 14 Jul 2009 11:23:38 +0200 Subject: * debian/apt.cron.daily: - if the timestamp is too far in the future, delete it --- debian/apt.cron.daily | 7 +++++++ debian/changelog | 2 ++ 2 files changed, 9 insertions(+) (limited to 'debian') diff --git a/debian/apt.cron.daily b/debian/apt.cron.daily index 5c5ca88c7..b40bb2c30 100644 --- a/debian/apt.cron.daily +++ b/debian/apt.cron.daily @@ -76,6 +76,13 @@ check_stamp() #echo "stampfile: $1" #echo "interval=$interval, now=$now, stamp=$stamp, delta=$delta" + # remove timestamps a day (or more) in the future and force re-check + if [ $stamp -gt $(($now+86400)) ]; then + echo "WARNING: file $stamp_file has a timestamp in the future: $stamp" + rm -f "$stamp_file" + return 0 + fi + if [ $delta -ge $interval ]; then return 0 fi diff --git a/debian/changelog b/debian/changelog index fe03eb8e0..7f14502e7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -37,6 +37,8 @@ apt (0.7.22) UNRELEASED; urgency=low [ Michael Vogt ] * honor the dpkg hold state in AutoInstOk (closes: #64141) + * debian/apt.cron.daily: + - if the timestamp is too far in the future, delete it [ Julian Andres Klode ] * apt-pkg/contrib/configuration.cc: Fix a small memory leak in -- cgit v1.2.3-70-g09d2 From 6009e60d0192832277242438ad7ca2fc24a4c075 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 15 Jul 2009 23:57:07 +0200 Subject: display warnings instead of errors if the parts dirs doesn't exist Parts dirs are /etc/apt/{sources.list,apt.conf,preferences}.d (in the default setup) --- apt-pkg/cachefile.cc | 4 +++- apt-pkg/init.cc | 17 ++++++++++++----- apt-pkg/policy.cc | 11 ++++++++++- apt-pkg/sourcelist.cc | 8 ++++++-- debian/changelog | 1 + 5 files changed, 32 insertions(+), 9 deletions(-) (limited to 'debian') diff --git a/apt-pkg/cachefile.cc b/apt-pkg/cachefile.cc index 0b1efb9ff..790312dc8 100644 --- a/apt-pkg/cachefile.cc +++ b/apt-pkg/cachefile.cc @@ -48,6 +48,7 @@ pkgCacheFile::~pkgCacheFile() /* */ bool pkgCacheFile::BuildCaches(OpProgress &Progress,bool WithLock) { + const bool ErrorWasEmpty = _error->empty(); if (WithLock == true) if (_system->Lock() == false) return false; @@ -70,7 +71,7 @@ bool pkgCacheFile::BuildCaches(OpProgress &Progress,bool WithLock) return _error->Error(_("The package lists or status file could not be parsed or opened.")); /* This sux, remove it someday */ - if (_error->empty() == false) + if (ErrorWasEmpty == true && _error->empty() == false) _error->Warning(_("You may want to run apt-get update to correct these problems")); Cache = new pkgCache(Map); @@ -91,6 +92,7 @@ bool pkgCacheFile::Open(OpProgress &Progress,bool WithLock) Policy = new pkgPolicy(Cache); if (_error->PendingError() == true) return false; + if (ReadPinFile(*Policy) == false || ReadPinDir(*Policy) == false) return false; diff --git a/apt-pkg/init.cc b/apt-pkg/init.cc index 4abfb726f..63caade36 100644 --- a/apt-pkg/init.cc +++ b/apt-pkg/init.cc @@ -81,19 +81,26 @@ bool pkgInitConfig(Configuration &Cnf) // Read an alternate config file const char *Cfg = getenv("APT_CONFIG"); - if (Cfg != 0 && FileExists(Cfg) == true) - Res &= ReadConfigFile(Cnf,Cfg); - + if (Cfg != 0) + { + if (FileExists(Cfg) == true) + Res &= ReadConfigFile(Cnf,Cfg); + else + _error->WarningE("FileExists",_("Unable to read %s"),Cfg); + } + // Read the configuration parts dir string Parts = Cnf.FindDir("Dir::Etc::parts"); if (FileExists(Parts) == true) Res &= ReadConfigDir(Cnf,Parts); - + else + _error->WarningE("FileExists",_("Unable to read %s"),Parts.c_str()); + // Read the main config file string FName = Cnf.FindFile("Dir::Etc::main"); if (FileExists(FName) == true) Res &= ReadConfigFile(Cnf,FName); - + if (Res == false) return false; diff --git a/apt-pkg/policy.cc b/apt-pkg/policy.cc index 26d1c17bd..81fdb0431 100644 --- a/apt-pkg/policy.cc +++ b/apt-pkg/policy.cc @@ -267,12 +267,21 @@ class PreferenceSection : public pkgTagSection /*}}}*/ // ReadPinDir - Load the pin files from this dir into a Policy /*{{{*/ // --------------------------------------------------------------------- -/* */ +/* This will load each pin file in the given dir into a Policy. If the + given dir is empty the dir set in Dir::Etc::PreferencesParts is used. + Note also that this method will issue a warning if the dir does not + exists but it will return true in this case! */ bool ReadPinDir(pkgPolicy &Plcy,string Dir) { if (Dir.empty() == true) Dir = _config->FindDir("Dir::Etc::PreferencesParts"); + if (FileExists(Dir) == false) + { + _error->WarningE("FileExists",_("Unable to read %s"),Dir.c_str()); + return true; + } + DIR *D = opendir(Dir.c_str()); if (D == 0) return _error->Errno("opendir",_("Unable to read %s"),Dir.c_str()); diff --git a/apt-pkg/sourcelist.cc b/apt-pkg/sourcelist.cc index fea645078..47a08ad90 100644 --- a/apt-pkg/sourcelist.cc +++ b/apt-pkg/sourcelist.cc @@ -158,12 +158,16 @@ bool pkgSourceList::ReadMainList() // entries in sources.list.d. string Main = _config->FindFile("Dir::Etc::sourcelist"); if (FileExists(Main) == true) - Res &= ReadAppend(Main); + Res &= ReadAppend(Main); + else + _error->WarningE("FileExists",_("Unable to read %s"),Main.c_str()); string Parts = _config->FindDir("Dir::Etc::sourceparts"); if (FileExists(Parts) == true) Res &= ReadSourceDir(Parts); - + else + _error->WarningE("FileExists",_("Unable to read %s"),Parts.c_str()); + return Res; } /*}}}*/ diff --git a/debian/changelog b/debian/changelog index 786b8a86f..e4da484d4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -39,6 +39,7 @@ apt (0.7.22) UNRELEASED; urgency=low array which can (at least in theory) grow dynamic * add a segfault handler to MMap to show the Cache-Limit message, which can be deactivated with MMap::SegfaultHandler=false (Closes: 535218) + * display warnings instead of errors if the parts dirs doesn't exist [ Michael Vogt ] * honor the dpkg hold state in new Marker hooks (closes: #64141) -- cgit v1.2.3-70-g09d2 From 04f4e1a3b110ef5ff8870816169f8f0b9eb23dce Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Thu, 16 Jul 2009 12:59:39 +0200 Subject: * apt-pkg/contrib/hashes.cc, apt-pkg/contrib/md5.cc: - Support reading until EOF if Size=0 to match behaviour of SHA1Summation and SHA256Summation --- apt-pkg/contrib/hashes.cc | 13 +++++++++---- apt-pkg/contrib/md5.cc | 13 +++++++++---- debian/changelog | 3 +++ 3 files changed, 21 insertions(+), 8 deletions(-) (limited to 'debian') diff --git a/apt-pkg/contrib/hashes.cc b/apt-pkg/contrib/hashes.cc index fcc2f887c..70f2db06d 100644 --- a/apt-pkg/contrib/hashes.cc +++ b/apt-pkg/contrib/hashes.cc @@ -108,11 +108,16 @@ bool Hashes::AddFD(int Fd,unsigned long Size) { unsigned char Buf[64*64]; int Res = 0; - while (Size != 0) + int ToEOF = (Size == 0); + while (Size != 0 || ToEOF) { - Res = read(Fd,Buf,min(Size,(unsigned long)sizeof(Buf))); - if (Res < 0 || (unsigned)Res != min(Size,(unsigned long)sizeof(Buf))) - return false; + unsigned n = sizeof(Buf); + if (!ToEOF) n = min(Size,(unsigned long)n); + Res = read(Fd,Buf,n); + if (Res < 0 || (!ToEOF && (unsigned) Res != n)) // error, or short read + return false; + if (ToEOF && Res == 0) // EOF + break; Size -= Res; MD5.Add(Buf,Res); SHA1.Add(Buf,Res); diff --git a/apt-pkg/contrib/md5.cc b/apt-pkg/contrib/md5.cc index a095f8f0f..2bfd70f1b 100644 --- a/apt-pkg/contrib/md5.cc +++ b/apt-pkg/contrib/md5.cc @@ -294,11 +294,16 @@ bool MD5Summation::AddFD(int Fd,unsigned long Size) { unsigned char Buf[64*64]; int Res = 0; - while (Size != 0) + int ToEOF = (Size == 0); + while (Size != 0 || ToEOF) { - Res = read(Fd,Buf,min(Size,(unsigned long)sizeof(Buf))); - if (Res < 0 || (unsigned)Res != min(Size,(unsigned long)sizeof(Buf))) - return false; + unsigned n = sizeof(Buf); + if (!ToEOF) n = min(Size,(unsigned long)n); + Res = read(Fd,Buf,n); + if (Res < 0 || (!ToEOF && (unsigned) Res != n)) // error, or short read + return false; + if (ToEOF && Res == 0) // EOF + break; Size -= Res; Add(Buf,Res); } diff --git a/debian/changelog b/debian/changelog index 7f14502e7..fc88e08cb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -48,6 +48,9 @@ apt (0.7.22) UNRELEASED; urgency=low * configure-index: document Dir::Etc::SourceParts and some other options (Closes: #459605) * Remove Eugene V. Lyubimkin from uploaders as requested. + * apt-pkg/contrib/hashes.cc, apt-pkg/contrib/md5.cc: + - Support reading until EOF if Size=0 to match behaviour of + SHA1Summation and SHA256Summation -- Julian Andres Klode Fri, 03 Jul 2009 08:27:35 +0200 -- cgit v1.2.3-70-g09d2 From 7b139dabdcdff68a2854405e55924559591df8d0 Mon Sep 17 00:00:00 2001 From: "bubulle@debian.org" <> Date: Fri, 17 Jul 2009 20:08:54 +0200 Subject: Update French manpage translation --- debian/changelog | 2 + doc/fr/apt.conf.fr.5.xml | 534 +++++++++++++++++++++++++++++++++++++---------- 2 files changed, 426 insertions(+), 110 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index fc88e08cb..6ce3b7c7d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,8 @@ apt (0.7.22) UNRELEASED; urgency=low * Documentation translations: - Fix a typo in apt-get(8) French translation. Closes: #525043 Thanks to Guillaume Delacour for spotting it. + - Updated apt.conf(5) manpgae French translation. + Thanks to Aurélien Couderc. * Translations: - fr.po - sk.po. Closes: #525857 diff --git a/doc/fr/apt.conf.fr.5.xml b/doc/fr/apt.conf.fr.5.xml index 88ce46134..f4d8eddb8 100644 --- a/doc/fr/apt.conf.fr.5.xml +++ b/doc/fr/apt.conf.fr.5.xml @@ -15,7 +15,7 @@ &apt-email; &apt-product; - 29 Février 2004 + 11 juillet 2008 @@ -33,26 +33,30 @@ Le fichier apt.conf est le principal fichier de configurati de la collection d'outils que constitue APT ; tous les outils font appel à ce fichier de configuration et utilisent un analyseur syntaxique en ligne de commande commun afin de fournir un environnement uniforme. Quand un outil -d'APT démarre, il lit (si elle existe) la variable d'environnement -APT_CONFIG ; puis il lit les fichiers situés dans +d'APT démarre, il lit la configuration désignée par variable d'environnement +APT_CONFIG (si elle existe), puis il lit les fichiers situés dans Dir::Etc::Parts ainsi que le principal fichier de configuration indiqué par Dir::Etc::main ; enfin il applique les options de -la ligne de commande qui annulent les directives de configuration, chargeant, -si nécessaire, d'autres fichiers de configuration. +la ligne de commande qui prévalent sur les directives de configuration, chargeant +si nécessaire d'autres fichiers de configuration. Le fichier de configuration est construit comme un arbre d'options organisées en groupes fonctionnels. On se sert du double deux points (« :: ») pour indiquer une option ; par exemple, APT::Get::Assume-Yes est -une option pour le groupe d'outils APT, destinée à l'outil Get. Les options -n'héritent pas des groupes de leurs parents. +une option pour le groupe d'outils APT, destinée à l'outil Get. Il n'y a pas d'héritage +des options des groupes parents. Syntaxiquement, le langage de configuration est conçu sur le même modèle que les langages utilisés par des outils ISC tels que bind et dhcp. Une ligne -qui commence par // est un commentaire et elle est ignorée. +qui commence par // est traitée comme un commentaire et ignorée, de +même que les sections de texte placées entre /* et +*/, tout comme les commentaires C/C++. Chaque ligne est de la forme : - APT::Get::Assume-Yes "true"; + +APT::Get::Assume-Yes "true"; + Le point-virgule final est obligatoire et les guillemets sont optionnels. On peut déclarer un nouveau champ d'action avec des accolades, comme suit : @@ -68,10 +72,9 @@ APT { -avec des retours à la ligne pour faciliter la lecture. On peut créer des -listes en ouvrant un champ d'action et en mettant un seul mot entre -apostrophes suivi d'un point-virgule. On peut mettre plusieurs entrées, -séparées par un point-virgule. +avec des retours à la ligne pour faciliter la lecture. On peut créer une liste +en ouvrant un champ d'action et en y insérant une chaîne entre guillemets suivie +d'un point virgule pour chaque élément de la liste. @@ -79,14 +82,21 @@ DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt";}; -Les modèles &docdir;examples/apt.conf &configureindex; +Les modèles &docdir;examples/apt.conf et &configureindex; montrent à quoi devrait ressembler le fichier de configuration. +Les identifiants des options de configuration ne sont pas sensibles à la casse. +Dans l'exemple précédent, on pourrait donc aussi bien utiliser +dpkg::pre-install-pkgs. + + Deux éléments spéciaux sont autorisés : #include et -#clear. #include inclut le fichier donné en argument, -à moins que le nom ne se termine par une barre oblique. #clear sert à -effacer une liste de noms. +#clear. #include inclut le fichier donné en +argument, à moins que le nom ne se termine par une barre oblique auquel cas le +répertoire entier est inclus. #clear sert à +effacer une partie de l'arbre de configuration. L'élément désigné et tout ses +descendants sont supprimés. Tous les outils d'APT possèdent une option qui permet de @@ -95,20 +105,31 @@ syntaxe consiste en un nom complet d'option (par exemple APT::Get::Assume-Yes) suivi par un signe égal, puis par la nouvelle valeur de l'option. On peut compléter une liste en ajoutant un « :: » au nom de la liste. - + Le groupe APT - -Ce groupe d'options contrôle aussi bien le comportement global d'APT que -la prise en compte des options pour chaque outil. + +Ce groupe d'options contrôle le comportement global d'APT et contient également +des options communes à tous les outils. Architecture L'architecture du système ; cette option positionne l'architecture à utiliser -pour récupérer des fichiers et analyser des listes de paquets. L'architecture -interne par défaut est celle pour laquelle APT a été compilé. +pour récupérer des fichiers et analyser des listes de paquets. La valeur interne par +défaut est l'architecture pour laquelle APT a été compilé. + + + +Default-Release + +Indique la distribution à utiliser par défaut lors de l'installation d'un +paquet si plusieurs versions sont disponibles. La valeur peut être un nom de +distribution ou un numéro de version. Exemples : « stable », +« testing », « 4.0 », « 5.0* ». Les noms de codes +des distributions (« etch », « lenny », etc.) ne sont pas +permis pour l'instant. Voir aussi &apt-preferences;. @@ -123,7 +144,7 @@ dans sa prise de d Clean-Installed Avec cette option qui est activée par défaut, la fonctionnalité « autoclean » -supprime tout paquet qui ne peut plus être récupéré dans le cache. +supprime du cache tout paquet qui ne peut plus être récupéré. Quand cette option est désactivée, les paquets qui sont installés localement sont aussi exclus du nettoyage - mais notez que APT ne fournit aucun moyen direct pour les réinstaller. @@ -134,9 +155,9 @@ direct pour les r Désactive la configuration immédiate ; cette dangereuse option désactive une partie du code de mise en ordre de APT pour que ce dernier effectue le -moins d'appels possible à Dpkg. C'est peut-être nécessaire sur des systèmes -lents à un seul utilisateur mais c'est extrêmement dangereux et cela peut -faire échouer les scripts d'installation, voire pire. +moins d'appels possible à &dpkg;. Ça peut être nécessaire sur des systèmes +à un seul utilisateur extrêmement lents, mais cette option est très dangereuse et +peut faire échouer les scripts d'installation, voire pire. Utilisez-la à vos risques et périls. @@ -155,39 +176,37 @@ ou tous les paquets dont ces paquets d Cache-Limit -APT utilise un fichier cache d'une taille mémoire fixe pour ranger les -informations du fichier « available ». Cette option fixe la taille -de ce cache. +APT utilise un fichier de cache chargé en mémoire avec mmap pour ranger les +informations sur les paquets disponibles. Cette option fixe la taille mémoire +allouée pour le chargement de ce cache. Build-Essential Cette option définit les paquets qui sont considérés comme faisant partie -des dépendances essentielles pour la construction des paquets. +des dépendances essentielles pour la construction de paquets. Get La sous-section Get contrôle l'outil &apt-get;, -veuillez consulter -sa documentation pour avoir plus d'informations sur les options en question. +veuillez consulter sa documentation pour avoir plus d'informations sur les options +en question. Cache -La sous-section Cache contrôle l'outil &apt-cache;, -veuillez -consulter sa documentation pour avoir plus d'informations sur les options en -question. +La sous-section Cache contrôle l'outil +&apt-cache;, veuillez consulter sa documentation pour avoir plus d'informations +sur les options en question. CDROM -La sous-section CDROM contrôle l'outil&apt-cdrom;, -veuillez -consulter sa documentation pour avoir plus d'informations sur les options en -question. +La sous-section CDROM contrôle l'outil +&apt-cdrom;, veuillez consulter sa documentation pour avoir plus d'informations +sur les options en question. @@ -199,13 +218,20 @@ Le groupe d'options Acquire contr les gestionnaires d'URI. +PDiffs +Essayer de télécharger les fichiers différentiels appelés +PDiffs pour les paquets ou les fichiers sources, plutôt que +de les télécharger entièrement. Par défaut à « true ». + + + Queue-Mode -Le mode file d'attente ; Queue-Mode peut prendre une valeur -parmi host ou access et cela détermine comment APT -parallélise les connexions sortantes. Host signifie qu'une -connexion par cible sera initiée, tandis que access signifie qu'une -connexion par type d'URI sera initiée. +Le mode de file d'attente ; Queue-Mode peut prendre les +valeurs host ou access et cela détermine +comment APT parallélise les connexions sortantes. Host signifie +qu'une connexion par cible sera initiée, tandis que access signifie +qu'une connexion par type d'URI sera initiée. @@ -227,30 +253,32 @@ Par d http -URI HTTP ; http::Proxy est le mandataire (proxy) http à utiliser par défaut. +URI HTTP ; http::Proxy est le mandataire (proxy) HTTP à utiliser par défaut. Il se présente sous la forme standard : -http://[[user][:pass]@]host[:port]/. En utilisant la syntaxe : -http::Proxy::<host>, où le mot-clé spécial DIRECT -indique de n'utiliser aucun mandataire, on peut spécifier un mandataire -pour chaque machine distante. La variable d'environnement http_proxy -remplace tous ces paramètres. +http://[[user][:pass]@]host[:port]/. On peut spécifier un +mandataire particulier par hôte distant en utilisant la syntaxe : +http::Proxy::<hôte>. Le mot-clé spécial +DIRECT indique alors de n'utiliser aucun mandataire pour +l'hôte. +Lorsqu'elle est définie, la variable d'environnement http_proxy +annule et remplace toutes les options de mandataire HTTP. -Trois options de configuration sont fournies pour le contrôle des caches qui -sont compatibles avec HTTP/1.1. No-Cache signifie que le mandataire -ne doit pas du tout utiliser les réponses qu'il a stockées ; Max-Age +Trois options de configuration sont fournies pour le contrôle des caches compatibles +avec HTTP/1.1. No-Cache signifie que le mandataire ne doit jamais +utiliser les réponses qu'il a stockées ; Max-Age sert uniquement pour les fichiers d'index : cela demande au cache de les mettre à jour quand leur ancienneté est supérieure au nombre de secondes -donné. Debian met à jour son fichier d'index de manière journalière, la +donné. Debian met à jour ses fichiers d'index de manière quotidienne ; la valeur par défaut est donc de 1 jour. No-Store sert uniquement -pour les fichiers d'archive : cela demande au cache de ne jamais garder +pour les fichiers d'archive  et demande au cache de ne jamais garder la requête. Cela peut éviter de polluer un cache mandataire avec des fichiers .deb très grands. Note : Squid 2.0.2 ne prend en compte aucune de ces options. L'option timeout positionne le compteur de temps mort (timeout) -utilisé par la méthode : cela vaut pour tout (connexion, données). +utilisé par la méthode. Cela vaut pour tout, connexion et données. Une option de configuration est fournie pour contrôler la profondeur du tube @@ -264,27 +292,62 @@ ne respectent pas la RFC 2068. +https + +URI HTTPS. Les options de contrôle de cache et de mandataire (proxy) sont les +mêmes que pour la méthode http. L'option +Pipeline-Depth n'est pas encore supportée. + + +La sous-option CaInfo spécifie le fichier contenant +les informations sur les certificats de confiance. +La sous-option booléenne Verify-Peer précise si le +certificat d'hôte du serveur doit être confronté aux certificats de confiance +ou pas. La sous-option booléenne Verify-Host précise s'il +faut vérifier ou pas le nom d'hôte du serveur. SslCert +détermine le certificat à utiliser pour l'authentification du client. +SslKey détermine quelle clef privée doit être utilisée pour +l'authentification du client. SslForceVersion surcharge la +valeur par défaut pour la version de SSL à utiliser et peut contenir l'une des +chaînes 'TLSv1' ou 'SSLv3'. + +Chacune de ces options peut être spécifiée pour un hôte particulier en +utilisant <hôte>::CaInfo, +<hôte>::Verify-Peer, +<hôte>::Verify-Host, +<hôte>::SslCert, +<hôte>::SslKey et +<hôte>::SslForceVersion respectivement. + + + ftp -URI FTP ; ftp::Proxy est le serveur mandataire par défaut à utiliser. Il se -présente sous la forme standard : -ftp://[[user][:pass]@]host[:port]/ ; il est remplacé par la -variable d'environnement ftp_proxy. Pour utiliser un mandataire ftp, -vous devez renseigner l'entrée ftp::ProxyLogin dans le fichier de -configuration. Cette entrée spécifie les commandes qui disent au serveur -mandataire comment se connecter. Voyez &configureindex; pour savoir -comment faire. Les variables de substitution disponibles sont : -$(PROXY_USER), $(PROXY_PASS), $(SITE_USER), -$(SITE_PASS), $(SITE), et $(SITE_PORT). -Chacune correspond à un élément de l'URI. +URI FTP ; ftp::Proxy est le mandataire (proxy) FTP à utiliser par défaut. +Il se présente sous la forme standard : +ftp://[[user][:pass]@]host[:port]/. On peut spécifier un +mandataire particulier par hôte distant en utilisant la syntaxe : +ftp::Proxy::<hôte>. Le mot-clé spécial +DIRECT indique alors de n'utiliser aucun mandataire pour +l'hôte. Lorsqu'elle est définie, la variable d'environnement +ftp_proxy annule et replace toutes les options de mandataire +FTP. Pour utiliser un mandataire FTP, vous devrez renseigner l'entrée +ftp::ProxyLogin dans le fichier de configuration. Cette +entrée spécifie les commandes à envoyer au mandataire pour lui préciser à quoi +il doit se connecter. Voyez &configureindex; pour savoir comment faire. Les +variables de substitution disponibles sont : +$(PROXY_USER), $(PROXY_PASS), +$(SITE_USER), $(SITE_PASS), +$(SITE) et $(SITE_PORT). Chacune +correspond à l'élément respectif de l'URI. -L'option timeout positionne le compteur de temps mort (timeout) -utilisé par la méthode : cela vaut pour tout (connexion, données). +L'option timeout positionne le compteur de temps mort +(timeout) utilisé par la méthode. Cela vaut pour tout, connexion et données. Plusieurs options de configuration sont fournies pour contrôler le mode -passif. Généralement, c'est plus sûr d'activer le mode passif ; cela +passif. Il est généralement plus sûr d'activer le mode passif et cela marche dans presque tous les environnements. Cependant, certaines situations nécessitent que le mode passif soit désactivé et que le mode « port » de ftp @@ -293,16 +356,18 @@ connexions qui passent par un mandataire ou pour une machine spécifique (examinez le modèle de fichier de configuration). -On peut utiliser un mandataire FTP pour atteindre une cible HTTP en -positionnant la variable d'environnement ftp_proxy à une url http -- -consultez la méthode http ci-dessus pour la syntaxe. On ne peut pas fixer -cette variable dans le fichier de configuration et il n'est pas recommandé -d'utiliser HTTP par FTP à cause de son peu d'efficacité. +Il est possible de faire transiter le trafic FTP par un mandataire HTTP en +positionnant la variable d'environnement ftp_proxy à une URL +HTTP -- +consultez la méthode http ci-dessus pour la syntaxe. On ne peut pas le faire +dans le fichier de configuration et il n'est de toute façon pas recommandé +d'utiliser FTP au travers de HTTP en raison la faible efficacité de cette +méthode. L'option ForceExtended contrôle l'utilisation des commandes liées à la RFC 2428, EPSV et EPRT. Par défaut, elle vaut -« false » ; ce qui signifie que ces commandes ne sont +« false » ce qui signifie que ces commandes ne sont utilisées que pour une connexion de type IPv6. Quand elle vaut « true », on les utilise même si la connexion est de type IPv4. La plupart des serveurs FTP ne suivent pas la RFC 2428. @@ -311,7 +376,7 @@ plupart des serveurs FTP ne suivent pas la RFC 2428. cdrom -URI CDROM ; la seule option de configuration pour les URI de CDROM +URI cédérom ; la seule option de configuration pour les URI de cédérom est le point de montage : cdrom::Mount ; il doit représenter le point de montage du lecteur de cédérom indiqué dans /etc/fstab. @@ -326,9 +391,9 @@ peuvent gpgv -URI GPGV ; la seule option pour les URI GPGV est celle qui permet de +URI GPGV ; la seule option pour les URI GPGV est celle qui permet de passer des paramètres à gpgv. - gpgv::Options Options supplémentaires passées à + gpgv::Options : options supplémentaires passées à gpgv. @@ -341,7 +406,8 @@ URI GPGV ; la seule option pour les URI GPGV est celle qui permet de Les répertoires de la section Dir::State concernent le système local. lists est le répertoire où placer les listes de paquets -téléchargés et status est le nom du fichier d'état de Dpkg. +téléchargés et status est le nom du fichier d'état de +&dpkg;. preferences concerne APT : c'est le nom du fichier des préférences. Dir::State contient le répertoire par défaut préfixé à tous les @@ -353,8 +419,8 @@ ou ./. cache local : par exemple, les deux caches de paquets srcpkgcache et pkgcache, et aussi l'endroit où sont placées les archives téléchargées, Dir::Cache::archives. On peut -empêcher la création des caches en laissant leur nom en blanc. Cela ralentit -le démarrage mais cela sauve de l'espace disque. Il vaut mieux se passer du +empêcher la création des caches en saisissant un nom vide. Cela ralentit +le démarrage mais sauve de l'espace disque. Il vaut mieux se passer du cache pkgcache plutôt que se passer du cache srcpkgcache. Comme pour Dir::State, le répertoire par défaut est contenu dans Dir::Cache. @@ -375,11 +441,22 @@ de configuration est charg Les programmes binaires sont pointés par Dir::Bin. L'emplacement des gestionnaires de méthodes est indiqué par Dir::Bin::Methods ; gzip, -Dpkg, apt-get, +dpkg, apt-get, dpkg-source, dpkg-buildpackage et apt-cache indiquent l'emplacement des programmes correspondants. - + + +L'option de configuration RootDir a une signification +particulière. Lorsqu'elle est définie, tous les chemins déclarés dans +Dir:: sont considérés relativement à +RootDir, même les chemins spécifiés de manière +absolue. Ainsi par exemple si RootDir est +défini comme /tmp/staging, et que chemin du fichier d'état +Dir::State::status est déclaré comme +/var/lib/dpkg/status alors ce fichier sera cherché +dans /tmp/staging/var/lib/dpkg/status. + APT et DSelect @@ -406,14 +483,14 @@ de nouveaux paquets. Options -Le contenu de cette variable est passé à &apt-get; avec les options de la ligne -de commande quand ce programme est utilisé dans la phase d'installation. +Le contenu de cette variable est passé comme options de ligne de commande à +&apt-get; lors de la phase d'installation. UpdateOptions -Le contenu de cette variable est passé à &apt-get; avec les options de la -ligne de commande quand ce programme est utilisé dans la phase de mise à jour. +Le contenu de cette variable est passé comme options de ligne de commande à +&apt-get; lors de la phase de mise à jour. @@ -427,7 +504,7 @@ qu'en cas d'erreur que l'on propose -Comment APT appelle Dpkg +Comment APT appelle &dpkg; Plusieurs directives de configuration contrôlent la manière dont APT invoque &dpkg; : elles figurent dans la section DPkg. @@ -435,8 +512,8 @@ invoque &dpkg; : elles figurent dans la section DPkg. Options -Il s'agit d'une liste d'options à passer à dpkg. Les options doivent être -déclarées en utilisant la notation de liste et chaque élément de liste est +Il s'agit d'une liste d'options à passer à &dpkg;. Les options doivent être +déclarées en utilisant la notation de liste et chaque élément de la liste est passé comme un seul argument à &dpkg;. @@ -450,7 +527,7 @@ liste. Les commandes sont appel Pre-Install-Pkgs -Il s'agit d'une liste de commandes shell à exécuter avant d'appeler Dpkg. +Il s'agit d'une liste de commandes shell à exécuter avant d'appeler &dpkg;. Tout comme pour Options, on doit utiliser la notation de liste. Les commandes sont appelées dans l'ordre, en utilisant /bin/sh : APT s'arrête dès que l'une d'elles échoue. Sur @@ -467,7 +544,7 @@ commande pass Run-Directory -APT se place dans ce répertoire avant d'appeler Dpkg ; par défaut c'est +APT se place dans ce répertoire avant d'appeler &dpkg; ; par défaut c'est le répertoire /. @@ -481,25 +558,262 @@ cr + +Options « Periodic » et « Archive » + +Les groupes d'options APT::Periodic et +APT::Archive configurent les comportements périodiques +réalisés par le script /etc/cron.daily/apt, lancé +quotidiennement. + + +APT::Periodic +Les options de cette section permettent de configurer la fréquence +d'exécution des tâches APT lancées automatiquement. Ces paramètre prennent +comme valeurs des périodicités d'exécution en nombre de jours. + + +Update-Package-List : périodicité de mise à jour de la +liste des paquets disponibles. (0 = désactivé) + + +Download-Upgradable-Packages : périodicité de +téléchargement dans le cache des paquets pour lesquels une mise à jour est +disponible. (0 = désactivé) + + +AutocleanInterval : périodicité des +« autoclean », c'est à dire de la suppression du cache des paquets +qui ne peuvent plus être téléchargés. (0 = désactivé) + + +Unattended-Upgrade : périodicité de mise à jour +automatique du système sans intervention humaine. Le paquet +unattended-upgrades doit être installé pour que cette tâche +s'exécute. Le cas échéant un fichier journal est écrit dans +/var/log/unattended-upgrades. (0 = désactivé) + + +APT::Archive +Les options de la section APT::Archive permettent de contrôler la taille +du cache de paquets. + + +MaxAge : ancienneté maximale d'un paquet dans le cache, +en nombre de jours. Les paquets plus anciens sont supprimés. (0 = désactivé) + + +MaxSize : taille maximale du cache en Mo. (0 = +désactive) Si ce maximum est dépassé, des paquets sont supprimés jusqu'à ce +que la taille du cache repasse sous la limite. Les paquets les plus volumineux +sont supprimés en premier. + + +MinAge : age minimum d'un paquet du cache, en nombre de +jours (0 = désactivé). Un paquet plus récent ne sera pas supprimé. Cette option +est utile pour garder à disposition une version des paquets en cas de problème +grave. + + + + + Les options de débogage - -La plupart des options de la section debug n'ont aucun intérêt -pour le simple utilisateur ; cependant, -Debug::pkgProblemResolver affiche d'intéressantes informations sur -les décisions que prend la commande dist-upgrade. Debug::NoLocking -désactive le verrouillage de fichier de manière à ce que APT puisse effectuer -quelques opérations sans être « root » et -Debug::pkgDPkgPM affiche la ligne de commande à chaque appel de -Dpkg. Debug::IdentCdrom désactive l'inclusion de -données de type statfs dans les ID de CDROM. -Debug::Acquire::gpgv Débogage de la méthode gpgv. - + +Les options de la section Debug:: servent soit à provoquer +l'affichage d'informations de débogage sur la sortie d'erreur standard du +programme qui utilise les librairies APT, soit à activer des modes de +fonctionnement spéciaux qui sont principalement utiles pour déboguer le +comportement de APT. La plupart de ces options n'ont pas +d'intérêt pour un utilisateur normal, mais certaines peuvent tout de même être +utiles : + + + +Debug::pkgProblemResolver affiche d'intéressantes +informations sur les décisions prises par les commandes dist-upgrade, +upgrade, install, remove et purge. + + +Debug::NoLocking désactive le verrouillage de fichier de +manière à ce que APT puisse effectuer quelques opérations (telles que +apt-get -s install) sans être « root ». + + +Debug::pkgDPkgPM affiche la ligne de commande à chaque appel +de &dpkg;. + + +Debug::IdentCdrom désactive l'inclusion de données de type +statfs dans les ID de cédérom. + + + +Voici une liste complète des options de débogage de APT. + +Debug::Acquire::cdrom + +Affiche les informations concernant les sources de type cdrom:// + + +Debug::Acquire::ftp + +Affiche les informations concernant le téléchargement de paquets par FTP. + + +Debug::Acquire::http + +Affiche les informations concernant le téléchargement de paquets par HTTP. + + +Debug::Acquire::https + +Affiche les informations concernant le téléchargement de paquets par HTTPS. + + +Debug::Acquire::gpgv + +Affiche les informations relatives à la vérification de signatures +cryptographiques avec gpg. + + +Debug::aptcdrom + +Affiche des informations concernant l'accès aux collections de paquets +stockées sur cédérom. + + +Debug::BuildDeps + +Décrit le processus de résolution des dépendances pour la construction de +paquets source ( « build-dependencies » ) par &apt-get;. + + +Debug::Hashes + +Affiche toutes les clefs de hachage cryptographiques générées par les +librairies APT. + + +Debug::IdentCdrom +Désactive l'inclusion des données de type +statfs pour la génération des ID de cédérom, à savoir le +nombre de blocs libres et utilisés sur le système de fichier du cédérom. + + +Debug::NoLocking + +Désactive le verrouillage de fichiers. Cela permet par exemple de lancer deux +instances de « apt-get update » en même temps. + + +Debug::pkgAcquire + +Trace les ajouts et suppressions d'éléments de la queue globale de +téléchargement. + + +Debug::pkgAcquire::Auth + +Affiche les détails de la vérification des sommes de contrôle et des signatures +cryptographiques des fichiers téléchargés, ainsi que les erreurs éventuelles. + + +Debug::pkgAcquire::Diffs + +Affiche les informations de téléchargement et de prise en compte des fichiers +différentiels des indexes de paquets, ainsi que les erreurs éventuelles. + + +Debug::pkgAcquire::RRed + +Affiche les détails de la vérification des sommes de contrôle et des signatures +cryptographiques des fichiers téléchargés, ainsi que les erreurs éventuelles. + + +Debug::pkgAcquire::Worker + +Affiche toutes les interactions avec les processus enfants qui se chargent +effectivement des téléchargements. + + +Debug::pkgAcquire::pkgAutoRemove + +Affiche les changements concernant le marquage des paquets comme installés +automatiquement, et la suppression des paquets inutiles. + + +Debug::pkgDepCache::AutoInstall + +Génère les informations de débogage décrivant quels paquets sont installés +automatiquement pour satisfaire les dépendances. Cela concerne la passe +initiale d'installation automatique effectuée par exemple par +apt-get install et pas le système de résolution de +dépendances complet de APT ; voir +Debug::pkgProblemResolver pour ce dernier. + + +Debug::pkgInitConfig + +Au lancement, affiche l'ensemble de la configuration sur la sortie d'erreur +standard. + + +Debug::pkgDPkgPM + +Affiche la commande exacte d'invocation de &dpkg; à chaque appel ; les +arguments sont séparés par des espaces. + + +Debug::pkgDPkgProgressReporting + Affiche l'ensemble des informations reçues de &dpkg; par +l'intermédiaire du descripteur de fichier d'état, et les éventuelles erreurs +d'analyse de ce fichier. + + +Debug::pkgOrderList + +Affiche les étapes de l'algorithme utilisé pour choisir l'ordre dans lequel APT +passe les paquets à &dpkg;. + + +Debug::pkgPackageManager + +Affiche le détail des opérations liées à l'invocation de &dpkg;. + + +Debug::pkgPolicy + +Au lancement, affiche la priorité de chaque liste de paquets. + + +Debug::pkgProblemResolver + +Affiche la trace d'exécution du système de résolution de dépendances (ne +concerne que les cas où un problème de dépendances complexe se présente). + + +Debug::sourceList + +Affiche les fournisseurs déclarés dans le fichier +/etc/apt/vendors.list. + + + + + Exemples -Le fichier &configureindex; contient un modèle de fichier montrant les valeurs par -défaut de toutes les options possibles. +Le fichier &configureindex; contient un modèle de fichier montrant des exemples +pour toutes les options existantes. @@ -514,4 +828,4 @@ d &manbugs; &deux-traducteurs; - \ No newline at end of file + -- cgit v1.2.3-70-g09d2 From 4b7cfe96d621ab8fc0cec1334f0cd5f9ea87bf6d Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 21 Jul 2009 13:52:48 +0200 Subject: * apt-pkg/deb/dpkgpm.cc: - provide DPkg::Chroot-Directory config option (useful for testing) --- apt-pkg/deb/dpkgpm.cc | 9 +++++++++ debian/changelog | 2 ++ 2 files changed, 11 insertions(+) (limited to 'debian') diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index 416860f35..f787f365e 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -866,6 +866,15 @@ bool pkgDPkgPM::Go(int OutStatusFd) } close(fd[0]); // close the read end of the pipe + if (_config->FindDir("DPkg::Chroot-Directory","/") != "/") + { + std::cerr << "Chrooting into " + << _config->FindDir("DPkg::Chroot-Directory") + << std::endl; + if (chroot(_config->FindDir("DPkg::Chroot-Directory","/").c_str()) != 0) + _exit(100); + } + if (chdir(_config->FindDir("DPkg::Run-Directory","/").c_str()) != 0) _exit(100); diff --git a/debian/changelog b/debian/changelog index 65fd9e590..cf9231105 100644 --- a/debian/changelog +++ b/debian/changelog @@ -27,6 +27,8 @@ apt (0.7.21) UNRELEASED; urgency=low * methods/http.cc: - ignore SIGPIPE, we deal with EPIPE from write in HttpMethod::ServerDie() (LP: #385144) + * apt-pkg/deb/dpkgpm.cc: + - provide DPkg::Chroot-Directory config option (useful for testing) -- Michael Vogt Thu, 28 May 2009 17:51:42 +0200 -- cgit v1.2.3-70-g09d2 From c98870b05a2bd121986e36851b54566285603fe6 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 21 Jul 2009 16:53:42 +0200 Subject: debian/apt.cron.daily: cleanups in the cron script --- debian/apt.cron.daily | 310 +++++++++++++++++++++++--------------------------- 1 file changed, 141 insertions(+), 169 deletions(-) (limited to 'debian') diff --git a/debian/apt.cron.daily b/debian/apt.cron.daily index cdec7eea0..8c2bd22d9 100644 --- a/debian/apt.cron.daily +++ b/debian/apt.cron.daily @@ -75,7 +75,6 @@ check_stamp() fi if [ ! -f $stamp ]; then - update_stamp $stamp debug_echo "check_stamp: missing time stamp file: $stamp." # treat as enough time has passed return 0 @@ -105,18 +104,25 @@ update_stamp() # we check here if autoclean was enough sizewise check_size_constraints() { - # min-age in days MaxAge=0 - MinAge=2 - MaxSize=0 - CacheDir="var/cache/apt" - CacheArchive="archives/" eval $(apt-config shell MaxAge APT::Archives::MaxAge) + eval $(apt-config shell MaxAge APT::Periodic::MaxAge) + + MinAge=2 eval $(apt-config shell MinAge APT::Archives::MinAge) + eval $(apt-config shell MinAge APT::Periodic::MinAge) + + MaxSize=0 eval $(apt-config shell MaxSize APT::Archives::MaxSize) - eval $(apt-config shell Dir Dir) + eval $(apt-config shell MaxSize APT::Periodic::MaxSize) + + CacheDir="var/cache/apt/" eval $(apt-config shell CacheDir Dir::Cache) + CacheDir=${CacheDir%/} + + CacheArchive="archives/" eval $(apt-config shell CacheArchive Dir::Cache::archives) + CacheArchive=${CacheArchive%/} # sanity check if [ -z "$CacheDir" -o -z "$CacheArchive" ]; then @@ -128,9 +134,13 @@ check_size_constraints() # check age if [ ! $MaxAge -eq 0 ] && [ ! $MinAge -eq 0 ]; then + debug_echo "aged: ctime <$MaxAge and mtime <$MaxAge and ctime>$MinAge and mtime>$MinAge" find $Cache -name "*.deb" \( -mtime +$MaxAge -and -ctime +$MaxAge \) -and -not \( -mtime -$MinAge -or -ctime -$MinAge \) -print0 | xargs -r -0 rm -f elif [ ! $MaxAge -eq 0 ]; then + debug_echo "aged: ctime <$MaxAge and mtime <$MaxAge only" find $Cache -name "*.deb" -ctime +$MaxAge -and -mtime +$MaxAge -print0 | xargs -r -0 rm -f + else + debug_echo "skip aging since MaxAge is 0" fi # check size @@ -148,11 +158,12 @@ check_size_constraints() size=${du%%/*} # check if the cache is small enough if [ $size -lt $MaxSize ]; then + debug_echo "end remove by archive size: size=$size < $MaxSize" break fi # check for MinAge of the file - if [ ! $MinAge -eq 0 ]; then + if [ $MinAge -ne 0 ]; then # check both ctime and mtime mtime=$(stat -c %Y $file) ctime=$(stat -c %Z $file) @@ -161,19 +172,94 @@ check_size_constraints() else delta=$(($now-$ctime)) fi - #echo "$file ($delta), $MinAge" if [ $delta -le $MinAge ]; then - #echo "Skiping $file (delta=$delta)" + debug_echo "skip remove by archive size: $file, delta=$delta < $MinAgeSec" break + else + # delete oldest file + debug_echo "remove by archive size: $file, delta=$delta >= $MinAgeSec (sec), size=$size >= $MaxSize" + rm -f $file fi fi - - # delete oldest file - rm -f $file done fi } +# deal with the Apt::Periodic::BackupArchiveInterval +do_cache_backup() +{ + BackupArchiveInterval="$1" + if [ $BackupArchiveInterval -eq 0 ]; then + return + fi + + # Set default values and normalize + Dir="/" + eval $(apt-config shell Dir Dir) + Dir=${Dir%/} + + CacheDir="var/cache/apt/" + eval $(apt-config shell CacheDir Dir::Cache) + CacheDir=${CacheDir%/} + if [ -z "$CacheDir" ]; then + debug_echo "practically empty Dir::Cache, exiting" + return 0 + fi + + CacheArchive="archives/" + eval $(apt-config shell CacheArchive Dir::Cache::Archives) + CacheArchive=${CacheArchive%/} + if [ -z "$CacheArchive" ]; then + debug_echo "practically empty Dir::Cache::archives, exiting" + return 0 + fi + + BackupLevel=3 + eval $(apt-config shell BackupLevel APT::Periodic::BackupLevel) + if [ $BackupLevel -le 1 ]; then + BackupLevel=2 ; + fi + + CacheBackup="backup/" + eval $(apt-config shell CacheBackup Dir::Cache::Backup) + CacheBackup=${CacheBackup%/} + if [ -z "$CacheBackup" ]; then + echo "practically empty Dir::Cache::Backup, exiting" 1>&2 + return + fi + + Cache="${Dir}/${CacheDir}/${CacheArchive}/" + Back="${Dir}/${CacheDir}/${CacheBackup}/" + BackX="${Back}${CacheArchive}/" + for x in $(seq 0 1 $((${BackupLevel}-1))); do + eval "Back${x}=${Back}${x}/" + done + + # backup after n-days if archive contents changed. + # (This uses hardlink to save disk space) + BACKUP_ARCHIVE_STAMP=/var/lib/apt/periodic/backup-archive-stamp + if check_stamp $BACKUP_ARCHIVE_STAMP $BackupArchiveInterval; then + if [ $({(cd $Cache 2>/dev/null; find . -name "*.deb"); (cd $Back0 2>/dev/null;find . -name "*.deb") ;}| sort|uniq -u|wc -l) -ne 0 ]; then + mkdir -p $Back + rm -rf $Back$((${BackupLevel}-1)) + for y in $(seq $((${BackupLevel}-1)) -1 1); do + eval BackY=${Back}$y + eval BackZ=${Back}$(($y-1)) + if [ -e $BackZ ]; then + mv -f $BackZ $BackY ; + fi + done + cp -la $Cache $Back ; mv -f $BackX $Back0 + update_stamp $BACKUP_ARCHIVE_STAMP + debug_echo "backup with hardlinks. (success)" + else + debug_echo "skip backup since same content." + fi + else + debug_echo "skip backup since too new." + fi +} + # sleep for a random interval of time (default 30min) # (some code taken from cron-apt, thanks) random_sleep() @@ -188,6 +274,7 @@ random_sleep() RANDOM=$(dd if=/dev/urandom count=1 2> /dev/null | cksum | cut -c"1-5") fi TIME=$(($RANDOM % $RandomSleep)) + debug_echo "sleeping for $TIME seconds" sleep $TIME } @@ -200,7 +287,7 @@ debug_echo() fi } -# main +# ------------------------ main ---------------------------- # check apt-config exstance if ! which apt-config >/dev/null ; then @@ -209,6 +296,7 @@ fi # Set VERBOSE mode from apt-config (or inherit from environment) eval $(apt-config shell VERBOSE APT::Periodic::Verbose) +debug_echo "verbose level $VERBOSE" if [ -z "$VERBOSE" ]; then VERBOSE="0" fi @@ -238,11 +326,10 @@ if which on_ac_power >/dev/null; then on_ac_power POWER=$? if [ $POWER -eq 1 ]; then - debug_echo "exit: system on main power." + debug_echo "exit: system NOT on main power" exit 0 elif [ $POWER -ne 0 ]; then - debug_echo "exit: power status ($POWER) undetermined." - exit 0 + debug_echo "power status ($POWER) undetermined, continuing" fi debug_echo "system is on main power." fi @@ -252,60 +339,12 @@ if which apt-get >/dev/null && ! eval apt-get check $XAPTOPT $XSTDERR ; then debug_echo "error encountered in cron job with \"apt-get check\"." exit 0 fi -# No need to check for apt-get below # Global current time in seconds since 1970-01-01 00:00:00 UTC now=$(date +%s) -# Set default values and normalize -Dir="/" -eval $(apt-config shell Dir Dir) -Dir=${Dir%/} - -CacheDir="var/cache/apt/" -eval $(apt-config shell CacheDir Dir::Cache) -CacheDir=${CacheDir%/} -if [ -z "$CacheDir" ]; then - debug_echo "practically empty Dir::Cache, exiting" - exit 0 -fi - -CacheArchive="archives/" -eval $(apt-config shell CacheArchive Dir::Cache::Archives) -CacheArchive=${CacheArchive%/} -if [ -z "$CacheArchive" ]; then - debug_echo "practically empty Dir::Cache::archives, exiting" - exit 0 -fi - -BackupArchiveInterval=0 -eval $(apt-config shell BackupArchiveInterval APT::Periodic::BackupArchiveInterval) - -BackupLevel=3 -eval $(apt-config shell BackupLevel APT::Periodic::BackupLevel) -if [ $BackupLevel -le 1 ]; then BackupLevel=2 ; fi - -CacheBackup="backup/" -eval $(apt-config shell CacheBackup Dir::Cache::Backup) -CacheBackup=${CacheBackup%/} -if [ -z "$CacheBackup" ]; then - echo "practically empty Dir::Cache::Backup, exiting" 1>&2 - exit 0 -fi - # Support old Archive for compatibility. # Document only Periodic for all controling parameters of this script. -MaxAge=0 -eval $(apt-config shell MaxAge APT::Archives::MaxAge) -eval $(apt-config shell MaxAge APT::Periodic::MaxAge) - -MinAge=2 -eval $(apt-config shell MinAge APT::Archives::MinAge) -eval $(apt-config shell MinAge APT::Periodic::MinAge) - -MaxSize=0 -eval $(apt-config shell MaxSize APT::Archives::MaxSize) -eval $(apt-config shell MaxSize APT::Periodic::MaxSize) UpdateInterval=0 eval $(apt-config shell UpdateInterval APT::Periodic::Update-Package-Lists) @@ -319,12 +358,8 @@ eval $(apt-config shell UnattendedUpgradeInterval APT::Periodic::Unattended-Upgr AutocleanInterval=0 eval $(apt-config shell AutocleanInterval APT::Periodic::AutocleanInterval) -Cache="${Dir}/${CacheDir}/${CacheArchive}/" -Back="${Dir}/${CacheDir}/${CacheBackup}/" -BackX="${Back}${CacheArchive}/" -for x in $(seq 0 1 $((${BackupLevel}-1))); do - eval "Back${x}=${Back}${x}/" -done +BackupArchiveInterval=0 +eval $(apt-config shell BackupArchiveInterval APT::Periodic::BackupArchiveInterval) # check if we actually have to do anything if [ $UpdateInterval -eq 0 ] && @@ -335,77 +370,12 @@ if [ $UpdateInterval -eq 0 ] && exit 0 fi +# deal with BackupArchiveInterval +do_cache_backup $BackupArchiveInterval -# backup after n-days if archive contents changed. -# (This uses hardlink to save disk space) -BACKUP_ARCHIVE_STAMP=/var/lib/apt/periodic/backup-archive-stamp -if check_stamp $BACKUP_ARCHIVE_STAMP $BackupArchiveInterval; then - if [ $({(cd $Cache 2>/dev/null; find . -name "*.deb"); (cd $Back0 2>/dev/null;find . -name "*.deb") ;}| sort|uniq -u|wc -l) -ne 0 ]; then - mkdir -p $Back - rm -rf $Back$((${BackupLevel}-1)) - for y in $(seq $((${BackupLevel}-1)) -1 1); do - eval BackY=${Back}$y - eval BackZ=${Back}$(($y-1)) - if [ -e $BackZ ]; then mv -f $BackZ $BackY ; fi - done - cp -la $Cache $Back ; mv -f $BackX $Back0 - update_stamp $BACKUP_ARCHIVE_STAMP - debug_echo "backup with hardlinks. (success)" - else - - debug_echo "skip backup since same content." - fi -else - debug_echo "skip backup since too new." -fi - -# package archive contnts removal by package age -if [ $MaxAge -ne 0 ] && [ $MinAge -ne 0 ]; then - find $Cache -name "*.deb" \( -mtime +$MaxAge -and -ctime +$MaxAge \) -and -not \( -mtime -$MinAge -or -ctime -$MinAge \) -print0 | xargs -r -0 rm -f - debug_echo "aged: ctime <$MaxAge and mtime <$MaxAge and ctime>$MinAge and mtime>$MinAge" -elif [ $MaxAge -ne 0 ]; then - find $Cache -name "*.deb" -ctime +$MaxAge -and -mtime +$MaxAge -print0 | xargs -r -0 rm -f - debug_echo "aged: ctime <$MaxAge and mtime <$MaxAge only" -else - debug_echo "skip aging since MaxAge is 0" -fi - -# package archive contnts removal down to $MaxSize -if [ $MaxSize -ne 0 ]; then - - MinAgeSec=$(($MinAge*24*60*60)) - - # reverse-sort by mtime - for file in $(ls -rt $Cache/*.deb 2>/dev/null); do - du=$(du -m -s $Cache) - size=${du%%/*} - # check if the cache is small enough - if [ $size -lt $MaxSize ]; then - debug_echo "end remove by archive size: size=$size < $MaxSize" - break - fi - - # check for MinAge in second of the file - if [ $MinAgeSec -ne 0 ]; then - # check both ctime and mtime - mtime=$(stat -c %Y $file) - ctime=$(stat -c %Z $file) - if [ $mtime -gt $ctime ]; then - delta=$(($now-$mtime)) - else - delta=$(($now-$ctime)) - fi - if [ $delta -le $MinAgeSec ]; then - debug_echo "skip remove by archive size: $file, delta=$delta < $MinAgeSec" - else - # delete oldest file - debug_echo "remove by archive size: $file, delta=$delta >= $MinAgeSec (sec), size=$size >= $MaxSize" - rm -f $file - fi - fi - - done -fi +# sleep random amount of time to avoid hitting the +# mirrors at the same time +random_sleep # update package lists UPDATE_STAMP=/var/lib/apt/periodic/update-stamp @@ -422,48 +392,50 @@ if check_stamp $UPDATE_STAMP $UpdateInterval; then debug_echo "dbus signal not send (command not available)" fi update_stamp $UPDATE_STAMP - # download all upgradeable packages if it is requested - DOWNLOAD_UPGRADEABLE_STAMP=/var/lib/apt/periodic/download-upgradeable-stamp - if check_stamp $DOWNLOAD_UPGRADEABLE_STAMP $DownloadUpgradeableInterval; then - if eval apt-get $XAPTOPT -y -d dist-upgrade $XSTDERR; then - update_stamp $DOWNLOAD_UPGRADEABLE_STAMP - debug_echo "download upgradable (success)." - # auto upgrade all upgradeable packages - UPGRADE_STAMP=/var/lib/apt/periodic/upgrade-stamp - if which unattended-upgrade >/dev/null && check_stamp $UPGRADE_STAMP $UnattendedUpgradeInterval; then - if unattended-upgrade $XUUPOPT; then - update_stamp $UPGRADE_STAMP - debug_echo "unattended-upgrade (success)." - else - debug_echo "unattended-upgrade (error)." - fi - else - debug_echo "unattended-upgrade (not run)." - fi - else - debug_echo "download upgradable (error)." - fi - else - debug_echo "download upgradable (not run)." - fi else - debug_echo "download updated metadata (error)." + debug_echo "download updated metadata (error)" fi else debug_echo "download updated metadata (not run)." fi + +# download all upgradeable packages (if it is requested) +DOWNLOAD_UPGRADEABLE_STAMP=/var/lib/apt/periodic/download-upgradeable-stamp +if check_stamp $DOWNLOAD_UPGRADEABLE_STAMP $DownloadUpgradeableInterval; then + if eval apt-get $XAPTOPT -y -d dist-upgrade $XSTDERR; then + update_stamp $DOWNLOAD_UPGRADEABLE_STAMP + debug_echo "download upgradable (success)" + else + debug_echo "download upgradable (error)" + fi +else + debug_echo "download upgradable (not run)" +fi + +# auto upgrade all upgradeable packages +UPGRADE_STAMP=/var/lib/apt/periodic/upgrade-stamp +if which unattended-upgrade >/dev/null && check_stamp $UPGRADE_STAMP $UnattendedUpgradeInterval; then + if unattended-upgrade $XUUPOPT; then + update_stamp $UPGRADE_STAMP + debug_echo "unattended-upgrade (success)" + else + debug_echo "unattended-upgrade (error)" + fi +else + debug_echo "unattended-upgrade (not run)" +fi # autoclean package archive AUTOCLEAN_STAMP=/var/lib/apt/periodic/autoclean-stamp if check_stamp $AUTOCLEAN_STAMP $AutocleanInterval; then - if apt-get $XAPTOPT -y autoclean $XSTDERR; then + if eval apt-get $XAPTOPT -y autoclean $XSTDERR; then debug_echo "autoclean (success)." update_stamp $AUTOCLEAN_STAMP else - debug_echo "autoclean (error)." + debug_echo "autoclean (error)" fi else - debug_echo "autoclean (not run)." + debug_echo "autoclean (not run)" fi # -- cgit v1.2.3-70-g09d2 From c5f44afc2446d738e30ea4c6021d4b60915546b1 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 21 Jul 2009 16:54:28 +0200 Subject: eliminate (hopefully all) segfaults in pkgcachegen.cc and mmap.cc which can arise if cache doesn't fit into the mmap (Closes: #535218) This removes also the previously introduced SegfaultSignalHandler: The handler works, but is ugly by design... --- apt-pkg/contrib/mmap.cc | 68 +++++++++++++++++-------------------------------- apt-pkg/pkgcachegen.cc | 45 +++++++++++++++++--------------- debian/changelog | 4 +-- 3 files changed, 50 insertions(+), 67 deletions(-) (limited to 'debian') diff --git a/apt-pkg/contrib/mmap.cc b/apt-pkg/contrib/mmap.cc index 5f56178f4..ba4482131 100644 --- a/apt-pkg/contrib/mmap.cc +++ b/apt-pkg/contrib/mmap.cc @@ -19,7 +19,6 @@ #define _BSD_SOURCE #include #include -#include #include @@ -28,7 +27,6 @@ #include #include #include -#include #include /*}}}*/ @@ -139,24 +137,11 @@ bool MMap::Sync(unsigned long Start,unsigned long Stop) } /*}}}*/ -// DynamicMMapSegfaultHandler /*{{{*/ -// --------------------------------------------------------------------- -/* In theory, the mmap should never segfault because we check the available - size of our mmap before we use it, but there are a few reports out there - which state that the mmap segfaults without further notice. So this handler - will take care of all these segfaults which should never happen... */ -void DynamicMMapSegfaultHandler(int) -{ - _error->Error(_("Dynamic MMap segfaults, most likely because it ran out of room. " - "Please increase the size of APT::Cache-Limit. (man 5 apt.conf)")); - _error->DumpErrors(); - exit(EXIT_FAILURE); -} /*}}}*/ // DynamicMMap::DynamicMMap - Constructor /*{{{*/ // --------------------------------------------------------------------- /* */ -DynamicMMap::DynamicMMap(FileFd &F,unsigned long Flags,unsigned long WorkSpace) : +DynamicMMap::DynamicMMap(FileFd &F,unsigned long Flags,unsigned long WorkSpace) : MMap(F,Flags | NoImmMap), Fd(&F), WorkSpace(WorkSpace) { if (_error->PendingError() == true) @@ -187,13 +172,6 @@ DynamicMMap::DynamicMMap(unsigned long Flags,unsigned long WorkSpace) : if (_error->PendingError() == true) return; - if (_config->FindB("MMap::SegfaultHandler",true) == true) - { - struct sigaction sa; - sa.sa_handler = DynamicMMapSegfaultHandler; - sigaction(SIGSEGV, &sa, NULL); - } - #ifdef _POSIX_MAPPED_FILES // use anonymous mmap() to get the memory Base = (unsigned char*) mmap(0, WorkSpace, PROT_READ|PROT_WRITE, @@ -237,9 +215,9 @@ unsigned long DynamicMMap::RawAllocate(unsigned long Size,unsigned long Aln) unsigned long Result = iSize; if (Aln != 0) Result += Aln - (iSize%Aln); - + iSize = Result + Size; - + // try to grow the buffer while(Result + Size > WorkSpace) { @@ -258,7 +236,7 @@ unsigned long DynamicMMap::RawAllocate(unsigned long Size,unsigned long Aln) /* This allocates an Item of size ItemSize so that it is aligned to its size in the file. */ unsigned long DynamicMMap::Allocate(unsigned long ItemSize) -{ +{ // Look for a matching pool entry Pool *I; Pool *Empty = 0; @@ -283,17 +261,24 @@ unsigned long DynamicMMap::Allocate(unsigned long ItemSize) I->ItemSize = ItemSize; I->Count = 0; } - + + unsigned long Result = 0; // Out of space, allocate some more if (I->Count == 0) { - I->Count = 20*1024/ItemSize; - I->Start = RawAllocate(I->Count*ItemSize,ItemSize); - } + const unsigned long size = 20*1024; + I->Count = size/ItemSize; + Result = RawAllocate(size,ItemSize); + // Does the allocation failed ? + if (Result == 0 && _error->PendingError()) + return 0; + I->Start = Result; + } + else + Result = I->Start; I->Count--; - unsigned long Result = I->Start; - I->Start += ItemSize; + I->Start += ItemSize; return Result/ItemSize; } /*}}}*/ @@ -303,21 +288,14 @@ unsigned long DynamicMMap::Allocate(unsigned long ItemSize) unsigned long DynamicMMap::WriteString(const char *String, unsigned long Len) { - unsigned long Result = iSize; - // try to grow the buffer - while(Result + Len > WorkSpace) - { - if(!Grow()) - { - _error->Error(_("Dynamic MMap ran out of room. Please increase the size " - "of APT::Cache-Limit. Current value: %lu. (man 5 apt.conf)"), WorkSpace); - return 0; - } - } - if (Len == (unsigned long)-1) Len = strlen(String); - iSize += Len + 1; + + unsigned long Result = RawAllocate(Len+1,0); + + if (Result == 0 && _error->PendingError()) + return 0; + memcpy((char *)Base + Result,String,Len); ((char *)Base)[Result + Len] = 0; return Result; diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc index 7833d6476..e2934d1fa 100644 --- a/apt-pkg/pkgcachegen.cc +++ b/apt-pkg/pkgcachegen.cc @@ -53,14 +53,16 @@ pkgCacheGenerator::pkgCacheGenerator(DynamicMMap *pMap,OpProgress *Prog) : { // Setup the map interface.. Cache.HeaderP = (pkgCache::Header *)Map.Data(); - Map.RawAllocate(sizeof(pkgCache::Header)); + if (Map.RawAllocate(sizeof(pkgCache::Header)) == 0 && _error->PendingError() == true) + return; + Map.UsePools(*Cache.HeaderP->Pools,sizeof(Cache.HeaderP->Pools)/sizeof(Cache.HeaderP->Pools[0])); - + // Starting header *Cache.HeaderP = pkgCache::Header(); Cache.HeaderP->VerSysName = Map.WriteString(_system->VS->Label); Cache.HeaderP->Architecture = Map.WriteString(_config->Find("APT::Architecture")); - Cache.ReMap(); + Cache.ReMap(); } else { @@ -135,7 +137,7 @@ bool pkgCacheGenerator::MergeList(ListParser &List, pkgCache::VerIterator Ver = Pkg.VersionList(); map_ptrloc *LastVer = &Pkg->VersionList; - for (; Ver.end() == false; LastVer = &Ver->NextVer, Ver++) + for (; Ver != 0 && Ver.end() == false; LastVer = &Ver->NextVer, Ver++) { pkgCache::DescIterator Desc = Ver.DescriptionList(); map_ptrloc *LastDesc = &Ver->DescriptionList; @@ -143,7 +145,7 @@ bool pkgCacheGenerator::MergeList(ListParser &List, // don't add a new description if we have one for the given // md5 && language - for ( ; Desc.end() == false; Desc++) + for ( ; Desc != 0 && Desc.end() == false; Desc++) if (MD5SumValue(Desc.md5()) == CurMd5 && Desc.LanguageCode() == List.DescriptionLanguage()) duplicate=true; @@ -151,7 +153,7 @@ bool pkgCacheGenerator::MergeList(ListParser &List, continue; for (Desc = Ver.DescriptionList(); - Desc.end() == false; + Desc != 0 && Desc.end() == false; LastDesc = &Desc->NextDesc, Desc++) { if (MD5SumValue(Desc.md5()) == CurMd5) @@ -160,7 +162,7 @@ bool pkgCacheGenerator::MergeList(ListParser &List, *LastDesc = NewDescription(Desc, List.DescriptionLanguage(), CurMd5, *LastDesc); Desc->ParentPkg = Pkg.Index(); - if (NewFileDesc(Desc,List) == false) + if ((*LastDesc == 0 && _error->PendingError()) || NewFileDesc(Desc,List) == false) return _error->Error(_("Error occurred while processing %s (NewFileDesc1)"),PackageName.c_str()); break; } @@ -173,7 +175,7 @@ bool pkgCacheGenerator::MergeList(ListParser &List, pkgCache::VerIterator Ver = Pkg.VersionList(); map_ptrloc *LastVer = &Pkg->VersionList; int Res = 1; - for (; Ver.end() == false; LastVer = &Ver->NextVer, Ver++) + for (; Ver != 0 && Ver.end() == false; LastVer = &Ver->NextVer, Ver++) { Res = Cache.VS->CmpVersion(Version,Ver.VerStr()); if (Res >= 0) @@ -207,7 +209,7 @@ bool pkgCacheGenerator::MergeList(ListParser &List, // Skip to the end of the same version set. if (Res == 0) { - for (; Ver.end() == false; LastVer = &Ver->NextVer, Ver++) + for (; Ver != 0 && Ver.end() == false; LastVer = &Ver->NextVer, Ver++) { Res = Cache.VS->CmpVersion(Version,Ver.VerStr()); if (Res != 0) @@ -220,7 +222,7 @@ bool pkgCacheGenerator::MergeList(ListParser &List, Ver->ParentPkg = Pkg.Index(); Ver->Hash = Hash; - if (List.NewVersion(Ver) == false) + if ((*LastVer == 0 && _error->PendingError()) || List.NewVersion(Ver) == false) return _error->Error(_("Error occurred while processing %s (NewVersion1)"), PackageName.c_str()); @@ -246,13 +248,13 @@ bool pkgCacheGenerator::MergeList(ListParser &List, map_ptrloc *LastDesc = &Ver->DescriptionList; // Skip to the end of description set - for (; Desc.end() == false; LastDesc = &Desc->NextDesc, Desc++); + for (; Desc != 0 && Desc.end() == false; LastDesc = &Desc->NextDesc, Desc++); // Add new description *LastDesc = NewDescription(Desc, List.DescriptionLanguage(), List.Description_md5(), *LastDesc); Desc->ParentPkg = Pkg.Index(); - if (NewFileDesc(Desc,List) == false) + if ((*LastDesc == 0 && _error->PendingError()) || NewFileDesc(Desc,List) == false) return _error->Error(_("Error occurred while processing %s (NewFileDesc2)"),PackageName.c_str()); } @@ -304,7 +306,7 @@ bool pkgCacheGenerator::MergeFileProvides(ListParser &List) unsigned long Hash = List.VersionHash(); pkgCache::VerIterator Ver = Pkg.VersionList(); - for (; Ver.end() == false; Ver++) + for (; Ver != 0 && Ver.end() == false; Ver++) { if (Ver->Hash == Hash && Version.c_str() == Ver.VerStr()) { @@ -370,7 +372,7 @@ bool pkgCacheGenerator::NewFileVer(pkgCache::VerIterator &Ver, // Link it to the end of the list map_ptrloc *Last = &Ver->FileList; - for (pkgCache::VerFileIterator V = Ver.FileList(); V.end() == false; V++) + for (pkgCache::VerFileIterator V = Ver.FileList(); V != 0 && V.end() == false; V++) Last = &V->NextFile; VF->NextFile = *Last; *Last = VF.Index(); @@ -419,14 +421,14 @@ bool pkgCacheGenerator::NewFileDesc(pkgCache::DescIterator &Desc, // Get a structure unsigned long DescFile = Map.Allocate(sizeof(pkgCache::DescFile)); if (DescFile == 0) - return 0; + return false; pkgCache::DescFileIterator DF(Cache,Cache.DescFileP + DescFile); DF->File = CurrentFile - Cache.PkgFileP; // Link it to the end of the list map_ptrloc *Last = &Desc->FileList; - for (pkgCache::DescFileIterator D = Desc.FileList(); D.end() == false; D++) + for (pkgCache::DescFileIterator D = Desc.FileList(); D != 0 && D.end() == false; D++) Last = &D->NextFile; DF->NextFile = *Last; @@ -460,6 +462,8 @@ map_ptrloc pkgCacheGenerator::NewDescription(pkgCache::DescIterator &Desc, Desc->ID = Cache.HeaderP->DescriptionCount++; Desc->language_code = Map.WriteString(Lang); Desc->md5sum = Map.WriteString(md5sum.Value()); + if (Desc->language_code == 0 || Desc->md5sum == 0) + return 0; return Description; } @@ -514,7 +518,7 @@ bool pkgCacheGenerator::ListParser::NewDepends(pkgCache::VerIterator Ver, if (OldDepVer != Ver) { OldDepLast = &Ver->DependsList; - for (pkgCache::DepIterator D = Ver.DependsList(); D.end() == false; D++) + for (pkgCache::DepIterator D = Ver.DependsList(); D != 0 && D.end() == false; D++) OldDepLast = &D->NextDepends; OldDepVer = Ver; } @@ -809,7 +813,7 @@ bool pkgMakeStatusCache(pkgSourceList &List,OpProgress &Progress, unsigned long EndOfSource = Files.size(); if (_system->AddStatusFiles(Files) == false) return false; - + // Decide if we can write to the files.. string CacheFile = _config->FindFile("Dir::Cache::pkgcache"); string SrcCacheFile = _config->FindFile("Dir::Cache::srcpkgcache"); @@ -861,8 +865,9 @@ bool pkgMakeStatusCache(pkgSourceList &List,OpProgress &Progress, { // Preload the map with the source cache FileFd SCacheF(SrcCacheFile,FileFd::ReadOnly); - if (SCacheF.Read((unsigned char *)Map->Data() + Map->RawAllocate(SCacheF.Size()), - SCacheF.Size()) == false) + unsigned long alloc = Map->RawAllocate(SCacheF.Size()); + if (alloc == 0 || SCacheF.Read((unsigned char *)Map->Data() + alloc, + SCacheF.Size()) == false) return false; TotalSize = ComputeSize(Files.begin()+EndOfSource,Files.end()); diff --git a/debian/changelog b/debian/changelog index e4da484d4..ea7e0469b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -37,8 +37,8 @@ apt (0.7.22) UNRELEASED; urgency=low * versions with a pin of -1 shouldn't be a candidate (Closes: #355237) * prefer mmap as memory allocator in MMap instead of a static char array which can (at least in theory) grow dynamic - * add a segfault handler to MMap to show the Cache-Limit message, which - can be deactivated with MMap::SegfaultHandler=false (Closes: 535218) + * eliminate (hopefully all) segfaults in pkgcachegen.cc and mmap.cc + which can arise if cache doesn't fit into the mmap (Closes: #535218) * display warnings instead of errors if the parts dirs doesn't exist [ Michael Vogt ] -- cgit v1.2.3-70-g09d2 From 0fad7309fbc20a7ca838e241e5118bf56f39946c Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 21 Jul 2009 16:58:17 +0200 Subject: debian/apt.cron.daily: add missing check_size_constrains --- debian/apt.cron.daily | 3 +++ 1 file changed, 3 insertions(+) (limited to 'debian') diff --git a/debian/apt.cron.daily b/debian/apt.cron.daily index 8c2bd22d9..39bf5bc1d 100644 --- a/debian/apt.cron.daily +++ b/debian/apt.cron.daily @@ -438,6 +438,9 @@ else debug_echo "autoclean (not run)" fi +# check cache size +check_size_constraints + # # vim: set sts=4 ai : # -- cgit v1.2.3-70-g09d2 From aff278bfea6ebb29cad5de272eb9539057ddd3bd Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 21 Jul 2009 17:50:54 +0200 Subject: Only run Download-Upgradable and Unattended-Upgrades if the initial update was successful Closes: #341970 --- debian/apt.cron.daily | 8 +++++--- debian/changelog | 6 +++--- 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'debian') diff --git a/debian/apt.cron.daily b/debian/apt.cron.daily index 39bf5bc1d..cc81a3a69 100644 --- a/debian/apt.cron.daily +++ b/debian/apt.cron.daily @@ -335,7 +335,7 @@ if which on_ac_power >/dev/null; then fi # check if we can lock the cache and if the cache is clean -if which apt-get >/dev/null && ! eval apt-get check $XAPTOPT $XSTDERR ; then +if which apt-get >/dev/null && ! eval apt-get check -f $XAPTOPT $XSTDERR ; then debug_echo "error encountered in cron job with \"apt-get check\"." exit 0 fi @@ -378,6 +378,7 @@ do_cache_backup $BackupArchiveInterval random_sleep # update package lists +UPDATED=0 UPDATE_STAMP=/var/lib/apt/periodic/update-stamp if check_stamp $UPDATE_STAMP $UpdateInterval; then if eval apt-get $XAPTOPT -y update $XSTDERR; then @@ -392,6 +393,7 @@ if check_stamp $UPDATE_STAMP $UpdateInterval; then debug_echo "dbus signal not send (command not available)" fi update_stamp $UPDATE_STAMP + UPDATED=1 else debug_echo "download updated metadata (error)" fi @@ -401,7 +403,7 @@ fi # download all upgradeable packages (if it is requested) DOWNLOAD_UPGRADEABLE_STAMP=/var/lib/apt/periodic/download-upgradeable-stamp -if check_stamp $DOWNLOAD_UPGRADEABLE_STAMP $DownloadUpgradeableInterval; then +if [ $UPDATED -eq 1 ] && check_stamp $DOWNLOAD_UPGRADEABLE_STAMP $DownloadUpgradeableInterval; then if eval apt-get $XAPTOPT -y -d dist-upgrade $XSTDERR; then update_stamp $DOWNLOAD_UPGRADEABLE_STAMP debug_echo "download upgradable (success)" @@ -414,7 +416,7 @@ fi # auto upgrade all upgradeable packages UPGRADE_STAMP=/var/lib/apt/periodic/upgrade-stamp -if which unattended-upgrade >/dev/null && check_stamp $UPGRADE_STAMP $UnattendedUpgradeInterval; then +if [ $UPDATED -eq 1 ] && which unattended-upgrade >/dev/null && check_stamp $UPGRADE_STAMP $UnattendedUpgradeInterval; then if unattended-upgrade $XUUPOPT; then update_stamp $UPGRADE_STAMP debug_echo "unattended-upgrade (success)" diff --git a/debian/changelog b/debian/changelog index cf9231105..668cf5596 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,8 +4,6 @@ apt (0.7.21) UNRELEASED; urgency=low * Updated cron script to support backups by hardlinks and verbose levels. All features turned off by default. * Added more error handlings. Closes: #438803, #462734, #454989, - * Refactored condition structure to make download and upgrade performed - if only previous steps succeeded. Closes: #341970 * Documented all cron script related configuration items in configure-index. @@ -29,7 +27,9 @@ apt (0.7.21) UNRELEASED; urgency=low HttpMethod::ServerDie() (LP: #385144) * apt-pkg/deb/dpkgpm.cc: - provide DPkg::Chroot-Directory config option (useful for testing) - + * Only run Download-Upgradable and Unattended-Upgrades if the initial + update was successful Closes: #341970 + -- Michael Vogt Thu, 28 May 2009 17:51:42 +0200 [ Michael Vogt ] -- cgit v1.2.3-70-g09d2 From d82cdf7391f04a98e5fb954ca23506f7f52435b0 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 22 Jul 2009 09:40:02 +0200 Subject: * doc/apt.conf.5.xml: - merged patch from Aurélien Couderc to improve the text (thanks!) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- debian/changelog | 7 +++---- doc/apt.conf.5.xml | 12 ++++++++---- 2 files changed, 11 insertions(+), 8 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 668cf5596..2fb53972d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -29,10 +29,6 @@ apt (0.7.21) UNRELEASED; urgency=low - provide DPkg::Chroot-Directory config option (useful for testing) * Only run Download-Upgradable and Unattended-Upgrades if the initial update was successful Closes: #341970 - - -- Michael Vogt Thu, 28 May 2009 17:51:42 +0200 - - [ Michael Vogt ] * apt-pkg/indexcopy.cc: - support having CDs with no Packages file (just a Packages.gz) by not forcing a verification on non-existing files @@ -77,6 +73,9 @@ apt (0.7.21) UNRELEASED; urgency=low * build fixes for g++-4.4 * cmdline/apt-mark: - add "showauto" option to show automatically installed packages + * doc/apt.conf.5.xml: + - merged patch from Aurélien Couderc to improve the text + (thanks!) [ Dereck Wonnacott ] * apt-ftparchive might write corrupt Release files (LP: #46439) diff --git a/doc/apt.conf.5.xml b/doc/apt.conf.5.xml index 1835f2282..6590c9795 100644 --- a/doc/apt.conf.5.xml +++ b/doc/apt.conf.5.xml @@ -70,7 +70,7 @@ APT { with newlines placed to make it more readable. Lists can be created by - opening a scope and including a single word enclosed in quotes followed by a + opening a scope and including a single string enclosed in quotes followed by a semicolon. Multiple entries can be included, each separated by a semicolon. @@ -87,7 +87,8 @@ DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt";}; Two specials are allowed, #include and #clear #include will include the given file, unless the filename ends in a slash, then the whole directory is included. - #clear is used to erase a list of names. + #clear is used to erase a part of the configuration tree. The + specified element and all its descendents are erased. All of the APT tools take a -o option which allows an arbitrary configuration directive to be specified on the command line. The syntax is a full option @@ -173,7 +174,7 @@ DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt";}; PDiffs - Try do download deltas called PDiffs for + Try to download deltas called PDiffs for Packages or Sources files instead of downloading whole ones. True by default. @@ -683,7 +684,7 @@ DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt";}; Debug::pkgInitConfig - Dump the default configuration to standard output on + Dump the default configuration to standard error on startup. @@ -766,6 +767,8 @@ DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt";}; + -- cgit v1.2.3-70-g09d2 From a6418a4b93376e0e4acf36e88eb1d0ec41e024df Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 22 Jul 2009 18:01:43 +0200 Subject: * methods/cdrom.cc: - add Acquire::Cdrom::mount "apt-udev-auto" magic to allow dynamically finding the cdrom device * apt-pkg/contrib/cdromutl.{h,cc}: - support additional (optional) DeviceName parameter for MountCdrom() --- apt-pkg/contrib/cdromutl.cc | 13 +++++-- apt-pkg/contrib/cdromutl.h | 3 +- debian/changelog | 7 ++++ methods/cdrom.cc | 82 +++++++++++++++++++++++++++++++++++---------- 4 files changed, 84 insertions(+), 21 deletions(-) (limited to 'debian') diff --git a/apt-pkg/contrib/cdromutl.cc b/apt-pkg/contrib/cdromutl.cc index b6524a178..0cf9697ac 100644 --- a/apt-pkg/contrib/cdromutl.cc +++ b/apt-pkg/contrib/cdromutl.cc @@ -98,7 +98,7 @@ bool UnmountCdrom(string Path) // MountCdrom - Mount a cdrom /*{{{*/ // --------------------------------------------------------------------- /* We fork mount and drop all messages */ -bool MountCdrom(string Path) +bool MountCdrom(string Path, string DeviceName) { if (IsMounted(Path) == true) return true; @@ -122,8 +122,15 @@ bool MountCdrom(string Path) { const char *Args[10]; Args[0] = "mount"; - Args[1] = Path.c_str(); - Args[2] = 0; + if (DeviceName == "") + { + Args[1] = Path.c_str(); + Args[2] = 0; + } else { + Args[1] = DeviceName.c_str(); + Args[2] = Path.c_str(); + Args[3] = 0; + } execvp(Args[0],(char **)Args); _exit(100); } diff --git a/apt-pkg/contrib/cdromutl.h b/apt-pkg/contrib/cdromutl.h index f24bb8c70..9d14249c5 100644 --- a/apt-pkg/contrib/cdromutl.h +++ b/apt-pkg/contrib/cdromutl.h @@ -14,7 +14,8 @@ using std::string; -bool MountCdrom(string Path); +// mount cdrom, DeviceName (e.g. /dev/sr0) is optional +bool MountCdrom(string Path, string DeviceName=""); bool UnmountCdrom(string Path); bool IdentCdrom(string CD,string &Res,unsigned int Version = 2); bool IsMounted(string &Path); diff --git a/debian/changelog b/debian/changelog index 65fd9e590..cce7fc0f7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +apt (0.7.22) unstable; urgency=low + + * add Acquire::Cdrom::mount "apt-udev-auto" magic to allow + dynamically finding the cdrom device + + -- Michael Vogt Wed, 22 Jul 2009 18:00:53 +0200 + apt (0.7.21) UNRELEASED; urgency=low [ Osamu Aoki ] diff --git a/methods/cdrom.cc b/methods/cdrom.cc index 7a20ae514..cd0d4e512 100644 --- a/methods/cdrom.cc +++ b/methods/cdrom.cc @@ -9,6 +9,7 @@ /*}}}*/ // Include Files /*{{{*/ #include +#include #include #include #include @@ -33,6 +34,7 @@ class CDROMMethod : public pkgAcqMethod string CDROM; bool MountedByApt; + bool IsCorrectCD(URI want, string MountPath); virtual bool Fetch(FetchItem *Itm); string GetID(string Name); virtual void Exit(); @@ -84,6 +86,31 @@ string CDROMMethod::GetID(string Name) return string(); } /*}}}*/ + +// CDROMMethod::IsCorrectCD /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool CDROMMethod::IsCorrectCD(URI want, string MountPath) +{ + bool Debug = _config->FindB("Debug::Acquire::cdrom",false); + string NewID; + + for (unsigned int Version = 2; Version != 0; Version--) + { + if (IdentCdrom(MountPath,NewID,Version) == false) + return false; + + if (Debug == true) + clog << "ID " << Version << " " << NewID << endl; + + // A hit + if (Database.Find("CD::" + NewID) == want.Host) + return true; + } + + return false; +} + /*}}}*/ // CDROMMethod::Fetch - Fetch a file /*{{{*/ // --------------------------------------------------------------------- /* */ @@ -134,8 +161,44 @@ bool CDROMMethod::Fetch(FetchItem *Itm) Fail(_("Wrong CD-ROM"),true); return true; } - + CDROM = _config->FindDir("Acquire::cdrom::mount","/cdrom/"); + + // auto-detect mode + if (CDROM == "apt-udev-auto/") + { + pkgUdevCdromDevices udev; + if(udev.Dlopen()) + { + vector v = udev.Scan(); + for (unsigned int i=0; i < v.size(); i++) + { + if (!v[i].Mounted) + { + if (!FileExists("/media/apt")) + mkdir("/media/apt", 0755); + if(MountCdrom("/media/apt", v[i].DeviceName)) + { + if (IsCorrectCD(Get, "/media/apt")) + { + MountedByApt = true; + CDROM = "/media/apt"; + break; + } else { + UnmountCdrom("/media/apt"); + } + } + } else { + if (IsCorrectCD(Get, v[i].MountPath)) + { + CDROM = v[i].MountPath; + break; + } + } + } + } + } + if (CDROM[0] == '.') CDROM= SafeGetCWD() + '/' + CDROM; string NewID; @@ -144,23 +207,8 @@ bool CDROMMethod::Fetch(FetchItem *Itm) bool Hit = false; if(!IsMounted(CDROM)) MountedByApt = MountCdrom(CDROM); - for (unsigned int Version = 2; Version != 0; Version--) - { - if (IdentCdrom(CDROM,NewID,Version) == false) - return false; - - if (Debug == true) - clog << "ID " << Version << " " << NewID << endl; - // A hit - if (Database.Find("CD::" + NewID) == Get.Host) - { - Hit = true; - break; - } - } - - if (Hit == true) + if (IsCorrectCD(Get, CDROM)) break; // I suppose this should prompt somehow? -- 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 'debian') 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 76fcbe5c97849dcbbe67434d08e0a22c02fedd51 Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Sat, 25 Jul 2009 16:29:49 -0300 Subject: Apply patch from Sami Liedes to avoid unecessary temporary allocations. --- apt-pkg/contrib/strutl.h | 1 + debian/changelog | 2 ++ 2 files changed, 3 insertions(+) (limited to 'debian') diff --git a/apt-pkg/contrib/strutl.h b/apt-pkg/contrib/strutl.h index e1f9e3a1f..0cbf14a7a 100644 --- a/apt-pkg/contrib/strutl.h +++ b/apt-pkg/contrib/strutl.h @@ -66,6 +66,7 @@ bool CheckDomainList(const string &Host, const string &List); int tolower_ascii(int c); #define APT_MKSTRCMP(name,func) \ +inline int name(const char *A,const char *B) {return func(A,A+strlen(A),B,B+strlen(B));}; \ inline int name(const char *A,const char *AEnd,const char *B) {return func(A,AEnd,B,B+strlen(B));}; \ inline int name(string A,const char *B) {return func(A.c_str(),A.c_str()+A.length(),B,B+strlen(B));}; \ inline int name(string A,string B) {return func(A.c_str(),A.c_str()+A.length(),B.c_str(),B.c_str()+B.length());}; \ diff --git a/debian/changelog b/debian/changelog index 64271088f..0404baf7b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -127,6 +127,8 @@ apt (0.7.22) UNRELEASED; urgency=low * Apply patch from Sami Liedes to reduce the number of times we call progress bar updating and debugging configuration settings. + * Apply patch from Sami Liedes to avoid unecessary + temporary allocations. -- Julian Andres Klode Fri, 03 Jul 2009 08:27:35 +0200 -- cgit v1.2.3-70-g09d2 From d5752e18bed18c706c93f5c43c61016c72132ede Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 29 Jul 2009 22:12:50 +0200 Subject: releasing version 0.7.22 --- debian/changelog | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 0404baf7b..3d5db5f48 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,7 +1,5 @@ -apt (0.7.22) UNRELEASED; urgency=low +apt (0.7.22) unstable; urgency=low - The 'not dead yet' release - [ Christian Perrier ] * Documentation translations: - Fix a typo in apt-get(8) French translation. Closes: #525043 @@ -130,7 +128,7 @@ apt (0.7.22) UNRELEASED; urgency=low * Apply patch from Sami Liedes to avoid unecessary temporary allocations. - -- Julian Andres Klode Fri, 03 Jul 2009 08:27:35 +0200 + -- Michael Vogt Wed, 29 Jul 2009 19:16:22 +0200 apt (0.7.21) unstable; urgency=low -- cgit v1.2.3-70-g09d2