]> git.saurik.com Git - apt.git/commitdiff
merged lp:~pitti/apt/compressed-indexes
authorMichael Vogt <michael.vogt@ubuntu.com>
Thu, 25 Nov 2010 14:58:53 +0000 (15:58 +0100)
committerMichael Vogt <michael.vogt@ubuntu.com>
Thu, 25 Nov 2010 14:58:53 +0000 (15:58 +0100)
apt-pkg/contrib/strutl.cc
apt-pkg/contrib/strutl.h
cmdline/acqprogress.cc
cmdline/apt-get.cc
debian/changelog
doc/apt-get.8.xml
doc/examples/configure-index
methods/http.cc
po/de.po
test/integration/framework
test/integration/test-changelog [new file with mode: 0755]

index 987f4c3a48414ec99cab139feccc8d99841b9425..c2b335ed74b66a16e4e55e0f43f5017566c9e1fd 100644 (file)
@@ -1174,6 +1174,15 @@ char *safe_snprintf(char *Buffer,char *End,const char *Format,...)
    return Buffer + Did;
 }
                                                                        /*}}}*/
+// StripEpoch - Remove the version "epoch" from a version string       /*{{{*/
+// ---------------------------------------------------------------------
+string StripEpoch(const string &VerStr)
+{
+   size_t i = VerStr.find(":");
+   if (i == string::npos)
+      return VerStr;
+   return VerStr.substr(i+1);
+}
 
 // tolower_ascii - tolower() function that ignores the locale          /*{{{*/
 // ---------------------------------------------------------------------
index a457ff047da314d428bca60455ebfac643e192b2..14cf5c943906f1ffaf08d7c6c7582fd66691dd4e 100644 (file)
@@ -61,6 +61,7 @@ void strprintf(string &out,const char *format,...) __like_printf(2);
 char *safe_snprintf(char *Buffer,char *End,const char *Format,...) __like_printf(3);
 bool CheckDomainList(const string &Host, const string &List);
 int tolower_ascii(int const c) __attrib_const __hot;
+string StripEpoch(const string &VerStr);
 
 #define APT_MKSTRCMP(name,func) \
 inline int name(const char *A,const char *B) {return func(A,A+strlen(A),B,B+strlen(B));}; \
index 32e8243bfe574aa82441a72174de0bfc9f0815cd..ba334ce05737c7057707239a0f12dcb54dc74da9 100644 (file)
@@ -11,6 +11,7 @@
 #include "acqprogress.h"
 #include <apt-pkg/acquire-item.h>
 #include <apt-pkg/acquire-worker.h>
+#include <apt-pkg/configuration.h>
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/error.h>
 
@@ -19,6 +20,7 @@
 #include <stdio.h>
 #include <signal.h>
 #include <iostream>
+#include <unistd.h>
                                                                        /*}}}*/
 
 using namespace std;
