Przeglądaj źródła

* merged from mainline

Michael Vogt 20 lat temu
rodzic
commit
cfde4904a7

+ 1 - 1
apt-inst/deb/dpkgdb.cc

@@ -383,7 +383,7 @@ bool debDpkgDB::ReadyFileList(OpProgress &Progress)
       return _error->Error(_("The pkg cache must be initialized first"));
       return _error->Error(_("The pkg cache must be initialized first"));
    if (FList != 0)
    if (FList != 0)
    {
    {
-      Progress.OverallProgress(1,1,1,_("Reading file list"));
+      Progress.OverallProgress(1,1,1,_("Reading file listing"));
       return true;
       return true;
    }
    }
    
    

+ 9 - 8
buildlib/defaults.mak

@@ -174,11 +174,12 @@ ifeq ($(NUM_PROCS),1)
   PARALLEL_RUN=no
   PARALLEL_RUN=no
 endif
 endif
 
 
-ifndef PARALLEL_RUN
- PARALLEL_RUN=yes
- .EXPORT: PARALLEL_RUN
- # handle recursion
- ifneq ($(NUM_PROCS),)
-  MAKEFLAGS += -j $(NUM_PROCS)
- endif
-endif
+# mvo: commented out, lead to build failures in the arch-build target
+#ifndef PARALLEL_RUN
+# PARALLEL_RUN=yes
+# .EXPORT: PARALLEL_RUN
+# # handle recursion
+# ifneq ($(NUM_PROCS),)
+#  MAKEFLAGS += -j $(NUM_PROCS)
+# endif
+#endif

+ 11 - 2
debian/changelog

