From fc2d32c089f035955c81100f2ded7c3f66793dc3 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 23 May 2008 09:19:41 +0200 Subject: * improve apt progress reporting, display trigger actions --- apt-pkg/deb/dpkgpm.cc | 42 +++++++++++++++++++++++++++++++++++++++++- apt-pkg/deb/dpkgpm.h | 2 ++ debian/changelog | 3 +++ po/apt-all.pot | 41 ++++++++++++++++++++++++++--------------- 4 files changed, 72 insertions(+), 16 deletions(-) diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index bc15b8819..8222be75e 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -333,6 +333,12 @@ void pkgDPkgPM::ProcessDpkgStatusLine(int OutStatusFd, char *line) 'status: /var/cache/apt/archives/krecipes_0.8.1-0ubuntu1_i386.deb : error : trying to overwrite `/usr/share/doc/kde/HTML/en/krecipes/krectip.png', which is also in package krecipes-data and conffile-prompt like this 'status: conffile-prompt: conffile : 'current-conffile' 'new-conffile' useredited distedited + + Newer versions of dpkg sent also: + 'processing: install: pkg' + 'processing: configure: pkg' + 'processing: remove: pkg' + 'processing: trigproc: trigger' */ char* list[5]; @@ -351,6 +357,34 @@ void pkgDPkgPM::ProcessDpkgStatusLine(int OutStatusFd, char *line) char *pkg = list[1]; char *action = _strstrip(list[2]); + // 'processing' from dpkg looks like + // 'processing: action: pkg' + if(strncmp(list[0], "processing", strlen("processing")) == 0) + { + char s[200]; + map::iterator iter; + char *pkg_or_trigger = _strstrip(list[2]); + action =_strstrip( list[1]); + iter = PackageProcessingOps.find(action); + if(iter == PackageProcessingOps.end()) + { + if (_config->FindB("Debug::pkgDPkgProgressReporting",false) == true) + std::clog << "ignoring unknwon action: " << action << std::endl; + return; + } + snprintf(s, sizeof(s), _(iter->second.c_str()), pkg_or_trigger); + + status << "pmstatus:" << pkg_or_trigger + << ":" << (PackagesDone/float(PackagesTotal)*100.0) + << ":" << s + << endl; + if(OutStatusFd > 0) + write(OutStatusFd, status.str().c_str(), status.str().size()); + if (_config->FindB("Debug::pkgDPkgProgressReporting",false) == true) + std::clog << "send: '" << status.str() << "'" << endl; + return; + } + if(strncmp(action,"error",strlen("error")) == 0) { status << "pmerror:" << list[1] @@ -526,7 +560,7 @@ bool pkgDPkgPM::Go(int OutStatusFd) if (RunScriptsWithPkgs("DPkg::Pre-Install-Pkgs") == false) return false; - + // map the dpkg states to the operations that are performed // (this is sorted in the same way as Item::Ops) static const struct DpkgState DpkgStatesOpMap[][7] = { @@ -566,6 +600,12 @@ bool pkgDPkgPM::Go(int OutStatusFd) }, }; + // populate the "processing" map + PackageProcessingOps.insert( make_pair("install",N_("Installing %s")) ); + PackageProcessingOps.insert( make_pair("configure",N_("Configuring %s")) ); + PackageProcessingOps.insert( make_pair("remove",N_("Removing %s")) ); + PackageProcessingOps.insert( make_pair("trigproc",N_("Triggering %s")) ); + // init the PackageOps map, go over the list of packages that // that will be [installed|configured|removed|purged] and add // them to the PackageOps map (the dpkg states it goes through) diff --git a/apt-pkg/deb/dpkgpm.h b/apt-pkg/deb/dpkgpm.h index ebc7e32bf..449469126 100644 --- a/apt-pkg/deb/dpkgpm.h +++ b/apt-pkg/deb/dpkgpm.h @@ -47,6 +47,8 @@ class pkgDPkgPM : public pkgPackageManager // the int is the state that is already done (e.g. a package that is // going to be install is already in state "half-installed") map PackageOpsDone; + // map the dpkg "processing" info to human readable names + map PackageProcessingOps; // progress reporting unsigned int PackagesDone; unsigned int PackagesTotal; diff --git a/debian/changelog b/debian/changelog index 96c8ef86d..beca698d4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -14,6 +14,9 @@ apt (0.7.14) UNRELEASED; urgency=low * Documented all cron script related configuration items in configure-index. + [ Michael Vogt ] + * improve apt progress reporting, display trigger actions + [ Program translations ] * Simplified Chinese updated. Closes: #473360 * Catalan fixes. Closes: #387141 diff --git a/po/apt-all.pot b/po/apt-all.pot index 6319e740f..ae7cb4795 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-05-04 09:50+0200\n" +"POT-Creation-Date: 2008-05-22 16:56+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -2574,68 +2574,79 @@ msgstr "" msgid "Wrote %i records with %i missing files and %i mismatched files\n" msgstr "" -#: apt-pkg/deb/dpkgpm.cc:452 +#: apt-pkg/deb/dpkgpm.cc:486 #, c-format msgid "Directory '%s' missing" msgstr "" -#: apt-pkg/deb/dpkgpm.cc:535 +#: apt-pkg/deb/dpkgpm.cc:569 #, c-format msgid "Preparing %s" msgstr "" -#: apt-pkg/deb/dpkgpm.cc:536 +#: apt-pkg/deb/dpkgpm.cc:570 #, c-format msgid "Unpacking %s" msgstr "" -#: apt-pkg/deb/dpkgpm.cc:541 +#: apt-pkg/deb/dpkgpm.cc:575 #, c-format msgid "Preparing to configure %s" msgstr "" -#: apt-pkg/deb/dpkgpm.cc:542 +#: apt-pkg/deb/dpkgpm.cc:576 apt-pkg/deb/dpkgpm.cc:605 #, c-format msgid "Configuring %s" msgstr "" -#: apt-pkg/deb/dpkgpm.cc:544 apt-pkg/deb/dpkgpm.cc:545 +#: apt-pkg/deb/dpkgpm.cc:578 apt-pkg/deb/dpkgpm.cc:579 #, c-format msgid "Processing triggers for %s" msgstr "" -#: apt-pkg/deb/dpkgpm.cc:547 +#: apt-pkg/deb/dpkgpm.cc:581 #, c-format msgid "Installed %s" msgstr "" -#: apt-pkg/deb/dpkgpm.cc:552 apt-pkg/deb/dpkgpm.cc:554 -#: apt-pkg/deb/dpkgpm.cc:555 +#: apt-pkg/deb/dpkgpm.cc:586 apt-pkg/deb/dpkgpm.cc:588 +#: apt-pkg/deb/dpkgpm.cc:589 #, c-format msgid "Preparing for removal of %s" msgstr "" -#: apt-pkg/deb/dpkgpm.cc:557 +#: apt-pkg/deb/dpkgpm.cc:591 apt-pkg/deb/dpkgpm.cc:606 #, c-format msgid "Removing %s" msgstr "" -#: apt-pkg/deb/dpkgpm.cc:558 +#: apt-pkg/deb/dpkgpm.cc:592 #, c-format msgid "Removed %s" msgstr "" -#: apt-pkg/deb/dpkgpm.cc:563 +#: apt-pkg/deb/dpkgpm.cc:597 #, c-format msgid "Preparing to completely remove %s" msgstr "" -#: apt-pkg/deb/dpkgpm.cc:564 +#: apt-pkg/deb/dpkgpm.cc:598 #, c-format msgid "Completely removed %s" msgstr "" -#: apt-pkg/deb/dpkgpm.cc:716 +#. populate the "processing" map +#: apt-pkg/deb/dpkgpm.cc:604 +#, c-format +msgid "Installing %s" +msgstr "" + +#: apt-pkg/deb/dpkgpm.cc:607 +#, c-format +msgid "Triggering %s" +msgstr "" + +#: apt-pkg/deb/dpkgpm.cc:756 msgid "Can not write log, openpty() failed (/dev/pts not mounted?)\n" msgstr "" -- cgit v1.2.3-70-g09d2 From 868fbaceaa49aed38ae4c02c022c8c975d197191 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 3 Jun 2008 17:07:21 +0200 Subject: apt-pkg/depcache.cc: when checking for new important deps, skip critical ones (LP: #236360) --- apt-pkg/depcache.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index d1bea4cf6..d8b4dc6d2 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -914,8 +914,9 @@ void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst, { //FIXME: deal better with or-groups(?) DepIterator LocalStart = D; - - if(IsImportantDep(D) && Start.TargetPkg() == D.TargetPkg()) + + if(IsImportantDep(D) && !D.IsCritical() && + Start.TargetPkg() == D.TargetPkg()) { if(!isPreviouslySatisfiedImportantDep) { -- cgit v1.2.3-70-g09d2 From 81fef212a8945e713d6d8f7f0c0030b03d4caf47 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 3 Jun 2008 17:08:45 +0200 Subject: changelog updated --- debian/changelog | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/debian/changelog b/debian/changelog index f3c82dd4a..608f7c764 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,7 +1,20 @@ apt (0.7.15) UNRELEASED; urgency=low + [ Osamu Aoki ] + * 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. + [ Michael Vogt ] - * improve apt progress reporting, display trigger actions + * apt-pkg/deb/dpkgpm.cc: + - improve apt progress reporting, display trigger actions + * apt-pkg/depcache.cc: + - when checking for new important deps, skip critical ones + (LP: #236360) -- @@ -12,15 +25,6 @@ apt (0.7.14) unstable; urgency=low Thanks to Frédéric Bothamy for the patch Closes: #322470 - [ Osamu Aoki ] - * 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. - [ Program translations ] * Simplified Chinese updated. Closes: #473360 * Catalan fixes. Closes: #387141 -- cgit v1.2.3-70-g09d2 From 5d382c9cbd8864c391a99ebf184836a5c60f56ed Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 17 Jul 2008 09:52:57 +0100 Subject: apt-pkg/deb/dpkgpm.cc: improve the trigger text --- apt-pkg/deb/dpkgpm.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index 8222be75e..3528c1619 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -604,7 +604,7 @@ bool pkgDPkgPM::Go(int OutStatusFd) PackageProcessingOps.insert( make_pair("install",N_("Installing %s")) ); PackageProcessingOps.insert( make_pair("configure",N_("Configuring %s")) ); PackageProcessingOps.insert( make_pair("remove",N_("Removing %s")) ); - PackageProcessingOps.insert( make_pair("trigproc",N_("Triggering %s")) ); + PackageProcessingOps.insert( make_pair("trigproc",N_("Running post-installation trigger %s")) ); // init the PackageOps map, go over the list of packages that // that will be [installed|configured|removed|purged] and add -- cgit v1.2.3-70-g09d2 From c769cd6fdc0d675bac07d0bcdf20e7b3ac0598a9 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 25 Jul 2008 19:37:19 +0200 Subject: * merge patch that enforces stricter https server certificate checking (thanks to Arnaud Ebalard, closes: #485960) * allow per-mirror specific https settings (thanks to Arnaud Ebalard, closes: #485965) --- debian/changelog | 4 ++++ methods/https.cc | 59 ++++++++++++++++++++++++++++++++++++++++++++------------ 2 files changed, 51 insertions(+), 12 deletions(-) diff --git a/debian/changelog b/debian/changelog index 608f7c764..6df5437c6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -15,6 +15,10 @@ apt (0.7.15) UNRELEASED; urgency=low * apt-pkg/depcache.cc: - when checking for new important deps, skip critical ones (LP: #236360) + * merge patch that enforces stricter https server certificate + checking (thanks to Arnaud Ebalard, closes: #485960) + * allow per-mirror specific https settings + (thanks to Arnaud Ebalard, closes: #485965) -- diff --git a/methods/https.cc b/methods/https.cc index b0b05a47e..e53ba1a11 100644 --- a/methods/https.cc +++ b/methods/https.cc @@ -108,6 +108,8 @@ bool HttpsMethod::Fetch(FetchItem *Itm) struct curl_slist *headers=NULL; char curl_errorstr[CURL_ERROR_SIZE]; long curl_responsecode; + URI Uri = Itm->Uri; + string remotehost = Uri.Host; // TODO: // - http::Pipeline-Depth @@ -127,23 +129,56 @@ bool HttpsMethod::Fetch(FetchItem *Itm) curl_easy_setopt(curl, CURLOPT_FAILONERROR, true); curl_easy_setopt(curl, CURLOPT_FILETIME, true); - // FIXME: https: offer various options of verification - bool peer_verify = _config->FindB("Acquire::https::Verify-Peer", false); + // SSL parameters are set by default to the common (non mirror-specific) value + // if available (or a default one) and gets overload by mirror-specific ones. + + // File containing the list of trusted CA. + string cainfo = _config->Find("Acquire::https::CaInfo",""); + string knob = "Acquire::https::"+remotehost+"::CaInfo"; + cainfo = _config->Find(knob.c_str(),cainfo.c_str()); + if(cainfo != "") + curl_easy_setopt(curl, CURLOPT_CAINFO,cainfo.c_str()); + + // Check server certificate against previous CA list ... + bool peer_verify = _config->FindB("Acquire::https::Verify-Peer",true); + knob = "Acquire::https::" + remotehost + "::Verify-Peer"; + peer_verify = _config->FindB(knob.c_str(), peer_verify); curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, peer_verify); - // sslcert file + // ... and hostname against cert CN or subjectAltName + int default_verify = 2; + bool verify = _config->FindB("Acquire::https::Verify-Host",true); + knob = "Acquire::https::"+remotehost+"::Verify-Host"; + verify = _config->FindB(knob.c_str(),verify); + if (!verify) + default_verify = 0; + curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, verify); + + // For client authentication, certificate file ... string pem = _config->Find("Acquire::https::SslCert",""); + knob = "Acquire::https::"+remotehost+"::SslCert"; + pem = _config->Find(knob.c_str(),pem.c_str()); if(pem != "") curl_easy_setopt(curl, CURLOPT_SSLCERT, pem.c_str()); - - // CA-Dir - string certdir = _config->Find("Acquire::https::CaPath",""); - if(certdir != "") - curl_easy_setopt(curl, CURLOPT_CAPATH, certdir.c_str()); - - // Server-verify - int verify = _config->FindI("Acquire::https::Verify-Host",2); - curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, verify); + + // ... and associated key. + string key = _config->Find("Acquire::https::SslKey",""); + knob = "Acquire::https::"+remotehost+"::SslKey"; + key = _config->Find(knob.c_str(),key.c_str()); + if(key != "") + curl_easy_setopt(curl, CURLOPT_SSLKEY, key.c_str()); + + // Allow forcing SSL version to SSLv3 or TLSv1 (SSLv2 is not + // supported by GnuTLS). + long final_version = CURL_SSLVERSION_DEFAULT; + string sslversion = _config->Find("Acquire::https::SslForceVersion",""); + knob = "Acquire::https::"+remotehost+"::SslForceVersion"; + sslversion = _config->Find(knob.c_str(),sslversion.c_str()); + if(sslversion == "TLSv1") + final_version = CURL_SSLVERSION_TLSv1; + else if(sslversion == "SSLv3") + final_version = CURL_SSLVERSION_SSLv3; + curl_easy_setopt(curl, CURLOPT_SSLVERSION, final_version); // cache-control if(_config->FindB("Acquire::http::No-Cache",false) == false) -- cgit v1.2.3-70-g09d2 From eea6312729b11f6c80c6cec027bbc475a34bb2d1 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 25 Jul 2008 19:45:46 +0200 Subject: * add doc/examples/apt-https-method-example.cof (thanks to Arnaud Ebalard, closes: #485964) --- debian/changelog | 2 + doc/examples/apt-https-method-example.conf | 165 +++++++++++++++++++++++++++++ 2 files changed, 167 insertions(+) create mode 100644 doc/examples/apt-https-method-example.conf diff --git a/debian/changelog b/debian/changelog index 6df5437c6..b921fb004 100644 --- a/debian/changelog +++ b/debian/changelog @@ -19,6 +19,8 @@ apt (0.7.15) UNRELEASED; urgency=low checking (thanks to Arnaud Ebalard, closes: #485960) * allow per-mirror specific https settings (thanks to Arnaud Ebalard, closes: #485965) + * add doc/examples/apt-https-method-example.cof + (thanks to Arnaud Ebalard, closes: #485964) -- diff --git a/doc/examples/apt-https-method-example.conf b/doc/examples/apt-https-method-example.conf new file mode 100644 index 000000000..0067171bd --- /dev/null +++ b/doc/examples/apt-https-method-example.conf @@ -0,0 +1,165 @@ +/* This file is a sample configuration for apt https method. Configuration + parameters found in this example file are expected to be used in main + apt.conf file, just like other configuration parameters for different + methods (ftp, file, ...). + + This example file starts with a common setup that voluntarily exhibits + all available configurations knobs with simple comments. Extended + comments on the behavior of the option is provided at the end for + better readibility. As a matter of fact, a common configuration file + will certainly contain far less elements and benefit of default values + for many parameters. + + Because some configuration parameters for apt https method in following + examples apply to specific (fictional) repositories, the associated + sources.list file is provided here: + + ... + + deb https://secure.dom1.tld/debian unstable main contrib non-free + deb-src https://secure.dom1.tld/debian unstable main contrib non-free + + deb https://secure.dom2.tld/debian unstable main contrib non-free + deb-src https://secure.dom2.tld/debian unstable main contrib non-free + + ... + + + Some notes on the servers: + + - secure.dom1.tld is freely accessible using https (no client + authentication is required). + - secure.dom1.tld certificate is part of a multi level PKI, and we + want to specifically check the issuer of its certificate. We do + not have the constraint for secure.dom2.tld + - secure.dom2.tld requires client authentication by certificate + to access its content. + - The certificate presented by both server have (as expected) a CN that + matches their respective DNS names. + - It somtimes happens that we had other more generic https available + repository to our list. We want the checks to be performed against + a common list of anchors (like the one provided by ca-certificates + package for instance) + + The sample configuration below basically covers those simpe needs. +*/ + + +// Verify peer certificate and also matching between certificate name +// and server name as provided in sources.list (default values) +Acquire::https::Verify-Peer "true"; +Acquire::https::Verify-Host "true"; + +// Except otherwise specified, use that list of anchors +Acquire::https::CaInfo "/etc/ssl/certs/ca-certificates.pem"; + +// Use a specific anchor and associated CRL. Enforce issuer of +// server certificate using its cert. +Acquire::https::secure.dom1.tld::CaInfo "/etc/apt/certs/ca-dom1-crt.pem"; + +// Like previous for anchor and CRL, but also provide our +// certificate and keys for client authentication. +Acquire::https::secure.dom2.tld::CaInfo "/etc/apt/certs/ca-dom2-crt.pem"; +Acquire::https::secure.dom2.tld::SslCert "/etc/apt/certs/my-crt.pem"; +Acquire::https::secure.dom2.tld::SslKey "/etc/apt/certs/my-key.pem"; + +// No need to downgrade, TLS will be proposed by default. Uncomment +// to have SSLv3 proposed. +// Acquire::https::mirror.ipv6.ssi.corp::SslForceVersion "SSLv3"; + +// No need for more debug if every is fine (default). Uncomment +// me to get additional information. +// Debug::Acquire::https "true"; + + +/* + Options with extended comments: + + Acquire::https[::repo.domain.tld]::CaInfo "/path/to/ca/certs.pem"; + + A string providing the path of a file containing the list of trusted + CA certificates used to verify the server certificate. The pointed + file is made of the concatenation of the CA certificates (in + PEM format) creating the chain used for the verification of the path + from the root (self signed one). If the remote server provides the + whole chain during the exchange, the file need only contain the root + certificate. Otherwise, the whole chain is required. + + If you need to support multiple authorities, the only way is to + concatenate everything. + + If None is provided, the default CA bundle used by GnuTLS (apt https + method is linked against libcurl-gnutls) is used. At the time of + writing, /etc/ssl/certs/ca-certificates.crt. + + If no specific hostname is provided, the file is used by default + for all https targets. If a specific mirror is provided, it is + used for the https entries in the sources.list file that use that + repository (with the same name). + + Acquire::https[::repo.domain.tld]::Verify-Peer "true"; + + When authenticating the server, if the certificate verification fails + for some reason (expired, revoked, man in the middle, lack of anchor, + ...), the connection fails. This is obviously what you want in all + cases and what the default value (true) of this option provides. + + If you know EXACTLY what you are doing, setting this option to "false" + allow you to skip peer certificate verification and make the exchange + succeed. Again, this option is for debugging or testing purpose only. + It removes ALL the security provided by the use of SSL.TLS to secure + the HTTP exchanges. + + Acquire::https[::repo.domain.tld]::Verify-Host "true"; + + The certificate provided by the server during the TLS/SSL exchange + provides the identity of the server which should match the DNS name + used to access it. By default, as requested by RFC 2818, the name + of the mirror is checked against the identity found in the + certificate. This default behavior is safe and should not be + changed. If you know that the server you are using has a DNS name + which does not match the identity in its certificate, you can + [report that issue to its administrator or] set the option to + "false", which will prevent the comparison to be done. + + The options can be set globally or on a per-mirror basis. If set + globally, the DNS name used is the one found in the sources.list + file in the https URI. + + Acquire::https[::repo.domain.tld]::SslCert "/path/to/client/cert.pem"; + Acquire::https[::repo.domain.tld]::SslKey "/path/to/client/key.pem"; + + These two options provides support for client authentication using + certificates. They respectively accept the X.509 client certificate + in PEM format and the associated client key in PEM format (non + encrypted form). + + The options can be set globally (which rarely makes sense) or on a + per-mirror basis. + + Acquire::https[::repo.domain.tld]::SslForceVersion "TLSv1"; + + This option can be use to select the version which will be proposed + to the server. "SSLv3" and "TLSv1" are supported. SSLv2, which is + considered insecure anyway is not supported (by gnutls, which is + used by libcurl against which apt https method is linked). + + When the option is set to "SSLv3" to have apt propose SSLv3 (and + associated sets of ciphersuites) instead of TLSv1 (the default) + when performing the exchange. This prevents the server to select + TLSv1 and use associated cipheruites. You should probably not use + this option except if you know exactly what you are doing. + + Note that the default setting does not guarantee that the server + will not select SSLv3 (for ciphersuites and SSL/TLS version as + selectio is always done by the server, in the end). It only means + that apt will not advertise TLS support. + + Debug::Acquire::https "true"; + + This option can be used to show debug information. Because it is + quite verbose, it is mainly useful to debug problems in case of + failure to connect to a server for some reason. The default value + is "false". + +*/ -- cgit v1.2.3-70-g09d2 From 870ce08fa327a889cfbd9ca67d7a33808b5482f4 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 25 Jul 2008 20:29:31 +0200 Subject: * add DPkg::NoTriggers option so that applications that call apt/aptitude (like the installer) defer trigger processing (thanks to Joey Hess) --- apt-pkg/deb/dpkgpm.cc | 3 +++ debian/changelog | 3 +++ 2 files changed, 6 insertions(+) diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index 3528c1619..c2c33f342 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -554,6 +554,7 @@ bool pkgDPkgPM::Go(int OutStatusFd) { 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); if (RunScripts("DPkg::Pre-Invoke") == false) return false; @@ -689,6 +690,8 @@ bool pkgDPkgPM::Go(int OutStatusFd) case Item::Configure: Args[n++] = "--configure"; + if (NoTriggers) + Args[n++] = "--no-triggers"; Size += strlen(Args[n-1]); break; diff --git a/debian/changelog b/debian/changelog index b921fb004..f040d6cdf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -21,6 +21,9 @@ apt (0.7.15) UNRELEASED; urgency=low (thanks to Arnaud Ebalard, closes: #485965) * add doc/examples/apt-https-method-example.cof (thanks to Arnaud Ebalard, closes: #485964) + * add DPkg::NoTriggers option so that applications that call + apt/aptitude (like the installer) defer trigger processing + (thanks to Joey Hess) -- -- cgit v1.2.3-70-g09d2 From 7146a53c4c6803bff0ddec739f5ca83231cb2b14 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 29 Jul 2008 16:56:03 +0200 Subject: * cmdline/apt-cache.cc: - do not show Breaks in unmet --- cmdline/apt-cache.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc index f10ea48be..d73111b6a 100644 --- a/cmdline/apt-cache.cc +++ b/cmdline/apt-cache.cc @@ -102,15 +102,13 @@ bool UnMet(CommandLine &CmdL) if (End->Type != pkgCache::Dep::PreDepends && End->Type != pkgCache::Dep::Depends && End->Type != pkgCache::Dep::Suggests && - End->Type != pkgCache::Dep::Recommends && - End->Type != pkgCache::Dep::DpkgBreaks) + End->Type != pkgCache::Dep::Recommends) continue; // Important deps only if (Important == true) if (End->Type != pkgCache::Dep::PreDepends && - End->Type != pkgCache::Dep::Depends && - End->Type != pkgCache::Dep::DpkgBreaks) + End->Type != pkgCache::Dep::Depends) continue; // Verify the or group -- cgit v1.2.3-70-g09d2 From 06d79436542ccf3e9664306da05ba4c34fba4882 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 31 Jul 2008 14:34:50 +0200 Subject: (thanks to Joey Hess) * document --install-recommends and --no-install-recommends (thanks to Dereck Wonnacott, LP: #126180) --- debian/changelog | 4 +++- doc/apt-get.8.xml | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index f040d6cdf..0f78f6d5a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -23,7 +23,9 @@ apt (0.7.15) UNRELEASED; urgency=low (thanks to Arnaud Ebalard, closes: #485964) * add DPkg::NoTriggers option so that applications that call apt/aptitude (like the installer) defer trigger processing - (thanks to Joey Hess) + (thanks to Joey Hess) + * document --install-recommends and --no-install-recommends + (thanks to Dereck Wonnacott, LP: #126180) -- diff --git a/doc/apt-get.8.xml b/doc/apt-get.8.xml index 329a46c51..edb74270b 100644 --- a/doc/apt-get.8.xml +++ b/doc/apt-get.8.xml @@ -313,6 +313,14 @@ Configuration Item: APT::Get::Compile. + + Also install recommended packages. + + + + Do not install recommended packages. + + Ignore package Holds; This causes apt-get to ignore a hold placed on a package. This may be useful in conjunction with -- cgit v1.2.3-70-g09d2 From db40f8e03e7ff2598f7f9b406bb98047c8cc95ba Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 31 Jul 2008 14:51:18 +0200 Subject: * apt-ftparchive might write corrupt Release files (LP: #46439) --- debian/changelog | 4 ++++ ftparchive/writer.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 0f78f6d5a..c788c1d7d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -27,6 +27,10 @@ apt (0.7.15) UNRELEASED; urgency=low * document --install-recommends and --no-install-recommends (thanks to Dereck Wonnacott, LP: #126180) + [ Dereck Wonnacott ] + * apt-ftparchive might write corrupt Release files (LP: #46439) + + -- apt (0.7.14) unstable; urgency=low diff --git a/ftparchive/writer.h b/ftparchive/writer.h index a4e4356f9..6e161c752 100644 --- a/ftparchive/writer.h +++ b/ftparchive/writer.h @@ -52,7 +52,7 @@ class FTWScanner { if (ErrorPrinted == false && Quiet <= Priority) { - cout << endl; + c1out << endl; ErrorPrinted = true; } } -- cgit v1.2.3-70-g09d2 From 5aa95c863d9bc5b0de7dd1279d3ad672193cc3a6 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 31 Jul 2008 14:57:38 +0200 Subject: * Apply --important option to apt-cache depends (LP: #16947) --- cmdline/apt-cache.cc | 8 +++++++- debian/changelog | 2 +- doc/apt-cache.8.xml | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc index d73111b6a..a73e35a53 100644 --- a/cmdline/apt-cache.cc +++ b/cmdline/apt-cache.cc @@ -555,6 +555,7 @@ bool Depends(CommandLine &CmdL) bool Recurse = _config->FindB("APT::Cache::RecurseDepends",false); bool Installed = _config->FindB("APT::Cache::Installed",false); + bool Important = _config->FindB("APT::Cache::Important",false); bool DidSomething; do { @@ -577,7 +578,12 @@ bool Depends(CommandLine &CmdL) for (pkgCache::DepIterator D = Ver.DependsList(); D.end() == false; D++) { - + // Important deps only + if (Important == true) + if (D->Type != pkgCache::Dep::PreDepends && + D->Type != pkgCache::Dep::Depends) + continue; + pkgCache::PkgIterator Trg = D.TargetPkg(); if((Installed && Trg->CurrentVer != 0) || !Installed) diff --git a/debian/changelog b/debian/changelog index c788c1d7d..24f876e44 100644 --- a/debian/changelog +++ b/debian/changelog @@ -29,7 +29,7 @@ apt (0.7.15) UNRELEASED; urgency=low [ Dereck Wonnacott ] * apt-ftparchive might write corrupt Release files (LP: #46439) - + * Apply --important option to apt-cache depends (LP: #16947) -- diff --git a/doc/apt-cache.8.xml b/doc/apt-cache.8.xml index c1e65332d..c359ac3d8 100644 --- a/doc/apt-cache.8.xml +++ b/doc/apt-cache.8.xml @@ -289,7 +289,7 @@ Reverse Provides: - Print only important dependencies; for use with unmet. Causes only Depends and + Print only important dependencies; for use with unmet and depends. Causes only Depends and Pre-Depends relations to be printed. Configuration Item: APT::Cache::Important. -- cgit v1.2.3-70-g09d2 From 9b5d79ec68d5380f26b92cd0d9cb7af6a19ac849 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 5 Aug 2008 10:52:09 +0200 Subject: fix various -Wall warnings --- apt-inst/contrib/extracttar.cc | 4 ++-- apt-pkg/acquire.cc | 3 ++- apt-pkg/contrib/cdromutl.cc | 3 ++- apt-pkg/contrib/mmap.cc | 5 +++-- apt-pkg/deb/dpkgpm.cc | 4 ++-- apt-pkg/depcache.cc | 2 +- apt-pkg/indexcopy.cc | 2 +- cmdline/apt-cache.cc | 2 +- debian/changelog | 1 + methods/http.cc | 3 ++- methods/https.cc | 2 +- 11 files changed, 18 insertions(+), 13 deletions(-) diff --git a/apt-inst/contrib/extracttar.cc b/apt-inst/contrib/extracttar.cc index 68c871a5d..8338fd89d 100644 --- a/apt-inst/contrib/extracttar.cc +++ b/apt-inst/contrib/extracttar.cc @@ -208,14 +208,14 @@ bool ExtractTar::Go(pkgDirStream &Stream) Itm.Name = (char *)LastLongName.c_str(); else { - Tar->Name[sizeof(Tar->Name)] = 0; + Tar->Name[sizeof(Tar->Name)-1] = 0; Itm.Name = Tar->Name; } if (Itm.Name[0] == '.' && Itm.Name[1] == '/' && Itm.Name[2] != 0) Itm.Name += 2; // Grab the link target - Tar->Name[sizeof(Tar->LinkName)] = 0; + Tar->Name[sizeof(Tar->LinkName)-1] = 0; Itm.LinkTarget = Tar->LinkName; if (LastLongLink.empty() == false) diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc index 6840ae120..91f603889 100644 --- a/apt-pkg/acquire.cc +++ b/apt-pkg/acquire.cc @@ -444,8 +444,9 @@ bool pkgAcquire::Clean(string Dir) unlink(Dir->d_name); }; - chdir(StartDir.c_str()); closedir(D); + if (chdir(StartDir.c_str()) != 0) + return _error->Errno("chdir",_("Unable to change to %s"),StartDir.c_str()); return true; } /*}}}*/ diff --git a/apt-pkg/contrib/cdromutl.cc b/apt-pkg/contrib/cdromutl.cc index 6f00e1451..b6524a178 100644 --- a/apt-pkg/contrib/cdromutl.cc +++ b/apt-pkg/contrib/cdromutl.cc @@ -176,7 +176,8 @@ bool IdentCdrom(string CD,string &Res,unsigned int Version) Hash.Add(Dir->d_name); }; - chdir(StartDir.c_str()); + if (chdir(StartDir.c_str()) != 0) + return _error->Errno("chdir",_("Unable to change to %s"),StartDir.c_str()); closedir(D); // Some stats from the fsys diff --git a/apt-pkg/contrib/mmap.cc b/apt-pkg/contrib/mmap.cc index abcae46fe..eed438250 100644 --- a/apt-pkg/contrib/mmap.cc +++ b/apt-pkg/contrib/mmap.cc @@ -192,7 +192,8 @@ DynamicMMap::~DynamicMMap() unsigned long EndOfFile = iSize; iSize = WorkSpace; Close(false); - ftruncate(Fd->Fd(),EndOfFile); + if(ftruncate(Fd->Fd(),EndOfFile) < 0) + _error->Errno("ftruncate", _("Failed to truncate file")); } /*}}}*/ // DynamicMMap::RawAllocate - Allocate a raw chunk of unaligned space /*{{{*/ @@ -209,7 +210,7 @@ unsigned long DynamicMMap::RawAllocate(unsigned long Size,unsigned long Aln) // Just in case error check if (Result + Size > WorkSpace) { - _error->Error("Dynamic MMap ran out of room"); + _error->Error(_("Dynamic MMap ran out of room")); return 0; } diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index c2c33f342..2abb3a0ef 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -496,7 +496,7 @@ bool pkgDPkgPM::OpenLog() struct tm *tmp = localtime(&t); strftime(outstr, sizeof(outstr), "%F %T", tmp); fprintf(term_out, "\nLog started: "); - fprintf(term_out, outstr); + fprintf(term_out, "%s", outstr); fprintf(term_out, "\n"); } return true; @@ -511,7 +511,7 @@ bool pkgDPkgPM::CloseLog() struct tm *tmp = localtime(&t); strftime(outstr, sizeof(outstr), "%F %T", tmp); fprintf(term_out, "Log ended: "); - fprintf(term_out, outstr); + fprintf(term_out, "%s", outstr); fprintf(term_out, "\n"); fclose(term_out); } diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index d8b4dc6d2..4ac77b3aa 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -269,7 +269,7 @@ bool pkgDepCache::writeStateFile(OpProgress *prog, bool InstalledOnly) ostr.str(string("")); ostr << "Package: " << pkg.Name() << "\nAuto-Installed: 1\n\n"; - fprintf(OutFile,ostr.str().c_str()); + fprintf(OutFile,"%s",ostr.str().c_str()); fprintf(OutFile,"\n"); } } diff --git a/apt-pkg/indexcopy.cc b/apt-pkg/indexcopy.cc index b30777d8d..9e5c03e0b 100644 --- a/apt-pkg/indexcopy.cc +++ b/apt-pkg/indexcopy.cc @@ -639,7 +639,7 @@ bool SigVerify::CopyAndVerify(string CDROM,string Name,vector &SigList, // Open the Release file and add it to the MetaIndex if(!MetaIndex->Load(*I+"Release")) { - _error->Error(MetaIndex->ErrorText.c_str()); + _error->Error("%s",MetaIndex->ErrorText.c_str()); return false; } diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc index a73e35a53..b16a0e5d0 100644 --- a/cmdline/apt-cache.cc +++ b/cmdline/apt-cache.cc @@ -1276,7 +1276,7 @@ bool DisplayRecord(pkgCache::VerIterator V) /*}}}*/ // Search - Perform a search /*{{{*/ // --------------------------------------------------------------------- -/* This searches the package names and pacakge descriptions for a pattern */ +/* This searches the package names and package descriptions for a pattern */ struct ExDescFile { pkgCache::DescFile *Df; diff --git a/debian/changelog b/debian/changelog index 24f876e44..cd433ac25 100644 --- a/debian/changelog +++ b/debian/changelog @@ -26,6 +26,7 @@ apt (0.7.15) UNRELEASED; urgency=low (thanks to Joey Hess) * document --install-recommends and --no-install-recommends (thanks to Dereck Wonnacott, LP: #126180) + * fix various -Wall warnings [ Dereck Wonnacott ] * apt-ftparchive might write corrupt Release files (LP: #46439) diff --git a/methods/http.cc b/methods/http.cc index 26d435dea..b3c791fa0 100644 --- a/methods/http.cc +++ b/methods/http.cc @@ -941,7 +941,8 @@ int HttpMethod::DealWithHeaders(FetchResult &Res,ServerState *Srv) if (Srv->StartPos >= 0) { Res.ResumePoint = Srv->StartPos; - ftruncate(File->Fd(),Srv->StartPos); + if (ftruncate(File->Fd(),Srv->StartPos) < 0) + _error->Errno("ftruncate", _("Failed to truncate file")); } // Set the start point diff --git a/methods/https.cc b/methods/https.cc index e53ba1a11..98dfeefa1 100644 --- a/methods/https.cc +++ b/methods/https.cc @@ -249,7 +249,7 @@ bool HttpsMethod::Fetch(FetchItem *Itm) if(success != 0) { unlink(File->Name().c_str()); - _error->Error(curl_errorstr); + _error->Error("%s", curl_errorstr); Fail(); return true; } -- cgit v1.2.3-70-g09d2 From 496a05c628d39c981a8f472f16629043d8508808 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 6 Aug 2008 13:58:44 +0200 Subject: make "apt-get build-dep" installed packages marked automatic by default. This can be changed by setting the value of APT::Get::Build-Dep-Automatic to false (thanks to Aaron Haviland, closes: #44874, LP: #248268) --- cmdline/apt-get.cc | 2 ++ debian/changelog | 6 +++++- doc/examples/configure-index | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 104baba8a..eda37a31e 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -2513,6 +2513,8 @@ bool DoBuildDep(CommandLine &CmdL) { // We successfully installed something; skip remaining alternatives skipAlternatives = hasAlternatives; + if(_config->FindB("APT::Get::Build-Dep-Automatic", true) == true) + Cache->MarkAuto(Pkg, true); continue; } else if (hasAlternatives) diff --git a/debian/changelog b/debian/changelog index cd433ac25..e034dc733 100644 --- a/debian/changelog +++ b/debian/changelog @@ -27,7 +27,11 @@ apt (0.7.15) UNRELEASED; urgency=low * document --install-recommends and --no-install-recommends (thanks to Dereck Wonnacott, LP: #126180) * fix various -Wall warnings - + * make "apt-get build-dep" installed packages marked automatic + by default. This can be changed by setting the value of + APT::Get::Build-Dep-Automatic to false (thanks to Aaron + Haviland, closes: #44874, LP: #248268) + [ Dereck Wonnacott ] * apt-ftparchive might write corrupt Release files (LP: #46439) * Apply --important option to apt-cache depends (LP: #16947) diff --git a/doc/examples/configure-index b/doc/examples/configure-index index 9c53154da..0bab8e0f8 100644 --- a/doc/examples/configure-index +++ b/doc/examples/configure-index @@ -54,6 +54,7 @@ APT Only-Source ""; Diff-Only "false"; Tar-Only "false"; + Build-Dep-Automatic "true"; }; Cache -- cgit v1.2.3-70-g09d2 From 8d357c5290f737e0f47f1ad62b1256586aade860 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Sat, 9 Aug 2008 00:21:41 +0200 Subject: * apt-pkg/indexcopy.cc: - support having CDs with no Packages file (just a Packages.gz) by not forcing a verification on non-existing files (LP: #255545) --- apt-pkg/indexcopy.cc | 9 +++++++++ debian/changelog | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/apt-pkg/indexcopy.cc b/apt-pkg/indexcopy.cc index 9e5c03e0b..b1e75e30f 100644 --- a/apt-pkg/indexcopy.cc +++ b/apt-pkg/indexcopy.cc @@ -522,6 +522,15 @@ bool SigVerify::Verify(string prefix, string file, indexRecords *MetaIndex) { const indexRecords::checkSum *Record = MetaIndex->Lookup(file); + // we skip non-existing files in the verifcation to support a cdrom + // with no Packages file (just a Package.gz), see LP: #255545 + // (non-existing files are not considered a error) + if(!FileExists(prefix+file)) + { + _error->Warning("Skipping non-exisiting file %s", string(prefix+file).c_str()); + return true; + } + if (!Record) { _error->Warning("Can't find authentication record for: %s",file.c_str()); diff --git a/debian/changelog b/debian/changelog index e034dc733..e79d37d04 100644 --- a/debian/changelog +++ b/debian/changelog @@ -31,6 +31,10 @@ apt (0.7.15) UNRELEASED; urgency=low by default. This can be changed by setting the value of APT::Get::Build-Dep-Automatic to false (thanks to Aaron Haviland, closes: #44874, LP: #248268) + * apt-pkg/indexcopy.cc: + - support having CDs with no Packages file (just a Packages.gz) + by not forcing a verification on non-existing files + (LP: #255545) [ Dereck Wonnacott ] * apt-ftparchive might write corrupt Release files (LP: #46439) -- cgit v1.2.3-70-g09d2 From 78acd6505b8c08f47dd44911b567df31d07aa78d Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 9 Sep 2008 21:26:40 +0200 Subject: * cmdline/apt-cache.cc: - remove the gettext from a string that consists entirely of variables (LP: #56792) --- cmdline/apt-cache.cc | 3 ++- debian/changelog | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc index b16a0e5d0..11bc4fe03 100644 --- a/cmdline/apt-cache.cc +++ b/cmdline/apt-cache.cc @@ -1533,7 +1533,8 @@ bool Policy(CommandLine &CmdL) if (SrcList->FindIndex(F,Indx) == false && _system->FindIndex(F,Indx) == false) return _error->Error(_("Cache is out of sync, can't x-ref a package file")); - printf(_("%4i %s\n"), + + printf("%4i %s\n", Plcy.GetPriority(F),Indx->Describe(true).c_str()); // Print the reference information for the package diff --git a/debian/changelog b/debian/changelog index e79d37d04..1e23129b4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -35,6 +35,9 @@ apt (0.7.15) UNRELEASED; urgency=low - support having CDs with no Packages file (just a Packages.gz) by not forcing a verification on non-existing files (LP: #255545) + * cmdline/apt-cache.cc: + - remove the gettext from a string that consists entirely + of variables (LP: #56792) [ Dereck Wonnacott ] * apt-ftparchive might write corrupt Release files (LP: #46439) -- cgit v1.2.3-70-g09d2 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 --- configure.in | 2 +- debian/changelog | 4 +++- doc/makefile | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/configure.in b/configure.in index c0c73e1c8..4d3f557d2 100644 --- a/configure.in +++ b/configure.in @@ -18,7 +18,7 @@ AC_CONFIG_AUX_DIR(buildlib) AC_CONFIG_HEADER(include/config.h:buildlib/config.h.in include/apti18n.h:buildlib/apti18n.h.in) dnl -- SET THIS TO THE RELEASE VERSION -- -AC_DEFINE_UNQUOTED(VERSION,"0.7.13") +AC_DEFINE_UNQUOTED(VERSION,"0.7.15") PACKAGE="apt" AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE") AC_SUBST(PACKAGE) 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 diff --git a/doc/makefile b/doc/makefile index 8a8a04c03..6ea1c1343 100644 --- a/doc/makefile +++ b/doc/makefile @@ -20,7 +20,7 @@ INCLUDES = apt.ent include $(XML_MANPAGE_H) # Examples -SOURCE = examples/apt.conf examples/sources.list examples/configure-index +SOURCE = examples/apt.conf examples/sources.list examples/configure-index examples/apt-https-method-example.conf TO = $(DOC) TARGET = binary include $(COPY_H) -- 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(-) 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(-) 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(-) 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(-) 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 7efdcd3a5553349c4082da17494bb53715ec2e08 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 28 Oct 2008 20:38:02 +0100 Subject: apt-pkg/indexcopy.cc: discard errors after Verify() --- apt-pkg/indexcopy.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/apt-pkg/indexcopy.cc b/apt-pkg/indexcopy.cc index b1e75e30f..5a92c79b7 100644 --- a/apt-pkg/indexcopy.cc +++ b/apt-pkg/indexcopy.cc @@ -660,6 +660,7 @@ bool SigVerify::CopyAndVerify(string CDROM,string Name,vector &SigList, if(!Verify(prefix,*I, MetaIndex)) { // something went wrong, don't copy the Release.gpg // FIXME: delete any existing gpg file? + _error->Discard(); continue; } } -- cgit v1.2.3-70-g09d2 From d720a7d47968dff71befcd5081d7af4e3eaad081 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 28 Oct 2008 20:39:58 +0100 Subject: apt-pkg/cdrom.cc: add missing i18n string --- apt-pkg/cdrom.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apt-pkg/cdrom.cc b/apt-pkg/cdrom.cc index 370687f24..a31602dfa 100644 --- a/apt-pkg/cdrom.cc +++ b/apt-pkg/cdrom.cc @@ -686,7 +686,7 @@ bool pkgCdrom::Add(pkgCdromStatus *log) { if (_config->FindB("APT::CDROM::NoMount",false) == false) UnmountCdrom(CDROM); - return _error->Error("Unable to locate any package files, perhaps this is not a Debian Disc"); + return _error->Error(_("Unable to locate any package files, perhaps this is not a Debian Disc or the wrong architecture?")); } // Check if the CD is in the database -- 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(-) 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(+) 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 d9ec0faca41c96df02bac493549af64c5e6a8bc2 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 12 Nov 2008 20:40:09 +0100 Subject: merge from debian-sid --- apt-pkg/deb/dpkgpm.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index dde1c6d63..5349a7ef2 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -932,7 +932,7 @@ bool pkgDPkgPM::Go(int OutStatusFd) // Restore sig int/quit signal(SIGQUIT,old_SIGQUIT); signal(SIGINT,old_SIGINT); - signal(SIGINT,old_SIGHUP); + signal(SIGHUP,old_SIGHUP); if(master >= 0) { -- cgit v1.2.3-70-g09d2 From e306ec4728557675680115af4470d16159f22ab1 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 12 Nov 2008 21:17:34 +0100 Subject: fix another typo --- apt-pkg/deb/dpkgpm.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index 5349a7ef2..686cbc6ee 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -892,7 +892,7 @@ bool pkgDPkgPM::Go(int OutStatusFd) // Restore sig int/quit signal(SIGQUIT,old_SIGQUIT); signal(SIGINT,old_SIGINT); - signal(SIGINT,old_SIGHUP); + signal(SIGHUP,old_SIGHUP); return _error->Errno("waitpid","Couldn't wait for subprocess"); } -- 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(-) 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(-) 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 aebe158d20055317ad630852d1d331716f61f0ba Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 9 Dec 2008 09:21:53 -0800 Subject: apt-pkg/contrib/strutl.cc: increase the size limit --- apt-pkg/contrib/strutl.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc index cdd88827b..98d9c41e4 100644 --- a/apt-pkg/contrib/strutl.cc +++ b/apt-pkg/contrib/strutl.cc @@ -1027,7 +1027,7 @@ void ioprintf(ostream &out,const char *format,...) va_start(args,format); // sprintf the description - char S[400]; + char S[4096]; vsnprintf(S,sizeof(S),format,args); out << S; } @@ -1042,7 +1042,7 @@ void strprintf(string &out,const char *format,...) va_start(args,format); // sprintf the description - char S[1024]; + char S[4096]; vsnprintf(S,sizeof(S),format,args); out = string(S); } -- 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(-) 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(-) 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(-) 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 3bfb443cbcf82c9f1c56de0f7ca65e16d2ab04b9 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 19 Jan 2009 12:50:37 +0100 Subject: apt-pkg/pkgcachegen.cc: when searching for duplicates in the description, avoid side effect --- apt-pkg/pkgcachegen.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc index f71547f39..397c19829 100644 --- a/apt-pkg/pkgcachegen.cc +++ b/apt-pkg/pkgcachegen.cc @@ -143,7 +143,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; LastDesc = &Desc->NextDesc, Desc++) + for ( ; Desc.end() == false; Desc++) if (MD5SumValue(Desc.md5()) == CurMd5 && Desc.LanguageCode() == List.DescriptionLanguage()) duplicate=true; -- cgit v1.2.3-70-g09d2 From f814fbf4f2c78e3b9ceeeaba3cb93ed0ebbc7943 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 28 Jan 2009 17:36:03 +0100 Subject: apt-pkg/deb/debsystem.cc: add missing i18n string --- apt-pkg/deb/debsystem.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apt-pkg/deb/debsystem.cc b/apt-pkg/deb/debsystem.cc index b882367b8..82464d998 100644 --- a/apt-pkg/deb/debsystem.cc +++ b/apt-pkg/deb/debsystem.cc @@ -97,7 +97,7 @@ bool debSystem::UnLock(bool NoErrors) return false; if (LockCount < 1) - return _error->Error("Not locked"); + return _error->Error(_("Not locked")); if (--LockCount == 0) { close(LockFD); -- 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(-) 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(-) 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 cb3cc4806c6585757377dfd54b7ce880ae1f99c7 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 3 Feb 2009 10:50:32 +0100 Subject: methods/https.cc: do not unlink partial files (thanks to robbiew) --- methods/https.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/methods/https.cc b/methods/https.cc index 98dfeefa1..7c743a424 100644 --- a/methods/https.cc +++ b/methods/https.cc @@ -248,7 +248,6 @@ bool HttpsMethod::Fetch(FetchItem *Itm) // cleanup if(success != 0) { - unlink(File->Name().c_str()); _error->Error("%s", curl_errorstr); Fail(); return true; -- 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(-) 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 d24ddc3008473562ca6dc8d9e6a2f2b790fbe5ce Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 3 Feb 2009 14:06:49 +0100 Subject: apt-pkg/pkgcache.cc: fix typo --- apt-pkg/pkgcache.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc index 385d247ea..4fbf42c4b 100644 --- a/apt-pkg/pkgcache.cc +++ b/apt-pkg/pkgcache.cc @@ -274,7 +274,7 @@ pkgCache::PkgIterator::OkState pkgCache::PkgIterator::State() const return NeedsUnpack; if (Pkg->CurrentState == pkgCache::State::UnPacked || - Pkg->CurrentState == pkgCache::State::HalfConfigured) || + 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 -- 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(-) 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 51f07d3215a814cba98ed90f2ee4900ba2ba5780 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 6 Mar 2009 09:56:30 +0100 Subject: * apt-pkg/deb/dpkgpm.cc: - revert the change by Kees again for the amd64 ALL-CAPS problem --- apt-pkg/deb/dpkgpm.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index 686cbc6ee..1d45e70e9 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -782,16 +782,14 @@ bool pkgDPkgPM::Go(int OutStatusFd) sighandler_t old_SIGHUP = signal(SIGHUP,SIG_IGN); struct termios tt; - struct termios tt_out; struct winsize win; int master; int slave; // FIXME: setup sensible signal handling (*ick*) tcgetattr(0, &tt); - tcgetattr(1, &tt_out); ioctl(0, TIOCGWINSZ, (char *)&win); - if (openpty(&master, &slave, NULL, &tt_out, &win) < 0) + if (openpty(&master, &slave, NULL, &tt, &win) < 0) { const char *s = _("Can not write log, openpty() " "failed (/dev/pts not mounted?)\n"); -- 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(-) 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 c53cb75d7405f2def6751c3bfc5ca0418287a169 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 9 Mar 2009 16:18:38 +0100 Subject: cmdline/apt-get.cc: fix typo --- cmdline/apt-get.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 1c2c11689..27e16d3f3 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1298,7 +1298,7 @@ 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(), MarchSrcOnly)) != 0) + while ((Parse = SrcRecs.Find(Src.c_str(), MatchSrcOnly)) != 0) { string Ver = Parse->Version(); -- cgit v1.2.3-70-g09d2 From 12ea996c64f8085474f5fcbed909e4d2cb7ae798 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 19 Mar 2009 16:01:36 +0100 Subject: make it bzr-buildpackage able --- .bzr-builddeb/default.conf | 5 +++++ .bzr-builddeb/default.conf.orig | 2 ++ pre-build.sh | 3 +++ 3 files changed, 10 insertions(+) create mode 100644 .bzr-builddeb/default.conf create mode 100644 .bzr-builddeb/default.conf.orig create mode 100644 pre-build.sh diff --git a/.bzr-builddeb/default.conf b/.bzr-builddeb/default.conf new file mode 100644 index 000000000..f2c082569 --- /dev/null +++ b/.bzr-builddeb/default.conf @@ -0,0 +1,5 @@ +[BUILDDEB] +native = true + +[HOOKS] +pre-build=./pre-build.sh diff --git a/.bzr-builddeb/default.conf.orig b/.bzr-builddeb/default.conf.orig new file mode 100644 index 000000000..9c55498ce --- /dev/null +++ b/.bzr-builddeb/default.conf.orig @@ -0,0 +1,2 @@ +[BUILDDEB] +native = true diff --git a/pre-build.sh b/pre-build.sh new file mode 100644 index 000000000..2c7d28c2c --- /dev/null +++ b/pre-build.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +make -f Makefile startup doc -- cgit v1.2.3-70-g09d2 From 75eb9d3b51f2d6742b0f71fc2bf90a59c6bc0356 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 19 Mar 2009 16:06:10 +0100 Subject: make pre-build.sh executable --- pre-build.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 pre-build.sh diff --git a/pre-build.sh b/pre-build.sh old mode 100644 new mode 100755 -- cgit v1.2.3-70-g09d2 From e2074725f98134e0ae7cc28928aea0dca8dca1b5 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 24 Mar 2009 14:38:07 +0100 Subject: ftparchive/cachedb.cc: compact() the database after c_del() --- ftparchive/cachedb.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/ftparchive/cachedb.cc b/ftparchive/cachedb.cc index 8de3a0b9e..ff9a92d32 100644 --- a/ftparchive/cachedb.cc +++ b/ftparchive/cachedb.cc @@ -463,6 +463,7 @@ bool CacheDB::Clean() Cursor->c_del(Cursor,0); } + Dbp->compact(Dbp, NULL, NULL, NULL, NULL, DB_FREE_SPACE, NULL); return true; } -- 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(-) 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(-) 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(-) 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(-) 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(-) 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(-) 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 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(-) 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(+) 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(-) 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 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(-) 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 599d6ad5ecb0f5876c391fef6db4171759911cf2 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 10 Jul 2009 17:21:11 +0200 Subject: apt-pkg/deb/dpkgpm.cc: remove dead code, add comment on problematic argument list split --- apt-pkg/deb/dpkgpm.cc | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index a8d08f500..416860f35 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -640,20 +640,12 @@ bool pkgDPkgPM::Go(int OutStatusFd) { {"unpacked",N_("Preparing to configure %s") }, {"half-configured", N_("Configuring %s") }, -#if 0 - {"triggers-awaited", N_("Processing triggers for %s") }, - {"triggers-pending", N_("Processing triggers for %s") }, -#endif { "installed", N_("Installed %s")}, {NULL, NULL} }, // Remove operation { {"half-configured", N_("Preparing for removal of %s")}, -#if 0 - {"triggers-awaited", N_("Preparing for removal of %s")}, - {"triggers-pending", N_("Preparing for removal of %s")}, -#endif {"half-installed", N_("Removing %s")}, {"config-files", N_("Removed %s")}, {NULL, NULL} @@ -690,10 +682,19 @@ bool pkgDPkgPM::Go(int OutStatusFd) for (vector::iterator I = List.begin(); I != List.end();) { vector::iterator J = I; - for (; J != List.end() && J->Op == I->Op; J++); + for (; J != List.end() && J->Op == I->Op; J++) + /* nothing */; // Generate the argument list const char *Args[MaxArgs + 50]; + + // Now check if we are within the MaxArgs limit + // + // this code below is problematic, because it may happen that + // the argument list is split in a way that A depends on B + // and they are in the same "--configure A B" run + // - with the split they may now be configured in different + // runs if (J - I > (signed)MaxArgs) J = I + MaxArgs; -- 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(+) 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