@@ -266,6 +268,16 @@ bool AcqTextStatus::Pulse(pkgAcquire *Owner)
 /* Prompt for a media swap */
 bool AcqTextStatus::MediaChange(string Media,string Drive)
 {
+   // If we do not output on a terminal and one of the options to avoid user
+   // interaction is given, we assume that no user is present who could react
+   // on your media change request
+   if (isatty(STDOUT_FILENO) != 1 && Quiet >= 2 &&
+       (_config->FindB("APT::Get::Assume-Yes",false) == true ||
+       _config->FindB("APT::Get::Force-Yes",false) == true ||
+       _config->FindB("APT::Get::Trivial-Only",false) == true))
+
+      return false;
+
    if (Quiet <= 0)
       cout << '\r' << BlankLine << '\r';
    ioprintf(cout,_("Media change: please insert the disc labeled\n"
index 8efcd0e2e7aa7f5affa9881c2bedb007465e2b73..6e1a5280ce2310b148dc233c2c8b235d3d6e4bdb 100644 (file)
@@ -2165,6 +2165,59 @@ bool DoAutoClean(CommandLine &CmdL)
       Cleaner.Go(_config->FindDir("Dir::Cache::archives") + "partial/",*Cache);
 }
                                                                        /*}}}*/
+// DoDownload - download a binary                                      /*{{{*/
+// ---------------------------------------------------------------------
+bool DoDownload(CommandLine &CmdL)
+{
+   CacheFile Cache;
+   if (Cache.ReadOnlyOpen() == false)
+      return false;
+   
+   APT::CacheSetHelper helper(c0out);
+   APT::VersionSet verset = APT::VersionSet::FromCommandLine(Cache,
+               CmdL.FileList + 1, APT::VersionSet::CANDIDATE, helper);
+   pkgAcquire Fetcher;
+   AcqTextStatus Stat(ScreenWidth, _config->FindI("quiet",0));
+   Fetcher.Setup(&Stat);
+
+   if (verset.empty() == true)
+      return false;
+
+   pkgRecords Recs(Cache);
+   pkgSourceList *SrcList = Cache.GetSourceList();
+   for (APT::VersionSet::const_iterator Ver = verset.begin(); 
+        Ver != verset.end(); 
+        ++Ver) 
+   {
+      string descr;
+      // get the right version
+      pkgCache::PkgIterator Pkg = Ver.ParentPkg();
+      pkgRecords::Parser &rec=Recs.Lookup(Ver.FileList());
+      pkgCache::VerFileIterator Vf = Ver.FileList();
+      if (Vf.end() == true)
+         return _error->Error("Can not find VerFile");
+      pkgCache::PkgFileIterator F = Vf.File();
+      pkgIndexFile *index;
+      if(SrcList->FindIndex(F, index) == false)
+         return _error->Error("FindIndex failed");
+      string uri = index->ArchiveURI(rec.FileName());
+      strprintf(descr, _("Downloading %s %s"), Pkg.Name(), Ver.VerStr());
+      // get the most appropriate hash
+      HashString hash;
+      if (rec.SHA256Hash() != "")
+         hash = HashString("sha256", rec.SHA256Hash());
+      else if (rec.SHA1Hash() != "")
+         hash = HashString("sha1", rec.SHA1Hash());
+      else if (rec.MD5Hash() != "")
+         hash = HashString("md5", rec.MD5Hash());
+      // get the file
+      new pkgAcqFile(&Fetcher, uri, hash.toStr(), (*Ver)->Size, descr, Pkg.Name(), ".");
+   }
+   bool result = (Fetcher.Run() == pkgAcquire::Continue);
+
+   return result;
+}
+                                                                       /*}}}*/
 // DoCheck - Perform the check operation                               /*{{{*/
 // ---------------------------------------------------------------------
 /* Opening automatically checks the system, this command is mostly used
@@ -2733,6 +2786,169 @@ bool DoBuildDep(CommandLine &CmdL)
    return true;
 }
                                                                        /*}}}*/
+// GetChangelogPath - return a path pointing to a changelog file or dir /*{{{*/
+// ---------------------------------------------------------------------
+/* This returns a "path" string for the changelog url construction.
+ * Please note that its not complete, it either needs a "/changelog"
+ * appended (for the packages.debian.org/changelogs site) or a
+ * ".changelog" (for third party sites that store the changelog in the
+ * pool/ next to the deb itself)
+ * Example return: "pool/main/a/apt/apt_0.8.8ubuntu3" 
+ */
+string GetChangelogPath(CacheFile &Cache, 
+                        pkgCache::PkgIterator Pkg,
+                        pkgCache::VerIterator Ver)
+{
+   string path;
+
+   pkgRecords Recs(Cache);
+   pkgRecords::Parser &rec=Recs.Lookup(Ver.FileList());
+   string srcpkg = rec.SourcePkg().empty() ? Pkg.Name() : rec.SourcePkg();
+   string ver = Ver.VerStr();
+   // if there is a source version it always wins
+   if (rec.SourceVer() != "")
+      ver = rec.SourceVer();
+   path = flNotFile(rec.FileName());
+   path += srcpkg + "_" + StripEpoch(ver);
+   return path;
+}
+                                                                       /*}}}*/
+// GuessThirdPartyChangelogUri - return url                            /*{{{*/
+// ---------------------------------------------------------------------
+/* Contruct a changelog file path for third party sites that do not use
+ * packages.debian.org/changelogs
+ * This simply uses the ArchiveURI() of the source pkg and looks for
+ * a .changelog file there, Example for "mediabuntu":
+ * apt-get changelog mplayer-doc:
+ *  http://packages.medibuntu.org/pool/non-free/m/mplayer/mplayer_1.0~rc4~try1.dsfg1-1ubuntu1+medibuntu1.changelog
+ */
+bool GuessThirdPartyChangelogUri(CacheFile &Cache, 
+                                 pkgCache::PkgIterator Pkg,
+                                 pkgCache::VerIterator Ver,
+                                 string &out_uri)
+{
+   // get the binary deb server path
+   pkgCache::VerFileIterator Vf = Ver.FileList();
+   if (Vf.end() == true)
+      return false;
+   pkgCache::PkgFileIterator F = Vf.File();
+   pkgIndexFile *index;
+   pkgSourceList *SrcList = Cache.GetSourceList();
+   if(SrcList->FindIndex(F, index) == false)
+      return false;
+
+   // get archive uri for the binary deb
+   string path_without_dot_changelog = GetChangelogPath(Cache, Pkg, Ver);
+   out_uri = index->ArchiveURI(path_without_dot_changelog + ".changelog");
+
+   // now strip away the filename and add srcpkg_srcver.changelog
+   return true;
+}
+// DownloadChangelog - Download the changelog                          /*{{{*/
+// ---------------------------------------------------------------------
+bool DownloadChangelog(CacheFile &CacheFile, pkgAcquire &Fetcher, 
+                       pkgCache::VerIterator Ver, string targetfile)
+/* Download a changelog file for the given package version to
+ * targetfile. This will first try the server from Apt::Changelogs::Server
+ * (http://packages.debian.org/changelogs by default) and if that gives
+ * a 404 tries to get it from the archive directly (see 
+ * GuessThirdPartyChangelogUri for details how)
+ */
+{
+   string path;
+   string descr;
+   string server;
+   string changelog_uri;
+
+   // data structures we need
+   pkgCache::PkgIterator Pkg = Ver.ParentPkg();
+
+   // make the server root configurable
+   server = _config->Find("Apt::Changelogs::Server",
+                          "http://packages.debian.org/changelogs");
+   path = GetChangelogPath(CacheFile, Pkg, Ver);
+   strprintf(changelog_uri, "%s/%s/changelog", server.c_str(), path.c_str());
+   strprintf(descr, _("Changelog for %s (%s)"), Pkg.Name(), changelog_uri.c_str());
+   // queue it
+   new pkgAcqFile(&Fetcher, changelog_uri, "", 0, descr, Pkg.Name(), "ignored", targetfile);
+
+   // try downloading it, if that fails, they third-party-changelogs location
+   // FIXME: res is "Continue" even if I get a 404?!?
+   int res = Fetcher.Run();
+   if (!FileExists(targetfile))
+   {
+      string third_party_uri;
+      if (GuessThirdPartyChangelogUri(CacheFile, Pkg, Ver, third_party_uri))
+      {
+         strprintf(descr, _("Changelog for %s (%s)"), Pkg.Name(), third_party_uri.c_str());
+         new pkgAcqFile(&Fetcher, third_party_uri, "", 0, descr, Pkg.Name(), "ignored", targetfile);
+         res = Fetcher.Run();
+      }
+   }
+
+   if (FileExists(targetfile))
+      return true;
+
+   // error
+   return _error->Error("changelog download failed");
+}
+                                                                       /*}}}*/
+// DisplayFileInPager - Display File with pager                                /*{{{*/
+void DisplayFileInPager(string filename)
+{
+   pid_t Process = ExecFork();
+   if (Process == 0)
+   {
+      const char *Args[3];
+      Args[0] = "/usr/bin/sensible-pager";
+      Args[1] = filename.c_str();
+      Args[2] = 0;
+      execvp(Args[0],(char **)Args);
+      exit(100);
+   }
+         
+   // Wait for the subprocess
+   ExecWait(Process, "sensible-pager", false);
+}
+                                                                       /*}}}*/
+// DoChangelog - Get changelog from the command line                   /*{{{*/
+// ---------------------------------------------------------------------
+bool DoChangelog(CommandLine &CmdL)
+{
+   CacheFile Cache;
+   if (Cache.ReadOnlyOpen() == false)
+      return false;
+   
+   APT::CacheSetHelper helper(c0out);
+   APT::VersionSet verset = APT::VersionSet::FromCommandLine(Cache,
+               CmdL.FileList + 1, APT::VersionSet::CANDIDATE, helper);
+   pkgAcquire Fetcher;
+   AcqTextStatus Stat(ScreenWidth, _config->FindI("quiet",0));
+   Fetcher.Setup(&Stat);
+
+   if (verset.empty() == true)
+      return false;
+   char *tmpdir = mkdtemp(strdup("/tmp/apt-changelog-XXXXXX"));
+   if (tmpdir == NULL) {
+      return _error->Errno("mkdtemp", "mkdtemp failed");
+   }
+   
+   for (APT::VersionSet::const_iterator Ver = verset.begin(); 
+        Ver != verset.end(); 
+        ++Ver) 
+   {
+      string changelogfile = string(tmpdir) + "changelog";
+      if (DownloadChangelog(Cache, Fetcher, Ver, changelogfile))
+         DisplayFileInPager(changelogfile);
+      // cleanup temp file
+      unlink(changelogfile.c_str());
+   }
+   // clenaup tmp dir
+   rmdir(tmpdir);
+   free(tmpdir);
+   return true;
+}
+                                                                       /*}}}*/
 // DoMoo - Never Ask, Never Tell                                       /*{{{*/
 // ---------------------------------------------------------------------
 /* */
@@ -2825,6 +3041,8 @@ bool ShowHelp(CommandLine &CmdL)
       "   check - Verify that there are no broken dependencies\n"
       "   markauto - Mark the given packages as automatically installed\n"
       "   unmarkauto - Mark the given packages as manually installed\n"
+      "   changelog - Download and display the changelog for the given package\n"
+      "   download - Download the binary package into the current directory\n"
       "\n"
       "Options:\n"
       "  -h  This help text.\n"
@@ -2923,6 +3141,8 @@ int main(int argc,const char *argv[])                                     /*{{{*/
                                    {"autoclean",&DoAutoClean},
                                    {"check",&DoCheck},
                                   {"source",&DoSource},
+                                   {"download",&DoDownload},
+                                   {"changelog",&DoChangelog},
                                   {"moo",&DoMoo},
                                   {"help",&ShowHelp},
                                    {0,0}};
index cbf3a5dcc13adf00df2a44aa260b6f6869d3fb99..98c127143fdc9ec7d8aa765bd6fd96d50345b1ce 100644 (file)
@@ -1,4 +1,19 @@
-apt (0.8.9) UNRELEASED; urgency=low
+apt (0.8.10) unstable; urgency=low
+
+  [ Michael Vogt ]
+  * methods/http.cc:
+    - do not hang if Acquire::http::ProxyAutoDetect can not be
+      executed or returns no data (LP: #654393)
+
+  [ Martin Pitt ]
+  * test/integration/test-compressed-indexes, test/test-indexes.sh:
+    - Explicitly disable compressed indexes at the start. This ensures that we
+      will actually test uncompressed indexes regardless of the internal
+      default value of Acquire::GzipIndexes.
+
+ -- Michael Vogt <michael.vogt@ubuntu.com>  Mon, 22 Nov 2010 10:40:45 +0100
+
+apt (0.8.9) unstable; urgency=low
 
   [ Christian Perrier ]
   * Fix "typos" in French manpages translations. Thanks to
@@ -7,6 +22,7 @@ apt (0.8.9) UNRELEASED; urgency=low
 
   [ Programs translations ]
   * Slovenian update by Andrej Žnidaršič and Rosetta Slovenian team
+  ! German update by Holger Wansing. Closes: #603619
 
   [ David Kalnischkies ]
   * apt-pkg/aptconfiguration.cc:
@@ -20,14 +36,13 @@ apt (0.8.9) UNRELEASED; urgency=low
   * apt-pkg/depcache.cc:
     - don't install previously not installed providers in a try
       to statisfy a "Breaks: provides" dependency by upgrade
+  * cmdline/acqprogress.cc:
+    - don't ask the user for media change if quiet >= 2, stdout is not
+      a tty and assume-yes, force-yes or trivial-only option is set to
+      avoid cpu eating endless loops in unattended runs like apt.cron
+      (Closes: #602354, LP: #665580)
 
-  [ Martin Pitt ]
-  * test/integration/test-compressed-indexes, test/test-indexes.sh:
-    - Explicitly disable compressed indexes at the start. This ensures that we
-      will actually test uncompressed indexes regardless of the internal
-      default value of Acquire::GzipIndexes.
-
- -- David Kalnischkies <kalnischkies@gmail.com>  Wed, 10 Nov 2010 13:22:39 +0100
+ -- Michael Vogt <mvo@debian.org>  Thu, 18 Nov 2010 09:25:04 +0100
 
 apt (0.8.8) unstable; urgency=low
 
index 57306c03f8f0bc2f48421cd151ce6f41a8d3a663..7eb87b452cd5536ba24013b442725a2dc8cd253e 100644 (file)
      for broken dependencies.</para></listitem>
      </varlistentry>
 
+     <varlistentry><term>download</term>
+       <listitem><para><literal>download</literal> will download the given
+           binary package into the current directoy.
+       </para></listitem>
+     </varlistentry>
+
      <varlistentry><term>clean</term>
      <listitem><para><literal>clean</literal> clears out the local repository of retrieved package 
      files. It removes everything but the lock file from 
      <listitem><para><literal>autoremove</literal> is used to remove packages that were automatically
      installed to satisfy dependencies for some package and that are no more needed.</para></listitem>
      </varlistentry>
+
+     <varlistentry><term>changelog</term>
+       <listitem><para><literal>changelog</literal> downloads a package changelog and displays
+           it through <command>sensible-pager</command>. The server name and base
+           directory is defined in the <literal>APT::Changelogs::Server</literal>
+           variable (e. g. <ulink>http://packages.debian.org/changelogs</ulink> for
+           Debian or <ulink>http://changelogs.ubuntu.com/changelogs</ulink> for
+           Ubuntu).
+           By default it displays the changelog for the version that is
+           installed.  However, you can specify the same options as for
+           the <option>install</option> command.
+         </para>
+       </listitem>
+     </varlistentry>
+
+
+
    </variablelist>
  </refsect1>
  
index c4c2acb6427e64079756456e11ed403962e120f9..b87251103f0597914c76445a819547d5c940bcee 100644 (file)
@@ -114,54 +114,62 @@ APT
   // does a ExecFork)
   Keep-Fds {};
 
+  Changelogs
+  {
+    // server the provides the changelogs, the code will assume
+    // the changlogs are in the pool/ under a srcpkg_ver directory 
+    // with the name "changelog"
+    Server "http://packages.debian.org/changelogs";
+  }:
+
   // control parameters for cron jobs by /etc/cron.daily/apt
   Periodic
   {
-  BackupArchiveInterval "0";
-  // - Backup after n-days if archive contents changed.(0=disable)
-
-  BackupLevel "3";
-  // - Backup level.(0=disable), 1 is invalid.
-
-  // APT::Archives::MaxAge "0"; (old, deprecated)
-  MaxAge "0"; // (new)
-  // - Set maximum allowed age of a cache package file. If a cache 
-  //   package file is older it is deleted (0=disable)
-
-  // APT::Archives::MinAge "2"; (old, deprecated)
-  MinAge "2"; // (new)
-  // - Set minimum age of a package file. If a file is younger it
-  //   will not be deleted (0=disable). Usefull to prevent races 
-  //   and to keep backups of the packages for emergency.
-
-  // APT::Archives::MaxSize "0"; (old, deprecated)
-  MaxSize "0"; // (new)
-  // - Set maximum size of the cache in MB (0=disable). If the cache
-  //   is bigger, cached package files are deleted until the size
-  //   requirement is met (the biggest packages will be deleted 
-  //   first).
-
-  Update-Package-Lists "0";
-  // - Do "apt-get update" automatically every n-days (0=disable)
-  //   
-  Download-Upgradeable-Packages "0";
-  // - Do "apt-get upgrade --download-only" every n-days (0=disable)
-  //
-  Unattended-Upgrade "0";
-  // - Run the "unattended-upgrade" security upgrade script 
-  //   every n-days (0=disabled)
-  //   Requires the package "unattended-upgrades" and will write
-  //   a log in /var/log/unattended-upgrades
-  //
-  AutocleanInterval "0";
-  // - Do "apt-get autoclean" every n-days (0=disable)
-
-  Verbose "0";
-  // - Send report mail to root
-  //   0:  no report             (or null string)
-  //   1:  progress report       (actually any string)
-  //   2:  + command outputs     (remove -qq, remove 2>/dev/null, add -d)
-  //   3:  + trace on            
+    BackupArchiveInterval "0";
+    // - Backup after n-days if archive contents changed.(0=disable)
+
+    BackupLevel "3";
+    // - Backup level.(0=disable), 1 is invalid.
+
+    // APT::Archives::MaxAge "0"; (old, deprecated)
+    MaxAge "0"; // (new)
+    // - Set maximum allowed age of a cache package file. If a cache 
+    //   package file is older it is deleted (0=disable)
+
+    // APT::Archives::MinAge "2"; (old, deprecated)
+    MinAge "2"; // (new)
+    // - Set minimum age of a package file. If a file is younger it
+    //   will not be deleted (0=disable). Usefull to prevent races 
+    //   and to keep backups of the packages for emergency.
+
+    // APT::Archives::MaxSize "0"; (old, deprecated)
+    MaxSize "0"; // (new)
+    // - Set maximum size of the cache in MB (0=disable). If the cache
+    //   is bigger, cached package files are deleted until the size
+    //   requirement is met (the biggest packages will be deleted 
+    //   first).
+
+    Update-Package-Lists "0";
+    // - Do "apt-get update" automatically every n-days (0=disable)
+    //   
+    Download-Upgradeable-Packages "0";
+    // - Do "apt-get upgrade --download-only" every n-days (0=disable)
+    //
+    Unattended-Upgrade "0";
+    // - Run the "unattended-upgrade" security upgrade script 
+    //   every n-days (0=disabled)
+    //   Requires the package "unattended-upgrades" and will write
+    //   a log in /var/log/unattended-upgrades
+    //
+    AutocleanInterval "0";
+    // - Do "apt-get autoclean" every n-days (0=disable)
+
+    Verbose "0";
+    // - Send report mail to root
+    //   0:  no report             (or null string)
+    //   1:  progress report       (actually any string)
+    //   2:  + command outputs     (remove -qq, remove 2>/dev/null, add -d)
+    //   3:  + trace on            
   };
 };
 
index 25e31de9a3126becc17db843f4e4e59a2a1837c5..dfc1619e3c4994c9dda537c2728c6722e9b8fd82 100644 (file)
@@ -1349,9 +1349,10 @@ bool HttpMethod::AutoDetectProxy()
    pid_t Process = ExecFork();
    if (Process == 0)
    {
+      close(Pipes[0]);
       dup2(Pipes[1],STDOUT_FILENO);
       SetCloseExec(STDOUT_FILENO,false);
-      
+
       const char *Args[2];
       Args[0] = AutoDetectProxyCmd.c_str();
       Args[1] = 0;
@@ -1361,10 +1362,18 @@ bool HttpMethod::AutoDetectProxy()
    }
    char buf[512];
    int InFd = Pipes[0];
-   if (read(InFd, buf, sizeof(buf)) < 0)
+   close(Pipes[1]);
+   int res = read(InFd, buf, sizeof(buf));
+   ExecWait(Process, "ProxyAutoDetect", true);
+
+   if (res < 0)
       return _error->Errno("read", "Failed to read");
-   ExecWait(Process, "ProxyAutoDetect");
-   
+   if (res == 0)
+      return _error->Warning("ProxyAutoDetect returned no data");
+
+   // add trailing \0
+   buf[res] = 0;
+
    if (Debug)
       clog << "auto detect command returned: '" << buf << "'" << endl;
 
index 4e4e9bf0eaa86f485421fe43ae6f9de224a65607..9d26712480a7f211500bdf7f76a9286ea2df1119 100644 (file)
--- a/po/de.po
+++ b/po/de.po
@@ -8,10 +8,10 @@
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: apt 0.8.0\n"
+"Project-Id-Version: apt 0.8.8\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2010-09-28 17:23+0200\n"
-"PO-Revision-Date: 2010-09-08 22:37+0200\n"
+"PO-Revision-Date: 2010-11-15 21:42+0100\n"
 "Last-Translator: Holger Wansing <linux@wansing-online.de>\n"
 "Language-Team: Debian German <debian-l10n-german@lists.debian.org>\n"
 "Language: \n"
@@ -730,11 +730,11 @@ msgstr "Die folgenden Pakete werden aktualisiert (Upgrade):"
 #: cmdline/apt-get.cc:488
 msgid "The following packages will be DOWNGRADED:"
 msgstr ""
-"Die folgenden Pakete werden DEAKTUALISIERT (ältere Version wird installiert):"
+"Die folgenden Pakete werden durch eine ÄLTERE VERSION ERSETZT (Downgrade):"
 
 #: cmdline/apt-get.cc:508
 msgid "The following held packages will be changed:"
-msgstr "Die folgenden gehaltenen Pakete werden verändert:"
+msgstr "Die folgenden zurückgehaltenen Pakete werden verändert:"
 
 #: cmdline/apt-get.cc:561
 #, c-format
@@ -762,7 +762,7 @@ msgstr "%lu erneut installiert, "
 #: cmdline/apt-get.cc:609
 #, c-format
 msgid "%lu downgraded, "
-msgstr "%lu deaktualisiert, "
+msgstr "%lu durch eine ältere Version ersetzt, "
 
 #: cmdline/apt-get.cc:611
 #, c-format
@@ -814,8 +814,8 @@ msgid ""
 "is only available from another source\n"
 msgstr ""
 "Paket %s ist nicht verfügbar, wird aber von einem anderen Paket\n"
-"referenziert. Das kann heißen, dass das Paket fehlt, dass es veraltet\n"
-"ist oder nur aus einer anderen Quelle verfügbar ist.\n"
+"referenziert. Das kann heißen, dass das Paket fehlt, dass es abgelöst\n"
+"wurde oder nur aus einer anderen Quelle verfügbar ist.\n"
 
 #: cmdline/apt-get.cc:701
 msgid "However the following packages replace it:"
@@ -1799,7 +1799,7 @@ msgstr "Interner Fehler beim Hinzufügen einer Umleitung"
 
 #: apt-inst/deb/dpkgdb.cc:379
 msgid "The pkg cache must be initialized first"
-msgstr "Der Paket-Cache muss erst initialisiert werden"
+msgstr "Der Paketzwischenspeicher muss zuerst initialisiert werden"
 
 #: apt-inst/deb/dpkgdb.cc:439
 #, c-format
@@ -2530,15 +2530,16 @@ msgstr "Problem beim Synchronisieren der Datei"
 
 #: apt-pkg/pkgcache.cc:145
 msgid "Empty package cache"
-msgstr "Leerer Paket-Cache"
+msgstr "Leerer Paketzwischenspeicher"
 
 #: apt-pkg/pkgcache.cc:151
 msgid "The package cache file is corrupted"
-msgstr "Die Paket-Cache-Datei ist beschädigt"
+msgstr "Die Paketzwischenspeicher-Datei ist beschädigt"
 
 #: apt-pkg/pkgcache.cc:156
 msgid "The package cache file is an incompatible version"
-msgstr "Die Paket-Cache-Datei liegt in einer inkompatiblen Version vor"
+msgstr ""
+"Die Paketzwischenspeicher-Datei liegt in einer inkompatiblen Version vor"
 
 #: apt-pkg/pkgcache.cc:161
 #, c-format
@@ -2547,7 +2548,7 @@ msgstr "Das Versionssystem »%s« wird durch dieses APT nicht unterstützt"
 
 #: apt-pkg/pkgcache.cc:166
 msgid "The package cache was built for a different architecture"
-msgstr "Der Paket-Cache wurde für eine andere Architektur aufgebaut"
+msgstr "Der Paketzwischenspeicher wurde für eine andere Architektur aufgebaut"
 
 #: apt-pkg/pkgcache.cc:293
 msgid "Depends"
@@ -2575,11 +2576,11 @@ msgstr "Ersetzt"
 
 #: apt-pkg/pkgcache.cc:295
 msgid "Obsoletes"
-msgstr "Veraltet"
+msgstr "Löst ab"
 
 #: apt-pkg/pkgcache.cc:295
 msgid "Breaks"
-msgstr "Stört"
+msgstr "Beschädigt"
 
 #: apt-pkg/pkgcache.cc:295
 msgid "Enhances"
@@ -2767,12 +2768,13 @@ msgid ""
 "held packages."
 msgstr ""
 "Fehler: Unterbrechungen durch pkgProblemResolver::Resolve hervorgerufen; "
-"dies könnte durch gehaltene Pakete verursacht worden sein."
+"dies könnte durch zurückgehaltene Pakete verursacht worden sein."
 
 #: apt-pkg/algorithms.cc:1212
 msgid "Unable to correct problems, you have held broken packages."
 msgstr ""
-"Probleme können nicht korrigiert werden, Sie haben gehaltene defekte Pakete."
+"Probleme können nicht korrigiert werden, Sie haben zurückgehaltene defekte "
+"Pakete."
 
 #: apt-pkg/algorithms.cc:1488 apt-pkg/algorithms.cc:1490
 msgid ""
@@ -2877,7 +2879,7 @@ msgstr "Keine Priorität (oder Null) für Pin angegeben"
 
 #: apt-pkg/pkgcachegen.cc:80
 msgid "Cache has an incompatible versioning system"
-msgstr "Cache hat ein inkompatibles Versionssystem"
+msgstr "Zwischenspeicher hat ein inkompatibles Versionssystem"
 
 #: apt-pkg/pkgcachegen.cc:198
 #, c-format
index 2422f0886d0770e218a16155609ac0cdf26cc3f4..f78ae2ee1516a4c185d2727793321ba9ad26bbc9 100644 (file)
@@ -117,6 +117,7 @@ setupenvironment() {
        echo "Debug::NoLocking \"true\";" >> aptconfig.conf
        echo "APT::Get::Show-User-Simulation-Note \"false\";" >> aptconfig.conf
        echo "Dir::Bin::dpkg \"fakeroot\";" >> aptconfig.conf
+       echo "Dir::Bin::methods \"${BUILDDIRECTORY}/methods\";" >> aptconfig.conf
        echo "DPKG::options:: \"dpkg\";" >> aptconfig.conf
        echo "DPKG::options:: \"--root=${TMPWORKINGDIRECTORY}/rootdir\";" >> aptconfig.conf
        echo "DPKG::options:: \"--force-not-root\";" >> aptconfig.conf
diff --git a/test/integration/test-changelog b/test/integration/test-changelog
new file mode 100755 (executable)
index 0000000..292df6e
--- /dev/null
@@ -0,0 +1,34 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+
+setupenvironment
+configarchitecture "i386"
+
+# this will be valid until ubuntu lucid is EOL (04/2015)
+pkgchangelogtest="Package: apt
+Architecture: i386
+Version: 0.7.25.3ubuntu7
+Filename: pool/main/a/apt/apt_0.7.25.3ubuntu7_i386.deb
+Section: admin
+"
+cat <<-EOF >aptarchive/Packages
+$pkgchangelogtest
+EOF
+
+setupaptarchive
+
+echo "Apt::Changelogs::Server \"http://changelogs.ubuntu.com/\";" >> ./aptconfig.conf
+msgnmsg "apt-get changelog: "
+aptget changelog apt -qq > downloaded-changelog
+expected="apt (0.7.25.3ubuntu7) lucid; urgency=low"
+got="$(head -n1 downloaded-changelog)"
+if [ -s downloaded-changelog ] && [ "$got" = "$expected" ]; then
+    msgpass
+else
+    msgfail 
+    msgwarn "$got != $expected"
+fi
+