Просмотр исходного кода

merge with debian-sid release 0.8.15

David Kalnischkies лет назад: 15
Родитель
Сommit
a9d2fdce1f
25 измененных файлов с 4625 добавлено и 2697 удалено
  1. 48 0
      apt-pkg/acquire-item.cc
  2. 5 10
      apt-pkg/deb/debindexfile.cc
  3. 1 1
      apt-pkg/deb/deblistparser.cc
  4. 9 1
      apt-pkg/deb/dpkgpm.cc
  5. 6 0
      apt-pkg/orderlist.cc
  6. 3 0
      debian/apt.symbols
  7. 31 6
      debian/changelog
  8. 1 1
      doc/apt-cache.8.xml
  9. 3 2
      doc/apt-ftparchive.1.xml
  10. 1 1
      doc/apt-get.8.xml
  11. 3 3
      doc/apt.conf.5.xml
  12. 4 4
      doc/apt_preferences.5.xml
  13. 312 209
      doc/po/apt-doc.pot
  14. 598 402
      doc/po/de.po
  15. 467 237
      doc/po/es.po
  16. 492 235
      doc/po/fr.po
  17. 324 219
      doc/po/it.po
  18. 450 240
      doc/po/ja.po
  19. 456 234
      doc/po/pl.po
  20. 466 236
      doc/po/pt.po
  21. 336 221
      doc/po/pt_BR.po
  22. 17 2
      methods/mirror.cc
  23. 1 0
      methods/mirror.h
  24. 577 428
      po/ca.po
  25. 14 5
      po/it.po

+ 48 - 0
apt-pkg/acquire-item.cc

