From 364af2ef2aba2911b12379ec8b6e55874e4b0a31 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 24 Sep 2009 11:55:46 +0200 Subject: * cmdline/apt-key: - Emit a warning if removed keys keyring is missing and skip associated checks (LP: #218971) --- cmdline/apt-key | 18 +++++++++++------- debian/changelog | 6 ++++++ 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/cmdline/apt-key b/cmdline/apt-key index 7bb30240e..5f4e02fdf 100755 --- a/cmdline/apt-key +++ b/cmdline/apt-key @@ -93,13 +93,17 @@ update() { # add any security. we *need* this check on net-update though $GPG_CMD --quiet --batch --keyring $ARCHIVE_KEYRING --export | $GPG --import - # remove no-longer supported/used keys - keys=`$GPG_CMD --keyring $REMOVED_KEYS --with-colons --list-keys | grep ^pub | cut -d: -f5` - for key in $keys; do - if $GPG --list-keys --with-colons | grep ^pub | cut -d: -f5 | grep -q $key; then - $GPG --quiet --batch --delete-key --yes ${key} - fi - done + if [ -r "$REMOVED_KEYS" ]; then + # remove no-longer supported/used keys + keys=`$GPG_CMD --keyring $REMOVED_KEYS --with-colons --list-keys | grep ^pub | cut -d: -f5` + for key in $keys; do + if $GPG --list-keys --with-colons | grep ^pub | cut -d: -f5 | grep -q $key; then + $GPG --quiet --batch --delete-key --yes ${key} + fi + done + else + echo "Warning: removed keys keyring $REMOVED_KEYS missing or not readable" >&2 + fi } diff --git a/debian/changelog b/debian/changelog index cad223833..16e8929ad 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,11 +1,17 @@ apt (0.7.22.4) unstable; urgency=low + [ Michael Vogt ] * apt-pkg/deb/dpkgpm.cc: - when tcgetattr() returns non-zero skip all pty magic (thanks to Simon Richter, closes: #509866) * apt-inst/contrib/arfile.cc: - show propper error message for Invalid archive members + [ Loïc Minier ] + * cmdline/apt-key: + - Emit a warning if removed keys keyring is missing and skip associated + checks (LP: #218971) + -- Michael Vogt Mon, 31 Aug 2009 11:08:03 +0200 apt (0.7.22.3) UNRELEASED; urgency=low -- cgit v1.2.3 From f4945db34053338ceb832afa1ca51e2aab7edaa0 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 21 Oct 2009 13:28:10 +0200 Subject: * apt-pkg/packagemanager.cc: - add output about pre-depends configuring when debug::pkgPackageManager is used --- apt-pkg/packagemanager.cc | 7 +++++++ debian/changelog | 3 +++ 2 files changed, 10 insertions(+) diff --git a/apt-pkg/packagemanager.cc b/apt-pkg/packagemanager.cc index cc9ce21c7..a063e1a34 100644 --- a/apt-pkg/packagemanager.cc +++ b/apt-pkg/packagemanager.cc @@ -477,6 +477,9 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg) while (End->Type == pkgCache::Dep::PreDepends) { + if (Debug == true) + clog << "PreDepends order for " << Pkg.Name() << std::endl; + // Look for possible ok targets. SPtrArray VList = Start.AllTargets(); bool Bad = true; @@ -490,6 +493,8 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg) Pkg.State() == PkgIterator::NeedsNothing) { Bad = false; + if (Debug == true) + clog << "Found ok package " << Pkg.Name() << endl; continue; } } @@ -505,6 +510,8 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg) (Cache[Pkg].Keep() == true && Pkg.State() == PkgIterator::NeedsNothing)) continue; + if (Debug == true) + clog << "Trying to SmartConfigure " << Pkg.Name() << endl; Bad = !SmartConfigure(Pkg); } diff --git a/debian/changelog b/debian/changelog index 16e8929ad..618e855ee 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,9 @@ apt (0.7.22.4) unstable; urgency=low (thanks to Simon Richter, closes: #509866) * apt-inst/contrib/arfile.cc: - show propper error message for Invalid archive members + * apt-pkg/packagemanager.cc: + - add output about pre-depends configuring when debug::pkgPackageManager + is used [ Loïc Minier ] * cmdline/apt-key: -- cgit v1.2.3 From 0eacf067bbe2385dc3cd5450f346e45b420299ea Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 21 Oct 2009 13:45:43 +0200 Subject: more debug output in SmartConfigure --- apt-pkg/packagemanager.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apt-pkg/packagemanager.cc b/apt-pkg/packagemanager.cc index a063e1a34..019a1db1f 100644 --- a/apt-pkg/packagemanager.cc +++ b/apt-pkg/packagemanager.cc @@ -287,6 +287,9 @@ bool pkgPackageManager::ConfigureAll() of it's dependents. */ bool pkgPackageManager::SmartConfigure(PkgIterator Pkg) { + if (Debug == true) + clog << "SmartConfigure " << Pkg.Name() << endl; + pkgOrderList OList(&Cache); if (DepAdd(OList,Pkg) == false) @@ -300,6 +303,9 @@ bool pkgPackageManager::SmartConfigure(PkgIterator Pkg) { PkgIterator Pkg(Cache,*I); + if (Debug == true) + clog << " SmartConfigure on" << Pkg.Name() << endl; + if (Configure(Pkg) == false) return false; -- cgit v1.2.3 From a1e42d1fd8848cdcb853811b6974d77c66124d4b Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 29 Oct 2009 11:53:01 +0100 Subject: * apt-pkg/depcache.cc, apt-pkg/indexcopy.cc: - typo fix (LP: #462328) --- apt-pkg/depcache.cc | 2 +- apt-pkg/indexcopy.cc | 6 +++--- debian/changelog | 4 ++++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index 13abbe5ed..45e427d81 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -243,7 +243,7 @@ bool pkgDepCache::writeStateFile(OpProgress *prog, bool InstalledOnly) /*{{{*/ continue; bool newAuto = (PkgState[pkg->ID].Flags & Flag::Auto); if(_config->FindB("Debug::pkgAutoRemove",false)) - std::clog << "Update exisiting AutoInstall info: " + std::clog << "Update existing AutoInstall info: " << pkg.Name() << std::endl; TFRewriteData rewrite[2]; rewrite[0].Tag = "Auto-Installed"; diff --git a/apt-pkg/indexcopy.cc b/apt-pkg/indexcopy.cc index 15696585a..e7bf046a4 100644 --- a/apt-pkg/indexcopy.cc +++ b/apt-pkg/indexcopy.cc @@ -527,19 +527,19 @@ bool SigVerify::Verify(string prefix, string file, indexRecords *MetaIndex) // (non-existing files are not considered a error) if(!FileExists(prefix+file)) { - _error->Warning("Skipping non-exisiting file %s", string(prefix+file).c_str()); + _error->Warning(_("Skipping nonexistent file %s"), string(prefix+file).c_str()); return true; } if (!Record) { - _error->Warning("Can't find authentication record for: %s",file.c_str()); + _error->Warning(_("Can't find authentication record for: %s"), file.c_str()); return false; } if (!Record->Hash.VerifyFile(prefix+file)) { - _error->Warning("Hash mismatch for: %s",file.c_str()); + _error->Warning(_("Hash mismatch for: %s"),file.c_str()); return false; } diff --git a/debian/changelog b/debian/changelog index 618e855ee..15b6eb106 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,6 +10,10 @@ apt (0.7.22.4) unstable; urgency=low - add output about pre-depends configuring when debug::pkgPackageManager is used + [ Brian Murray ] + * apt-pkg/depcache.cc, apt-pkg/indexcopy.cc: + - typo fix (LP: #462328) + [ Loïc Minier ] * cmdline/apt-key: - Emit a warning if removed keys keyring is missing and skip associated -- cgit v1.2.3 From 43cf55db7c2ce7015d365556ed9ab0b8b2cec3ca Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 17 Nov 2009 09:51:31 -0600 Subject: * methods/https.cc: - fix incorrect use of CURLOPT_TIMEOUT, closes: #497983, LP: #354972 thanks to Brian Thomason for the patch --- debian/changelog | 3 +++ methods/https.cc | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 15b6eb106..417cd2436 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,9 @@ apt (0.7.22.4) unstable; urgency=low * apt-pkg/packagemanager.cc: - add output about pre-depends configuring when debug::pkgPackageManager is used + * methods/https.cc: + - fix incorrect use of CURLOPT_TIMEOUT, closes: #497983, LP: #354972 + thanks to Brian Thomason for the patch [ Brian Murray ] * apt-pkg/depcache.cc, apt-pkg/indexcopy.cc: diff --git a/methods/https.cc b/methods/https.cc index 37d93e308..3cbb0088a 100644 --- a/methods/https.cc +++ b/methods/https.cc @@ -212,8 +212,11 @@ bool HttpsMethod::Fetch(FetchItem *Itm) // set timeout int timeout = _config->FindI("Acquire::http::Timeout",120); - curl_easy_setopt(curl, CURLOPT_TIMEOUT, timeout); curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, timeout); + //set really low lowspeed timeout (see #497983) + int dlMin = 1; + curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, dlMin); + curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, timeout); // set redirect options and default to 10 redirects bool AllowRedirect = _config->FindI("Acquire::https::AllowRedirect", true); -- cgit v1.2.3 From 5085e660679cdbb51783702898c42000d5db4fba Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 17 Nov 2009 09:55:22 -0600 Subject: methods/https.cc: cleanup for CURLOPT_LOW_SPEED_TIME --- methods/https.cc | 3 +-- methods/https.h | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/methods/https.cc b/methods/https.cc index 3cbb0088a..dbc1cf52c 100644 --- a/methods/https.cc +++ b/methods/https.cc @@ -214,8 +214,7 @@ bool HttpsMethod::Fetch(FetchItem *Itm) int timeout = _config->FindI("Acquire::http::Timeout",120); curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, timeout); //set really low lowspeed timeout (see #497983) - int dlMin = 1; - curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, dlMin); + curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, DL_MIN_SPEED); curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, timeout); // set redirect options and default to 10 redirects diff --git a/methods/https.h b/methods/https.h index 2c33d95ee..3f0c416b6 100644 --- a/methods/https.h +++ b/methods/https.h @@ -24,6 +24,8 @@ class HttpsMethod; class HttpsMethod : public pkgAcqMethod { + // minimum speed in bytes/se that triggers download timeout handling + static const int DL_MIN_SPEED = 10; virtual bool Fetch(FetchItem *); static size_t write_data(void *buffer, size_t size, size_t nmemb, void *userp); -- cgit v1.2.3