@@ -18,8 +18,17 @@ apt (0.6.44) unstable; urgency=low
   * doc/apt-ftparchive.1.xml:
   * doc/apt-ftparchive.1.xml:
     - fix documentation for "SrcPackages" -> "Sources" 
     - fix documentation for "SrcPackages" -> "Sources" 
       (thanks to Bart Martens for the patch, closes: #307756)
       (thanks to Bart Martens for the patch, closes: #307756)
-
- -- Michael Vogt <mvo@debian.org>  Sun,  2 Apr 2006 16:41:54 +0200
+  * debian/libapt-pkg-doc.doc-base.cache:
+    - remove broken charackter from description (closes: #361129)
+  * apt-inst/deb/dpkgdb.cc, methods/gpgv.cc: 
+    - i18n fixes (closes: #349298)
+  * debian/postinst: dont fail on not available
+    /usr/share/doc/apt/examples/sources.list (closes: #361130)
+  * methods/ftp.cc:
+    - unlink empty file in partial if the download failed because
+      the file is missing on the server (closes: #316337)
+  
+ -- Michael Vogt <mvo@debian.org>  Mon,  8 May 2006 18:41:04 +0200
 
 
 apt (0.6.43.3) unstable; urgency=low
 apt (0.6.43.3) unstable; urgency=low
 
 

+ 1 - 1
debian/libapt-pkg-doc.doc-base.cache

@@ -4,7 +4,7 @@ Author: Jason Gunthorpe
 Abstract: The APT Cache Specification describes the complete implementation
 Abstract: The APT Cache Specification describes the complete implementation
  and format of the APT Cache file. The APT Cache file is a way for APT to
  and format of the APT Cache file. The APT Cache file is a way for APT to
  parse and store a large number of package files for display in the UI.
  parse and store a large number of package files for display in the UI.
- It's primaryã design goal is to make display of a single package in the
+ It's primary design goal is to make display of a single package in the
  tree very fast by pre-linking important things like dependencies and
  tree very fast by pre-linking important things like dependencies and
  provides. The specification doubles as documentation for one of the
  provides. The specification doubles as documentation for one of the
  in-memory structures used by the package library and the APT GUI.
  in-memory structures used by the package library and the APT GUI.

+ 4 - 1
debian/postinst

@@ -12,7 +12,10 @@ set -e
 
 
 create_apt_conf ()
 create_apt_conf ()
 {
 {
- cp /usr/share/doc/apt/examples/sources.list /etc/apt/sources.list
+ EXAMPLE_SOURCE=/usr/share/doc/apt/examples/sources.list
+ if [ -f $EXAMPLE_SOURCE ]; then
+     cp $EXAMPLE_SOURCE /etc/apt/sources.list
+ fi
 }
 }
  
  
 check_apt_conf ()
 check_apt_conf ()

+ 5 - 2
methods/ftp.cc

@@ -1055,9 +1055,12 @@ bool FtpMethod::Fetch(FetchItem *Itm)
 	 UBuf.modtime = FailTime;
 	 UBuf.modtime = FailTime;
 	 utime(FailFile.c_str(),&UBuf);
 	 utime(FailFile.c_str(),&UBuf);
 	 
 	 
-	 // If the file is missing we hard fail otherwise transient fail
-	 if (Missing == true)
+	 // If the file is missing we hard fail and delete the destfile
+	 // otherwise transient fail
+	 if (Missing == true) {
+	    unlink(FailFile.c_str());
 	    return false;
 	    return false;
+	 }
 	 Fail(true);
 	 Fail(true);
 	 return true;
 	 return true;
       }
       }

+ 18 - 12
methods/gpgv.cc

@@ -11,6 +11,7 @@
 #include <errno.h>
 #include <errno.h>
 #include <sys/wait.h>
 #include <sys/wait.h>
 #include <iostream>
 #include <iostream>
+#include <sstream>
 
 
 #define GNUPGPREFIX "[GNUPG:]"
 #define GNUPGPREFIX "[GNUPG:]"
 #define GNUPGBADSIG "[GNUPG:] BADSIG"
 #define GNUPGBADSIG "[GNUPG:] BADSIG"
@@ -20,7 +21,7 @@
 class GPGVMethod : public pkgAcqMethod
 class GPGVMethod : public pkgAcqMethod
 {
 {
    private:
    private:
-   const char *VerifyGetSigners(const char *file, const char *outfile,
+   string VerifyGetSigners(const char *file, const char *outfile,
 				vector<string> &GoodSigners, vector<string> &BadSigners,
 				vector<string> &GoodSigners, vector<string> &BadSigners,
 				vector<string> &NoPubKeySigners);
 				vector<string> &NoPubKeySigners);
    
    
@@ -32,11 +33,15 @@ class GPGVMethod : public pkgAcqMethod
    GPGVMethod() : pkgAcqMethod("1.0",SingleInstance | SendConfig) {};
    GPGVMethod() : pkgAcqMethod("1.0",SingleInstance | SendConfig) {};
 };
 };
 
 
-const char *GPGVMethod::VerifyGetSigners(const char *file, const char *outfile,
+string GPGVMethod::VerifyGetSigners(const char *file, const char *outfile,
 					 vector<string> &GoodSigners,
 					 vector<string> &GoodSigners,
 					 vector<string> &BadSigners,
 					 vector<string> &BadSigners,
 					 vector<string> &NoPubKeySigners)
 					 vector<string> &NoPubKeySigners)
 {
 {
+   // setup a (empty) stringstream for formating the return value
+   std::stringstream ret;
+   ret.str("");
+
    if (_config->FindB("Debug::Acquire::gpgv", false))
    if (_config->FindB("Debug::Acquire::gpgv", false))
    {
    {
       std::cerr << "inside VerifyGetSigners" << std::endl;
       std::cerr << "inside VerifyGetSigners" << std::endl;
@@ -54,9 +59,11 @@ const char *GPGVMethod::VerifyGetSigners(const char *file, const char *outfile,
       std::cerr << "Keyring path: " << pubringpath << std::endl;
       std::cerr << "Keyring path: " << pubringpath << std::endl;
    }
    }
 
 
-   if (stat(pubringpath.c_str(), &buff) != 0)
-      return (string("Couldn't access keyring: ") + strerror(errno)).c_str();
-
+   if (stat(pubringpath.c_str(), &buff) != 0) 
+   {
+      ioprintf(ret, _("Couldn't access keyring: '%s'"), strerror(errno)); 
+      return ret.str();
+   }
    if (pipe(fd) < 0)
    if (pipe(fd) < 0)
    {
    {
       return "Couldn't create pipe";
       return "Couldn't create pipe";
@@ -65,7 +72,7 @@ const char *GPGVMethod::VerifyGetSigners(const char *file, const char *outfile,
    pid = fork();
    pid = fork();
    if (pid < 0)
    if (pid < 0)
    {
    {
-      return (string("Couldn't spawn new process") + strerror(errno)).c_str();
+      return string("Couldn't spawn new process") + strerror(errno);
    }
    }
    else if (pid == 0)
    else if (pid == 0)
    {
    {
@@ -189,7 +196,7 @@ const char *GPGVMethod::VerifyGetSigners(const char *file, const char *outfile,
    {
    {
       if (GoodSigners.empty())
       if (GoodSigners.empty())
          return _("Internal error: Good signature, but could not determine key fingerprint?!");
          return _("Internal error: Good signature, but could not determine key fingerprint?!");
-      return NULL;
+      return "";
    }
    }
    else if (WEXITSTATUS(status) == 1)
    else if (WEXITSTATUS(status) == 1)
    {
    {
@@ -197,9 +204,8 @@ const char *GPGVMethod::VerifyGetSigners(const char *file, const char *outfile,
    }
    }
    else if (WEXITSTATUS(status) == 111)
    else if (WEXITSTATUS(status) == 111)
    {
    {
-      // FIXME String concatenation considered harmful.
-      return (string(_("Could not execute ")) + gpgvpath +
-	      string(_(" to verify signature (is gnupg installed?)"))).c_str();
+      ioprintf(ret, _("Could not execute '%s' to verify signature (is gnupg installed?)"), gpgvpath.c_str());
+      return ret.str();
    }
    }
    else
    else
    {
    {
@@ -221,8 +227,8 @@ bool GPGVMethod::Fetch(FetchItem *Itm)
    URIStart(Res);
    URIStart(Res);
 
 
    // Run gpgv on file, extract contents and get the key ID of the signer
    // Run gpgv on file, extract contents and get the key ID of the signer
-   const char *msg = VerifyGetSigners(Path.c_str(), Itm->DestFile.c_str(),
-				      GoodSigners, BadSigners, NoPubKeySigners);
+   string msg = VerifyGetSigners(Path.c_str(), Itm->DestFile.c_str(),
+			      GoodSigners, BadSigners, NoPubKeySigners);
    if (GoodSigners.empty() || !BadSigners.empty() || !NoPubKeySigners.empty())
    if (GoodSigners.empty() || !BadSigners.empty() || !NoPubKeySigners.empty())
    {
    {
       string errmsg;
       string errmsg;

+ 22 - 25
po/apt-all.pot

@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-04-20 12:50+0200\n"
+"POT-Creation-Date: 2006-05-08 11:02+0200\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -417,7 +417,7 @@ msgid " DeLink limit of %sB hit.\n"
 msgstr ""
 msgstr ""
 
 
 #: ftparchive/writer.cc:358 apt-inst/extract.cc:181 apt-inst/extract.cc:193
 #: ftparchive/writer.cc:358 apt-inst/extract.cc:181 apt-inst/extract.cc:193
-#: apt-inst/extract.cc:210 apt-inst/deb/dpkgdb.cc:121 methods/gpgv.cc:260
+#: apt-inst/extract.cc:210 apt-inst/deb/dpkgdb.cc:121 methods/gpgv.cc:266
 #, c-format
 #, c-format
 msgid "Failed to stat %s"
 msgid "Failed to stat %s"
 msgstr ""
 msgstr ""
@@ -1365,7 +1365,7 @@ msgstr ""
 msgid "Internal error getting a package name"
 msgid "Internal error getting a package name"
 msgstr ""
 msgstr ""
 
 
-#: apt-inst/deb/dpkgdb.cc:205
+#: apt-inst/deb/dpkgdb.cc:205 apt-inst/deb/dpkgdb.cc:386
 msgid "Reading file listing"
 msgid "Reading file listing"
 msgstr ""
 msgstr ""
 
 
@@ -1409,10 +1409,6 @@ msgstr ""
 msgid "The pkg cache must be initialized first"
 msgid "The pkg cache must be initialized first"
 msgstr ""
 msgstr ""
 
 
-#: apt-inst/deb/dpkgdb.cc:386
-msgid "Reading file list"
-msgstr ""
-
 #: apt-inst/deb/dpkgdb.cc:443
 #: apt-inst/deb/dpkgdb.cc:443
 #, c-format
 #, c-format
 msgid "Failed to find a Package: header, offset %lu"
 msgid "Failed to find a Package: header, offset %lu"
@@ -1483,12 +1479,12 @@ msgstr ""
 msgid "File not found"
 msgid "File not found"
 msgstr ""
 msgstr ""
 
 
-#: methods/copy.cc:42 methods/gpgv.cc:269 methods/gzip.cc:133
+#: methods/copy.cc:42 methods/gpgv.cc:275 methods/gzip.cc:133
 #: methods/gzip.cc:142
 #: methods/gzip.cc:142
 msgid "Failed to stat"
 msgid "Failed to stat"
 msgstr ""
 msgstr ""
 
 
-#: methods/copy.cc:79 methods/gpgv.cc:266 methods/gzip.cc:139
+#: methods/copy.cc:79 methods/gpgv.cc:272 methods/gzip.cc:139
 msgid "Failed to set modification time"
 msgid "Failed to set modification time"
 msgstr ""
 msgstr ""
 
 
@@ -1637,7 +1633,7 @@ msgstr ""
 msgid "Query"
 msgid "Query"
 msgstr ""
 msgstr ""
 
 
-#: methods/ftp.cc:1106
+#: methods/ftp.cc:1109
 msgid "Unable to invoke "
 msgid "Unable to invoke "
 msgstr ""
 msgstr ""
 
 
@@ -1698,37 +1694,38 @@ msgstr ""
 msgid "Unable to connect to %s %s:"
 msgid "Unable to connect to %s %s:"
 msgstr ""
 msgstr ""
 
 
-#: methods/gpgv.cc:92
+#: methods/gpgv.cc:64
+#, c-format
+msgid "Couldn't access keyring: '%s'"
+msgstr ""
+
+#: methods/gpgv.cc:99
 msgid "E: Argument list from Acquire::gpgv::Options too long. Exiting."
 msgid "E: Argument list from Acquire::gpgv::Options too long. Exiting."
 msgstr ""
 msgstr ""
 
 
-#: methods/gpgv.cc:191
+#: methods/gpgv.cc:198
 msgid ""
 msgid ""
 "Internal error: Good signature, but could not determine key fingerprint?!"
 "Internal error: Good signature, but could not determine key fingerprint?!"
 msgstr ""
 msgstr ""
 
 
-#: methods/gpgv.cc:196
+#: methods/gpgv.cc:203
 msgid "At least one invalid signature was encountered."
 msgid "At least one invalid signature was encountered."
 msgstr ""
 msgstr ""
 
 
-#. FIXME String concatenation considered harmful.
-#: methods/gpgv.cc:201
-msgid "Could not execute "
-msgstr ""
-
-#: methods/gpgv.cc:202
-msgid " to verify signature (is gnupg installed?)"
+#: methods/gpgv.cc:207
+#, c-format
+msgid "Could not execute '%s' to verify signature (is gnupg installed?)"
 msgstr ""
 msgstr ""
 
 
-#: methods/gpgv.cc:206
+#: methods/gpgv.cc:212
 msgid "Unknown error executing gpgv"
 msgid "Unknown error executing gpgv"
 msgstr ""
 msgstr ""
 
 
-#: methods/gpgv.cc:237
+#: methods/gpgv.cc:243
 msgid "The following signatures were invalid:\n"
 msgid "The following signatures were invalid:\n"
 msgstr ""
 msgstr ""
 
 
-#: methods/gpgv.cc:244
+#: methods/gpgv.cc:250
 msgid ""
 msgid ""
 "The following signatures couldn't be verified because the public key is not "
 "The following signatures couldn't be verified because the public key is not "
 "available:\n"
 "available:\n"
@@ -2104,12 +2101,12 @@ msgstr ""
 msgid "Dependency generation"
 msgid "Dependency generation"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/tagfile.cc:73
+#: apt-pkg/tagfile.cc:72
 #, c-format
 #, c-format
 msgid "Unable to parse package file %s (1)"
 msgid "Unable to parse package file %s (1)"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/tagfile.cc:160
+#: apt-pkg/tagfile.cc:102
 #, c-format
 #, c-format
 msgid "Unable to parse package file %s (2)"
 msgid "Unable to parse package file %s (2)"
 msgstr ""
 msgstr ""