@@ -271,6 +271,14 @@ void pkgAcqSubIndex::Done(string Message,unsigned long Size,string Md5Hash,	/*{{
 
    string FinalFile = _config->FindDir("Dir::State::lists")+URItoFileName(Desc.URI);
 
+   /* Downloaded invalid transindex => Error (LP: #346386) (Closes: #627642) */
+   indexRecords SubIndexParser;
+   if (FileExists(DestFile) == true && !SubIndexParser.Load(DestFile)) {
+      Status = StatError;
+      ErrorText = SubIndexParser.ErrorText;
+      return;
+   }
+
    // sucess in downloading the index
    // rename the index
    if(Debug)
@@ -894,6 +902,30 @@ void pkgAcqIndex::Done(string Message,unsigned long Size,string Hash,
 	 ReportMirrorFailure("HashChecksumFailure");
          return;
       }
+
+      /* Verify the index file for correctness (all indexes must
+       * have a Package field) (LP: #346386) (Closes: #627642) */
+      {
+	 FileFd fd(DestFile, FileFd::ReadOnly);
+	 pkgTagSection sec;
+	 pkgTagFile tag(&fd);
+
+         // Only test for correctness if the file is not empty (empty is ok)
+         if (fd.Size() > 0) {
+            if (_error->PendingError() || !tag.Step(sec)) {
+               Status = StatError;
+               _error->DumpErrors();
+               Rename(DestFile,DestFile + ".FAILED");
+               return;
+            } else if (!sec.Exists("Package")) {
+               Status = StatError;
+               ErrorText = ("Encountered a section with no Package: header");
+               Rename(DestFile,DestFile + ".FAILED");
+               return;
+            }
+         }
+      }
+       
       // Done, move it into position
       string FinalFile = _config->FindDir("Dir::State::lists");
       FinalFile += URItoFileName(RealURI);
@@ -1330,6 +1362,16 @@ void pkgAcqMetaIndex::AuthDone(string Message)				/*{{{*/
 									/*}}}*/
 void pkgAcqMetaIndex::QueueIndexes(bool verify)				/*{{{*/
 {
+#if 0
+   /* Reject invalid, existing Release files (LP: #346386) (Closes: #627642)
+    * FIXME: Disabled; it breaks unsigned repositories without hashes */
+   if (!verify && FileExists(DestFile) && !MetaIndexParser->Load(DestFile))
+   {
+      Status = StatError;
+      ErrorText = MetaIndexParser->ErrorText;
+      return;
+   }
+#endif
    for (vector <struct IndexTarget*>::const_iterator Target = IndexTargets->begin();
         Target != IndexTargets->end();
         Target++)
@@ -1493,6 +1535,12 @@ void pkgAcqMetaIndex::Failed(string Message,pkgAcquire::MethodConfig *Cnf)
 			 LookupTag(Message,"Message").c_str());
 	 RunScripts("APT::Update::Auth-Failure");
 	 return;
+      } else if (LookupTag(Message,"Message").find("NODATA") != string::npos) {
+	 /* Invalid signature file, reject (LP: #346386) (Closes: #627642) */
+	 _error->Error(_("GPG error: %s: %s"),
+			 Desc.Description.c_str(),
+			 LookupTag(Message,"Message").c_str());
+	 return;
       } else {
 	 _error->Warning(_("GPG error: %s: %s"),
 			 Desc.Description.c_str(),

+ 5 - 10
apt-pkg/deb/debindexfile.cc

@@ -423,12 +423,10 @@ string debTranslationsIndex::IndexURI(const char *Type) const
 /* */
 bool debTranslationsIndex::GetIndexes(pkgAcquire *Owner) const
 {
-   if (TranslationsAvailable()) {
-     string const TranslationFile = string("Translation-").append(Language);
-     new pkgAcqIndexTrans(Owner, IndexURI(Language),
-			  Info(TranslationFile.c_str()),
-			  TranslationFile);
-   }
+   string const TranslationFile = string("Translation-").append(Language);
+   new pkgAcqIndexTrans(Owner, IndexURI(Language),
+                        Info(TranslationFile.c_str()),
+                        TranslationFile);
 
    return true;
 }
@@ -468,9 +466,6 @@ string debTranslationsIndex::Info(const char *Type) const
 									/*}}}*/
 bool debTranslationsIndex::HasPackages() const				/*{{{*/
 {
-   if(!TranslationsAvailable())
-      return false;
-   
    return FileExists(IndexFile(Language));
 }
 									/*}}}*/
@@ -510,7 +505,7 @@ bool debTranslationsIndex::Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const
 {
    // Check the translation file, if in use
    string TranslationFile = IndexFile(Language);
-   if (TranslationsAvailable() && FileExists(TranslationFile))
+   if (FileExists(TranslationFile))
    {
      FileFd Trans(TranslationFile,FileFd::ReadOnlyGzip);
      debListParser TransParser(&Trans);

+ 1 - 1
apt-pkg/deb/deblistparser.cc

@@ -201,7 +201,7 @@ string debListParser::DescriptionLanguage()
    if (Section.FindS("Description").empty() == false)
       return "";
 
-   std::vector<string> const lang = APT::Configuration::getLanguages();
+   std::vector<string> const lang = APT::Configuration::getLanguages(true);
    for (std::vector<string>::const_iterator l = lang.begin();
 	l != lang.end(); l++)
       if (Section.FindS(string("Description-").append(*l).c_str()).empty() == false)

+ 9 - 1
apt-pkg/deb/dpkgpm.cc

@@ -32,6 +32,8 @@
 #include <algorithm>
 #include <sstream>
 #include <map>
+#include <pwd.h>
+#include <grp.h>
 
 #include <termios.h>
 #include <unistd.h>
@@ -667,7 +669,13 @@ bool pkgDPkgPM::OpenLog()
 	 return _error->WarningE("OpenLog", _("Could not open file '%s'"), logfile_name.c_str());
       setvbuf(term_out, NULL, _IONBF, 0);
       SetCloseExec(fileno(term_out), true);
-      chmod(logfile_name.c_str(), 0600);
+      struct passwd *pw;
+      struct group *gr;
+      pw = getpwnam("root");
+      gr = getgrnam("adm");
+      if (pw != NULL && gr != NULL)
+	  chown(logfile_name.c_str(), pw->pw_uid, gr->gr_gid);
+      chmod(logfile_name.c_str(), 0644);
       fprintf(term_out, "\nLog started: %s\n", timestr);
    }
 

+ 6 - 0
apt-pkg/orderlist.cc

@@ -1073,6 +1073,12 @@ bool pkgOrderList::CheckDep(DepIterator D)
          just needs one */
       if (D.IsNegative() == false)
       {
+	 // ignore provides by older versions of this package
+	 if (((D.Reverse() == false && Pkg == D.ParentPkg()) ||
+	      (D.Reverse() == true && Pkg == D.TargetPkg())) &&
+	     Cache[Pkg].InstallVer != *I)
+	    continue;
+
 	 /* Try to find something that does not have the after flag set
 	    if at all possible */
 	 if (IsFlag(Pkg,After) == true)

+ 3 - 0
debian/apt.symbols

@@ -1318,3 +1318,6 @@ libapt-pkg.so.4.10 libapt-pkg4.10
  (c++|optional=private)"debListParser::NewProvidesAllArch(pkgCache::VerIterator&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0.8.13.2 1
  (c++|optional=private)"PrintMode(char)@Base" 0.8.13.2 1
  (c++)"pkgDepCache::IsModeChangeOk(pkgDepCache::ModeList, pkgCache::PkgIterator const&, unsigned long, bool)@Base" 0.8.13.2 1
+ (c++)"pkgPackageManager::SmartUnPack(pkgCache::PkgIterator, bool)@Base" 0.8.15~exp1 1
+ (c++)"pkgAcqMethod::PrintStatus(char const*, char const*, char*&) const@Base" 0.8.15~exp1 1
+ (c++)"pkgCache::DepIterator::IsNegative() const@Base" 0.8.15~exp1 1

+ 31 - 6
debian/changelog

@@ -1,9 +1,11 @@
-apt (0.8.14.2) UNRELEASED; urgency=low
+apt (0.8.15) unstable; urgency=low
 
   [ Julian Andres Klode ]
   * apt-pkg/depcache.cc:
     - Really release action groups only once (Closes: #622744)
     - Make purge work again for config-files (LP: #244598) (Closes: #150831)
+  * apt-pkg/acquire-item.cc:
+    - Reject files known to be invalid (LP: #346386) (Closes: #627642)
   * debian/apt.cron.daily:
     - Check power after wait, patch by manuel-soto (LP: #705269)
   * debian/control:
@@ -14,12 +16,11 @@ apt (0.8.14.2) UNRELEASED; urgency=low
 
   [ Christian Perrier ]
   * Galician translation update (Miguel Anxo Bouzada). Closes: #626505
+  * Italian translation update (Milo Casagrande). Closes: #627834
+  * German documentation translation update (Chris Leick). Closes: #629949
+  * Catalan translation update (Jordi Mallach). Closes: #630657
 
   [ David Kalnischkies ]
-  * apt-pkg/indexcopy.cc:
-    - Verify that the first line of an InRelease file is a PGP header
-      for a signed message. Otherwise a man-in-the-middle can prefix
-      a valid InRelease file with his own data! (CVE-2011-1829)
   * fix a bunch of cppcheck warnings/errors based on a patch by
     Niels Thykier, thanks! (Closes: #622805)
   * apt-pkg/depcache.cc:
@@ -38,6 +39,8 @@ apt (0.8.14.2) UNRELEASED; urgency=low
     - log reinstall commands in history.log
   * debian/apt{,-utils}.symbols:
     - update both experimental symbol-files to reflect 0.8.14 state
+  * debian/rules:
+    - remove unused embedded jquery by doxygen from libapt-pkg-doc
   * cmdline/apt-mark.cc:
     - reimplement apt-mark in c++
     - provide a 'showmanual' command (Closes: #582791)
@@ -79,8 +82,30 @@ apt (0.8.14.2) UNRELEASED; urgency=low
   * cmdline/apt-config.cc:
     - show Acquire::Languages and APT::Architectures settings
       in 'dump' (Closes: 626739)
+  * apt-pkg/orderlist.cc:
+    - ensure that an old version of a package with a provides can
+      never satisfy a dependency of a newer version of this package
+
+  [ Michael Vogt ]
+  * methods/mirror.cc:
+    - ignore lines starting with "#" in the mirror file
+    - ignore non http urls in the mirrors
+    - append the dist (e.g. sid, wheezy) as a query string when
+      asking for a suitable mirror 
+  * apt-pkg/deb/deblistparser.cc:
+    - include all known languages when building the apt cache
+      (LP: #794907)
+  * apt-pkg/deb/debindexfile.cc:
+    - remove some no longer valid checks for "TranslationsAvailable()"
+
+  [ Kenneth Solbø Andersen ]
+  * apt-pkg/deb/dpkgpm.cc:
+    - set permissions of term.log to root.adm and 644 (LP: #404724)
+  
+  [ Chris Leick ]
+  * various typo and syntax corrections in doc/*.xml
 
- -- David Kalnischkies <kalnischkies@gmail.com>  Mon, 06 Jun 2011 21:33:01 +0200
+ -- Michael Vogt <mvo@debian.org>  Tue, 28 Jun 2011 18:00:48 +0200
 
 apt (0.8.14.1) unstable; urgency=low
 

+ 1 - 1
doc/apt-cache.8.xml

@@ -315,7 +315,7 @@ Reverse Provides:
 		   <term><option>--no-replaces</option></term>
 		   <term><option>--no-enhances</option></term>
 		   <listitem><para>Per default the <literal>depends</literal> and
-     <literal>rdepends</literal> print all dependencies. This can be twicked with
+     <literal>rdepends</literal> print all dependencies. This can be tweaked with
      these flags which will omit the specified dependency type.
      Configuration Item: <literal>APT::Cache::Show<replaceable>DependencyType</replaceable></literal>
      e.g. <literal>APT::Cache::ShowRecommends</literal>.</para></listitem>

+ 3 - 2
doc/apt-ftparchive.1.xml

@@ -532,8 +532,9 @@ for i in Sections do
      index files will not have the checksum fields where possible.
      Configuration Items: <literal>APT::FTPArchive::<replaceable>Checksum</replaceable></literal> and
      <literal>APT::FTPArchive::<replaceable>Index</replaceable>::<replaceable>Checksum</replaceable></literal> where
-     <literal>Index</literal> can be <literal>Packages</literal>, <literal>Sources</literal> or <literal>Release</literal> and
-     <literal>Checksum</literal> can be <literal>MD5</literal>, <literal>SHA1</literal> or <literal>SHA256</literal>.</para></listitem>
+     <literal><replaceable>Index</replaceable></literal> can be <literal>Packages</literal>, <literal>Sources</literal> or
+     <literal>Release</literal> and <literal><replaceable>Checksum</replaceable></literal> can be <literal>MD5</literal>,
+     <literal>SHA1</literal> or <literal>SHA256</literal>.</para></listitem>
      </varlistentry>
 
      <varlistentry><term><option>-d</option></term><term><option>--db</option></term>

+ 1 - 1
doc/apt-get.8.xml

@@ -280,7 +280,7 @@
 
      <varlistentry><term>download</term>
        <listitem><para><literal>download</literal> will download the given
-           binary package into the current directoy.
+           binary package into the current directory.
        </para></listitem>
      </varlistentry>
 

+ 3 - 3
doc/apt.conf.5.xml

@@ -50,7 +50,7 @@
       <listitem><para>the file specified by the <envar>APT_CONFIG</envar>
 	 environment variable (if any)</para></listitem>
       <listitem><para>all files in <literal>Dir::Etc::Parts</literal> in
-	 alphanumeric ascending order which have no or "<literal>conf</literal>"
+	 alphanumeric ascending order which have either no or "<literal>conf</literal>"
 	 as filename extension and which only contain alphanumeric,
 	 hyphen (-), underscore (_) and period (.) characters.
 	 Otherwise APT will print a notice that it has ignored a file if the file
@@ -441,13 +441,13 @@ DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt";};
      It is not needed to add <literal>bz2</literal> explicit to the list as it will be added automatic.</para>
      <para>Note that at run time the <literal>Dir::Bin::<replaceable>Methodname</replaceable></literal> will
      be checked: If this setting exists the method will only be used if this file exists, e.g. for
-     the bzip2 method (the inbuilt) setting is <literallayout>Dir::Bin::bzip2 "/bin/bzip2";</literallayout>
+     the bzip2 method (the inbuilt) setting is: <literallayout>Dir::Bin::bzip2 "/bin/bzip2";</literallayout>
      Note also that list entries specified on the command line will be added at the end of the list
      specified in the configuration files, but before the default entries. To prefer a type in this case
      over the ones specified in the configuration files you can set the option direct - not in list style.
      This will not override the defined list, it will only prefix the list with this type.</para>
      <para>The special type <literal>uncompressed</literal> can be used to give uncompressed files a
-     preference, but note that most archives doesn't provide uncompressed files so this is mostly only
+     preference, but note that most archives don't provide uncompressed files so this is mostly only
      useable for local mirrors.</para></listitem>
      </varlistentry>
 

+ 4 - 4
doc/apt_preferences.5.xml

@@ -69,8 +69,8 @@ You have been warned.</para>
 
 <para>Note that the files in the <filename>/etc/apt/preferences.d</filename>
 directory are parsed in alphanumeric ascending order and need to obey the
-following naming convention: The files have no or "<literal>pref</literal>"
-as filename extension and which only contain alphanumeric,  hyphen (-),
+following naming convention: The files have either no or "<literal>pref</literal>"
+as filename extension and only contain alphanumeric, hyphen (-),
 underscore (_) and period (.) characters.
 Otherwise APT will print a notice that it has ignored a file if the file
 doesn't match a pattern in the <literal>Dir::Ignore-Files-Silently</literal>
@@ -265,7 +265,7 @@ APT also supports pinning by glob() expressions and regular
 expressions surrounded by /. For example, the following
 example assigns the priority 500 to all packages from
 experimental where the name starts with gnome (as a glob()-like
-expression or contains the word kde (as a POSIX extended regular
+expression) or contains the word kde (as a POSIX extended regular
 expression surrounded by slashes).
 </para>
 
@@ -277,7 +277,7 @@ Pin-Priority: 500
 
 <para>
 The rule for those expressions is that they can occur anywhere
-where a string can occur. Those, the following pin assigns the
+where a string can occur. Thus, the following pin assigns the
 priority 990 to all packages from a release starting with karmic.
 </para>
 

Разница между файлами не показана из-за своего большого размера
+ 312 - 209
doc/po/apt-doc.pot


Разница между файлами не показана из-за своего большого размера
+ 598 - 402
doc/po/de.po


Разница между файлами не показана из-за своего большого размера
+ 467 - 237
doc/po/es.po


Разница между файлами не показана из-за своего большого размера
+ 492 - 235
doc/po/fr.po


Разница между файлами не показана из-за своего большого размера
+ 324 - 219
doc/po/it.po


Разница между файлами не показана из-за своего большого размера
+ 450 - 240
doc/po/ja.po


Разница между файлами не показана из-за своего большого размера
+ 456 - 234
doc/po/pl.po


Разница между файлами не показана из-за своего большого размера
+ 466 - 236
doc/po/pt.po


Разница между файлами не показана из-за своего большого размера
+ 336 - 221
doc/po/pt_BR.po


+ 17 - 2
methods/mirror.cc

@@ -134,6 +134,10 @@ bool MirrorMethod::DownloadMirrorFile(string mirror_uri_str)
    string fetch = BaseUri;
    fetch.replace(0,strlen("mirror://"),"http://");
 
+   // append the dist as a query string
+   if (Dist != "")
+      fetch += "?dist=" + Dist;
+
    if(Debug)
       clog << "MirrorMethod::DownloadMirrorFile(): '" << fetch << "'"
            << " to " << MirrorFile << endl;
@@ -274,8 +278,18 @@ bool MirrorMethod::InitMirrors()
    while (!in.eof()) 
    {
       getline(in, s);
-      if (s.size() > 0)
-	 AllMirrors.push_back(s);
+
+      // ignore lines that start with #
+      if (s.find("#") == 0)
+         continue;
+      // ignore empty lines
+      if (s.size() == 0)
+         continue;
+      // ignore non http lines
+      if (s.find("http://") != 0)
+         continue;
+
+      AllMirrors.push_back(s);
    }
    Mirror = AllMirrors[0];
    UsedMirror = Mirror;
@@ -329,6 +343,7 @@ string MirrorMethod::GetMirrorFileName(string mirror_uri_str)
 	 if(Debug)
 	    std::cerr << "found BaseURI: " << uristr << std::endl;
 	 BaseUri = uristr.substr(0,uristr.size()-1);
+         Dist = (*I)->GetDist();
       }
    }
    // get new file

+ 1 - 0
methods/mirror.h

@@ -29,6 +29,7 @@ class MirrorMethod : public HttpMethod
    vector<string> AllMirrors; // all available mirrors
    string MirrorFile; // the file that contains the list of mirrors
    bool DownloadedMirrorFile; // already downloaded this session
+   string Dist;       // the target distrubtion (e.g. sid, oneiric)
 
    bool Debug;
 

Разница между файлами не показана из-за своего большого размера
+ 577 - 428
po/ca.po


+ 14 - 5
po/it.po

@@ -9,14 +9,16 @@ msgstr ""
 "Project-Id-Version: apt\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2011-01-12 17:42+0100\n"
-"PO-Revision-Date: 2011-02-21 18:35+0100\n"
+"PO-Revision-Date: 2011-05-16 21:38+0200\n"
 "Last-Translator: Milo Casagrande <milo@ubuntu.com>\n"
 "Language-Team: Italian <tp@lists.linux.it>\n"
 "Language: it\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8-bit\n"
+"Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Launchpad-Export-Date: 2011-02-21 18:00+0000\n"
+"X-Generator: Launchpad (build 12406)\n"
 
 #: cmdline/apt-cache.cc:156
 #, c-format
@@ -1907,8 +1909,10 @@ msgid "Couldn't change to %s"
 msgstr "Impossibile passare a %s"
 
 #: apt-inst/deb/debfile.cc:140
+#, fuzzy
+#| msgid "Internal error, could not locate member %s"
 msgid "Internal error, could not locate member"
-msgstr "Errore interno, impossibile localizzare il membro"
+msgstr "Errore interno, impossibile trovare il membro %s"
 
 #: apt-inst/deb/debfile.cc:173
 msgid "Failed to locate a valid control file"
@@ -2710,7 +2714,6 @@ msgstr "Scrittura del file temporaneo di stato %s non riuscita"
 #, c-format
 msgid "Internal error, group '%s' has no installable pseudo package"
 msgstr ""
-"Errore interno, il gruppo \"%s\" non ha uno pseudo pacchetto installabile"
 
 #: apt-pkg/tagfile.cc:102
 #, c-format
@@ -3113,7 +3116,10 @@ msgstr ""
 "sistemare manualmente questo pacchetto (a causa dell'architettura mancante)."
 
 #: apt-pkg/acquire-item.cc:1424
-#, c-format
+#, fuzzy, c-format
+#| msgid ""
+#| "I wasn't able to locate file for the %s package. This might mean you need "
+#| "to manually fix this package."
 msgid ""
 "I wasn't able to locate a file for the %s package. This might mean you need "
 "to manually fix this package."
@@ -3581,3 +3587,6 @@ msgstr "Connessione chiusa prematuramente"
 
 #~ msgid "Unable to find hash sum for '%s' in Release file"
 #~ msgstr "Impossibile trovare la somma hash per \"%s\" nel file Release"
+
+#~ msgid "Can not read mirror file '%s'"
+#~ msgstr "Impossibile leggere il file mirror \"%s\""