From 67073e88fc4654be702fe3b176e94b86a484a858 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 14 Jan 2005 10:27:14 +0000 Subject: * commented the ftp no_proxy unseting in methods/ftp.cc --- methods/ftp.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/methods/ftp.cc b/methods/ftp.cc index 00d3476c8..c115e165d 100644 --- a/methods/ftp.cc +++ b/methods/ftp.cc @@ -1098,8 +1098,10 @@ int main(int argc,const char *argv[]) char S[300]; snprintf(S,sizeof(S),"http_proxy=%s",getenv("ftp_proxy")); putenv(S); - //mvo: why should we unset no_proxy here? - //putenv("no_proxy="); + // mvo: because we switch from ftp to http we have to unset + // "no_proxy". otherwise the http method would try to + // get a ftp url using http (see #283718) + putenv("no_proxy="); // Run the http method string Path = flNotFile(argv[0]) + "http"; -- cgit v1.2.3 From ad6a45d86c537a08dfe3b165043f981530d32f94 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 8 Feb 2005 16:56:22 +0000 Subject: * added support for "Acquire::gpgv::options" in methods/gpgv.cc --- methods/gpgv.cc | 40 +++++++++++++++++++++++++++++++++++----- po/apt-all.pot | 4 ++-- 2 files changed, 37 insertions(+), 7 deletions(-) diff --git a/methods/gpgv.cc b/methods/gpgv.cc index b34ea8d85..79705fe5e 100644 --- a/methods/gpgv.cc +++ b/methods/gpgv.cc @@ -68,11 +68,42 @@ const char *GPGVMethod::VerifyGetSigners(const char *file, const char *outfile, } else if (pid == 0) { + const char *Args[400]; + unsigned int i = 0; + + Args[i++] = gpgvpath.c_str(); + Args[i++] = "--status-fd"; + Args[i++] = "3"; + Args[i++] = "--keyring"; + Args[i++] = pubringpath.c_str(); + + Configuration::Item const *Opts; + Opts = _config->Tree("Acquire::gpgv::Options"); + if (Opts != 0) + { + Opts = Opts->Child; + for (; Opts != 0; Opts = Opts->Next) + { + if (Opts->Value.empty() == true) + continue; + Args[i++] = Opts->Value.c_str(); + if(i >= 395) { + std::cerr << "E: Argument list from Acquire::gpgv::Options too long. Exiting." << std::endl; + exit(111); + } + } + } + Args[i++] = file; + Args[i++] = outfile; + Args[i++] = NULL; + if (_config->FindB("Debug::Acquire::gpgv", false)) { - std::cerr << "Preparing to exec: " << gpgvpath - << " --status-fd 3 --keyring " << pubringpath - << " " << file << " " << outfile << std::endl; + std::cerr << "Preparing to exec: " << gpgvpath; + int j; + for(j=0;Args[j] != NULL; j++) + std::cerr << Args[j] << " "; + std::cerr << std::endl; } int nullfd = open("/dev/null", O_RDONLY); close(fd[0]); @@ -85,8 +116,7 @@ const char *GPGVMethod::VerifyGetSigners(const char *file, const char *outfile, putenv("LANG="); putenv("LC_ALL="); putenv("LC_MESSAGES="); - execlp(gpgvpath.c_str(), gpgvpath.c_str(), "--status-fd", "3", "--keyring", - pubringpath.c_str(), file, outfile, NULL); + execvp(gpgvpath.c_str(), (char **)Args); exit(111); } diff --git a/po/apt-all.pot b/po/apt-all.pot index c91fca021..d40d44701 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: 2005-01-26 18:00+0100\n" +"POT-Creation-Date: 2005-02-08 16:58+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -146,7 +146,7 @@ msgstr "" msgid " %4i %s\n" msgstr "" -#: cmdline/apt-cache.cc:1651 cmdline/apt-cdrom.cc:353 cmdline/apt-config.cc:70 +#: cmdline/apt-cache.cc:1651 cmdline/apt-cdrom.cc:138 cmdline/apt-config.cc:70 #: cmdline/apt-extracttemplates.cc:225 ftparchive/apt-ftparchive.cc:545 #: cmdline/apt-get.cc:2313 cmdline/apt-sortpkgs.cc:144 #, c-format -- cgit v1.2.3 -- cgit v1.2.3 From ec048f63365407f01766ef218165280cee805f1a Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 8 Feb 2005 16:59:19 +0000 Subject: * slightly cosmetic change in methods/gpgv.cc --- methods/gpgv.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/methods/gpgv.cc b/methods/gpgv.cc index 79705fe5e..f7d16ef01 100644 --- a/methods/gpgv.cc +++ b/methods/gpgv.cc @@ -100,8 +100,7 @@ const char *GPGVMethod::VerifyGetSigners(const char *file, const char *outfile, if (_config->FindB("Debug::Acquire::gpgv", false)) { std::cerr << "Preparing to exec: " << gpgvpath; - int j; - for(j=0;Args[j] != NULL; j++) + for(unsigned int j=0;Args[j] != NULL; j++) std::cerr << Args[j] << " "; std::cerr << std::endl; } -- cgit v1.2.3 From 82b47aa557c4a137c6a7ed9bfc18bcc6124bf9f9 Mon Sep 17 00:00:00 2001 From: Matt Zimmerman Date: Wed, 9 Feb 2005 03:40:37 +0000 Subject: Open 0.6.32 --- configure.in | 2 +- debian/changelog | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/configure.in b/configure.in index 6b57dec27..8c2fcbae6 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.6.31") +AC_DEFINE_UNQUOTED(VERSION,"0.6.32") PACKAGE="apt" AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE") AC_SUBST(PACKAGE) diff --git a/debian/changelog b/debian/changelog index c384c399d..19d5bcd1f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +apt (0.6.32) hoary; urgency=low + + * + + -- Matt Zimmerman Tue, 8 Feb 2005 19:31:15 -0800 + apt (0.6.31) hoary; urgency=low * Matt Zimmerman -- cgit v1.2.3 From af45f087e2a08534d1df8ec481d2688d0fbafe7b Mon Sep 17 00:00:00 2001 From: Matt Zimmerman Date: Wed, 9 Feb 2005 03:43:33 +0000 Subject: Add missing whitespace in new Debug::Acquire::gpgv output --- methods/gpgv.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/methods/gpgv.cc b/methods/gpgv.cc index f7d16ef01..40c072b2b 100644 --- a/methods/gpgv.cc +++ b/methods/gpgv.cc @@ -101,7 +101,7 @@ const char *GPGVMethod::VerifyGetSigners(const char *file, const char *outfile, { std::cerr << "Preparing to exec: " << gpgvpath; for(unsigned int j=0;Args[j] != NULL; j++) - std::cerr << Args[j] << " "; + std::cerr << " " << Args[j]; std::cerr << std::endl; } int nullfd = open("/dev/null", O_RDONLY); -- cgit v1.2.3 From e75f306ea9596c82e3b0c188e9b5203fc9d619da Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 9 Feb 2005 12:12:46 +0000 Subject: * added gpgv::Options to configure-index --- doc/examples/configure-index | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/examples/configure-index b/doc/examples/configure-index index c834c49d5..3538deebd 100644 --- a/doc/examples/configure-index +++ b/doc/examples/configure-index @@ -142,6 +142,11 @@ Acquire UMount "sleep 500"; } }; + + gpgv + { + Options {"--ignore-time-conflict";} // not very usefull on a normal system + }; }; // Directory layout -- cgit v1.2.3 From 1c5f7e5fc5c0377718d203e78d4af164ee3e60f8 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 10 Feb 2005 23:23:23 +0000 Subject: * PulseIntervall can be configured now to make frontends like synaptic hayppy. it's done in a way that does not break binary compatibility --- apt-pkg/acquire.cc | 6 +++--- apt-pkg/acquire.h | 3 ++- po/apt-all.pot | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc index 3c207fd27..70dce4f54 100644 --- a/apt-pkg/acquire.cc +++ b/apt-pkg/acquire.cc @@ -312,7 +312,7 @@ void pkgAcquire::RunFds(fd_set *RSet,fd_set *WSet) /* This runs the queues. It manages a select loop for all of the Worker tasks. The workers interact with the queues and items to manage the actual fetch. */ -pkgAcquire::RunResult pkgAcquire::Run() +pkgAcquire::RunResult pkgAcquire::Run(int PulseIntervall) { Running = true; @@ -327,7 +327,7 @@ pkgAcquire::RunResult pkgAcquire::Run() // Run till all things have been acquired struct timeval tv; tv.tv_sec = 0; - tv.tv_usec = 500000; + tv.tv_usec = PulseIntervall; while (ToFetch > 0) { fd_set RFds; @@ -357,7 +357,7 @@ pkgAcquire::RunResult pkgAcquire::Run() // Timeout, notify the log class if (Res == 0 || (Log != 0 && Log->Update == true)) { - tv.tv_usec = 500000; + tv.tv_usec = PulseIntervall; for (Worker *I = Workers; I != 0; I = I->NextAcquire) I->Pulse(); if (Log != 0 && Log->Pulse(this) == false) diff --git a/apt-pkg/acquire.h b/apt-pkg/acquire.h index 65c53a953..3e338b220 100644 --- a/apt-pkg/acquire.h +++ b/apt-pkg/acquire.h @@ -100,7 +100,8 @@ class pkgAcquire enum RunResult {Continue,Failed,Cancelled}; - RunResult Run(); + RunResult Run() { return Run(500000); }; // Binary compatibility + RunResult Run(int PulseIntervall); void Shutdown(); // Simple iteration mechanism diff --git a/po/apt-all.pot b/po/apt-all.pot index 4fbd34e4e..23a0ad16c 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: 2005-02-09 12:51+0100\n" +"POT-Creation-Date: 2005-02-11 00:08+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" -- cgit v1.2.3 From 2aab5956ebcaec3aa6c71f069a202366c872bb87 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 25 Feb 2005 13:26:58 +0000 Subject: * fix for apt-get update removing the cdroms Release.gpg files --- apt-pkg/acquire-item.cc | 12 +----------- methods/cdrom.cc | 2 +- po/apt-all.pot | 2 +- 3 files changed, 3 insertions(+), 13 deletions(-) diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index de8cfe8f2..714edd8d8 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -350,18 +350,8 @@ pkgAcqMetaSig::pkgAcqMetaSig(pkgAcquire *Owner, /* The only header we use is the last-modified header. */ string pkgAcqMetaSig::Custom600Headers() { - // mvo: we don't really need the last-modified header here - // 1) it points to "Final" and that was renamed to "DestFile" - // so it's never send anyway - // 2) because DestFIle is in partial/ we will send a partial request - // with if-range in the http method (or the equivalent for ftp). - // that should give the same result - - string Final = _config->FindDir("Dir::State::lists"); - Final += URItoFileName(RealURI); - struct stat Buf; - if (stat(Final.c_str(),&Buf) != 0) + if (stat(DestFile.c_str(),&Buf) != 0) return "\nIndex-File: true"; return "\nIndex-File: true\nLast-Modified: " + TimeRFC1123(Buf.st_mtime); diff --git a/methods/cdrom.cc b/methods/cdrom.cc index d5987dc45..d8bb9522e 100644 --- a/methods/cdrom.cc +++ b/methods/cdrom.cc @@ -97,7 +97,7 @@ bool CDROMMethod::Fetch(FetchItem *Itm) { Res.LastModified = Itm->LastModified; Res.IMSHit = true; - Res.Filename = File; + Res.Filename = Itm->DestFile; URIDone(Res); return true; } diff --git a/po/apt-all.pot b/po/apt-all.pot index 23a0ad16c..d40d44701 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: 2005-02-11 00:08+0100\n" +"POT-Creation-Date: 2005-02-08 16:58+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" -- cgit v1.2.3 From 872b3d3983839d2d9f14268c5adf976a72ecc5ad Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 25 Feb 2005 22:59:38 +0000 Subject: * path scoring changed, the non-symlink path is scored highest --- apt-pkg/cdrom.cc | 17 +++++++++++++++++ po/apt-all.pot | 42 +++++++++++++++++++++--------------------- 2 files changed, 38 insertions(+), 21 deletions(-) diff --git a/apt-pkg/cdrom.cc b/apt-pkg/cdrom.cc index a91fc7181..1b9e98519 100644 --- a/apt-pkg/cdrom.cc +++ b/apt-pkg/cdrom.cc @@ -169,6 +169,23 @@ int pkgCdrom::Score(string Path) Res += 10; if (Path.find("/debian/") != string::npos) Res -= 10; + + // check for symlinks in the patch leading to the actual file + // a symlink gets a big penalty + struct stat Buf; + string statPath = flNotFile(Path); + string cdromPath = _config->FindDir("Acquire::cdrom::mount","/cdrom/"); + while(statPath != cdromPath && statPath != "./") { + statPath.resize(statPath.size()-1); // remove the trailing '/' + if (lstat(statPath.c_str(),&Buf) == 0) { + if(S_ISLNK(Buf.st_mode)) { + Res -= 60; + break; + } + } + statPath = flNotFile(statPath); // descent + } + return Res; } diff --git a/po/apt-all.pot b/po/apt-all.pot index d40d44701..45ea52b09 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: 2005-02-08 16:58+0100\n" +"POT-Creation-Date: 2005-02-25 14:16+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -2259,31 +2259,31 @@ msgstr "" msgid "rename failed, %s (%s -> %s)." msgstr "" -#: apt-pkg/acquire-item.cc:235 apt-pkg/acquire-item.cc:904 +#: apt-pkg/acquire-item.cc:235 apt-pkg/acquire-item.cc:894 msgid "MD5Sum mismatch" msgstr "" -#: apt-pkg/acquire-item.cc:718 +#: apt-pkg/acquire-item.cc:708 #, c-format msgid "" "I wasn't able to locate a file for the %s package. This might mean you need " "to manually fix this package. (due to missing arch)" msgstr "" -#: apt-pkg/acquire-item.cc:771 +#: apt-pkg/acquire-item.cc:761 #, c-format msgid "" "I wasn't able to locate file for the %s package. This might mean you need to " "manually fix this package." msgstr "" -#: apt-pkg/acquire-item.cc:807 +#: apt-pkg/acquire-item.cc:797 #, c-format msgid "" "The package index files are corrupted. No Filename: field for package %s." msgstr "" -#: apt-pkg/acquire-item.cc:894 +#: apt-pkg/acquire-item.cc:884 msgid "Size mismatch" msgstr "" @@ -2292,73 +2292,73 @@ msgstr "" msgid "Vendor block %s contains no fingerprint" msgstr "" -#: apt-pkg/cdrom.cc:487 +#: apt-pkg/cdrom.cc:503 #, c-format msgid "" "Using CD-ROM mount point %s\n" "Mounting CD-ROM\n" msgstr "" -#: apt-pkg/cdrom.cc:496 apt-pkg/cdrom.cc:578 +#: apt-pkg/cdrom.cc:512 apt-pkg/cdrom.cc:594 msgid "Identifying.. " msgstr "" -#: apt-pkg/cdrom.cc:521 +#: apt-pkg/cdrom.cc:537 #, c-format msgid "Stored Label: %s \n" msgstr "" -#: apt-pkg/cdrom.cc:541 +#: apt-pkg/cdrom.cc:557 #, c-format msgid "Using CD-ROM mount point %s\n" msgstr "" -#: apt-pkg/cdrom.cc:559 +#: apt-pkg/cdrom.cc:575 msgid "Unmounting CD-ROM\n" msgstr "" -#: apt-pkg/cdrom.cc:563 +#: apt-pkg/cdrom.cc:579 msgid "Waiting for disc...\n" msgstr "" #. Mount the new CDROM -#: apt-pkg/cdrom.cc:571 +#: apt-pkg/cdrom.cc:587 msgid "Mounting CD-ROM...\n" msgstr "" -#: apt-pkg/cdrom.cc:589 +#: apt-pkg/cdrom.cc:605 msgid "Scanning Disc for index files..\n" msgstr "" -#: apt-pkg/cdrom.cc:627 +#: apt-pkg/cdrom.cc:643 #, c-format msgid "Found %i package indexes, %i source indexes and %i signatures\n" msgstr "" -#: apt-pkg/cdrom.cc:684 +#: apt-pkg/cdrom.cc:700 msgid "That is not a valid name, try again.\n" msgstr "" -#: apt-pkg/cdrom.cc:700 +#: apt-pkg/cdrom.cc:716 #, c-format msgid "" "This Disc is called: \n" "'%s'\n" msgstr "" -#: apt-pkg/cdrom.cc:704 +#: apt-pkg/cdrom.cc:720 msgid "Copying package lists..." msgstr "" -#: apt-pkg/cdrom.cc:728 +#: apt-pkg/cdrom.cc:744 msgid "Writing new source list\n" msgstr "" -#: apt-pkg/cdrom.cc:737 +#: apt-pkg/cdrom.cc:753 msgid "Source List entries for this Disc are:\n" msgstr "" -#: apt-pkg/cdrom.cc:771 +#: apt-pkg/cdrom.cc:787 msgid "Unmounting CD-ROM..." msgstr "" -- cgit v1.2.3 From 166662ee2dc53d3c25b0d690d2fef755f0d4e6a0 Mon Sep 17 00:00:00 2001 From: Matt Zimmerman Date: Sat, 5 Mar 2005 00:13:03 +0000 Subject: Open 0.6.34 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 9e0ac04e2..d1d59c622 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +apt (0.6.34) hoary; urgency=low + + * + + -- Matt Zimmerman Fri, 4 Mar 2005 16:12:43 -0800 + apt (0.6.33) hoary; urgency=low * Merge michael.vogt@ubuntu.com--2005/apt--mvo--0 (through patch-6) -- cgit v1.2.3 From 2a065e4e96b1cf7bf6b0ad90e4b3cbaa6656f625 Mon Sep 17 00:00:00 2001 From: Matt Zimmerman Date: Sat, 5 Mar 2005 00:13:59 +0000 Subject: Add missing semicolon in configure-index (Debian #295773) --- debian/changelog | 6 +++--- doc/examples/configure-index | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index d1d59c622..ceb3c8bac 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,8 @@ -apt (0.6.34) hoary; urgency=low +apt (0.6.34) UNRELEASED; urgency=low - * + * Add missing semicolon to configure-index (Closes: #295773) - -- Matt Zimmerman Fri, 4 Mar 2005 16:12:43 -0800 + -- Matt Zimmerman Fri, 4 Mar 2005 16:13:15 -0800 apt (0.6.33) hoary; urgency=low diff --git a/doc/examples/configure-index b/doc/examples/configure-index index 3538deebd..a09ea0c37 100644 --- a/doc/examples/configure-index +++ b/doc/examples/configure-index @@ -184,7 +184,7 @@ Dir "/" gpg "/usr/bin/gpgv"; dpkg "/usr/bin/dpkg"; dpkg-source "/usr/bin/dpkg-source"; - dpkg-buildpackage "/usr/bin/dpkg-buildpackage" + dpkg-buildpackage "/usr/bin/dpkg-buildpackage"; apt-get "/usr/bin/apt-get"; apt-cache "/usr/bin/apt-cache"; }; -- cgit v1.2.3 From c8b944492073b938395fd890dfa8ed1e4b55fab4 Mon Sep 17 00:00:00 2001 From: Matt Zimmerman Date: Sat, 5 Mar 2005 00:25:03 +0000 Subject: Update build-depends on gettext to 0.12 --- debian/changelog | 1 + debian/control | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index ceb3c8bac..70aa27365 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ apt (0.6.34) UNRELEASED; urgency=low * Add missing semicolon to configure-index (Closes: #295773) + * Update build-depends on gettext to 0.12 (Closes: #295077) -- Matt Zimmerman Fri, 4 Mar 2005 16:13:15 -0800 diff --git a/debian/control b/debian/control index 54d4e4caa..b7c430997 100644 --- a/debian/control +++ b/debian/control @@ -4,7 +4,7 @@ Priority: important Maintainer: APT Development Team Uploaders: Jason Gunthorpe , Adam Heath , Matt Zimmerman Standards-Version: 3.6.1 -Build-Depends: debhelper (>= 4.1.62), libdb4.2-dev, gettext (>= 0.11.5) +Build-Depends: debhelper (>= 4.1.62), libdb4.2-dev, gettext (>= 0.12) Build-Depends-Indep: debiandoc-sgml, docbook-utils (>= 0.6.12-1) Package: apt -- cgit v1.2.3