diff options
-rw-r--r-- | debian/changelog | 3 | ||||
-rw-r--r-- | methods/gpgv.cc | 39 | ||||
-rw-r--r-- | po/apt-all.pot | 4 |
3 files changed, 38 insertions, 8 deletions
diff --git a/debian/changelog b/debian/changelog index 19d5bcd1f..372086178 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ apt (0.6.32) hoary; urgency=low - * + * Merge michael.vogt@ubuntu.com--2005/apt--mvo--0 (patch-1) + - Implement Acquire::gpgv::options (Ubuntu bug#6283) -- Matt Zimmerman <mdz@ubuntu.com> Tue, 8 Feb 2005 19:31:15 -0800 diff --git a/methods/gpgv.cc b/methods/gpgv.cc index b34ea8d85..f7d16ef01 100644 --- a/methods/gpgv.cc +++ b/methods/gpgv.cc @@ -68,11 +68,41 @@ 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; + for(unsigned int 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 +115,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 <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\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 |