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

Merge remote-tracking branch 'upstream/debian/sid' into bugfix/coverity

Michael Vogt лет назад: 13
Родитель
Сommit
afc2891fda
73 измененных файлов с 14689 добавлено и 13136 удалено
  1. 13 2
      apt-pkg/acquire-item.cc
  2. 6 4
      apt-pkg/contrib/error.cc
  3. 18 5
      apt-pkg/contrib/fileutl.cc
  4. 1 1
      apt-pkg/deb/dpkgpm.cc
  5. 3 3
      apt-pkg/depcache.cc
  6. 2 2
      buildlib/configure.mak
  7. 8 9
      buildlib/defaults.mak
  8. 57 27
      cmdline/apt-cache.cc
  9. 32 3
      cmdline/apt-get.cc
  10. 3 7
      configure.in
  11. 1 1
      debian/apt.auto-removal.sh
  12. 4 0
      debian/apt.postinst
  13. 50 0
      debian/changelog
  14. 4 4
      debian/control
  15. 1 5
      debian/libapt-inst1.5.symbols
  16. 52 69
      debian/libapt-pkg4.12.symbols
  17. 22 17
      debian/rules
  18. 522 146
      doc/Doxyfile.in
  19. 19 20
      methods/http.cc
  20. 7 1
      po/LINGUAS
  21. 297 279
      po/apt-all.pot
  22. 299 281
      po/ar.po
  23. 301 283
      po/ast.po
  24. 299 281
      po/bg.po
  25. 298 281
      po/bs.po
  26. 299 281
      po/ca.po
  27. 299 281
      po/cs.po
  28. 298 281
      po/cy.po
  29. 299 281
      po/da.po
  30. 301 283
      po/de.po
  31. 303 283
      po/dz.po
  32. 302 284
      po/el.po
  33. 303 285
      po/es.po
  34. 300 282
      po/eu.po
  35. 299 281
      po/fi.po
  36. 299 281
      po/fr.po
  37. 300 282
      po/gl.po
  38. 299 281
      po/hu.po
  39. 301 283
      po/it.po
  40. 302 284
      po/ja.po
  41. 299 279
      po/km.po
  42. 299 281
      po/ko.po
  43. 299 280
      po/ku.po
  44. 299 281
      po/lt.po
  45. 15 5
      po/makefile
  46. 299 279
      po/mr.po
  47. 299 281
      po/nb.po
  48. 300 280
      po/ne.po
  49. 300 282
      po/nl.po
  50. 300 282
      po/nn.po
  51. 299 281
      po/pl.po
  52. 301 283
      po/pt.po
  53. 299 281
      po/pt_BR.po
  54. 301 283
      po/ro.po
  55. 299 281
      po/ru.po
  56. 301 283
      po/sk.po
  57. 303 285
      po/sl.po
  58. 299 281
      po/sv.po
  59. 301 283
      po/th.po
  60. 300 282
      po/tl.po
  61. 457 402
      po/tr.po
  62. 301 283
      po/uk.po
  63. 576 538
      po/vi.po
  64. 300 282
      po/zh_CN.po
  65. 300 281
      po/zh_TW.po
  66. 1 1
      prepare-release
  67. 2 2
      test/integration/test-bug-596498-trusted-unsigned-repo
  68. 34 21
      test/integration/test-bug-624218-Translation-file-handling
  69. 25 0
      test/integration/test-bug-712116-dpkg-pre-install-pkgs-hook-multiarch
  70. 77 1
      test/integration/test-bug-712435-missing-descriptions
  71. 28 0
      test/integration/test-bug-717891-abolute-uris-for-proxies
  72. 25 0
      test/integration/test-prefer-native-architecture-over-higher-priority
  73. 28 8
      test/interactive-helper/aptwebserver.cc

+ 13 - 2
apt-pkg/acquire-item.cc

@@ -1369,9 +1369,20 @@ void pkgAcqMetaIndex::QueueIndexes(bool verify)				/*{{{*/
    {
       HashString ExpectedIndexHash;
       const indexRecords::checkSum *Record = MetaIndexParser->Lookup((*Target)->MetaKey);
+      bool compressedAvailable = false;
       if (Record == NULL)
       {
-	 if (verify == true && (*Target)->IsOptional() == false)
+	 if ((*Target)->IsOptional() == true)
+	 {
+	    std::vector<std::string> types = APT::Configuration::getCompressionTypes();
+	    for (std::vector<std::string>::const_iterator t = types.begin(); t != types.end(); ++t)
+	       if (MetaIndexParser->Exists(string((*Target)->MetaKey).append(".").append(*t)) == true)
+	       {
+		  compressedAvailable = true;
+		  break;
+	       }
+	 }
+	 else if (verify == true)
 	 {
 	    Status = StatAuthError;
 	    strprintf(ErrorText, _("Unable to find expected entry '%s' in Release file (Wrong sources.list entry or malformed file)"), (*Target)->MetaKey.c_str());
@@ -1400,7 +1411,7 @@ void pkgAcqMetaIndex::QueueIndexes(bool verify)				/*{{{*/
 	 if ((*Target)->IsSubIndex() == true)
 	    new pkgAcqSubIndex(Owner, (*Target)->URI, (*Target)->Description,
 				(*Target)->ShortDesc, ExpectedIndexHash);
-	 else if (transInRelease == false || MetaIndexParser->Exists((*Target)->MetaKey) == true)
+	 else if (transInRelease == false || Record != NULL || compressedAvailable == true)
 	 {
 	    if (_config->FindB("Acquire::PDiffs",true) == true && transInRelease == true &&
 		MetaIndexParser->Exists(string((*Target)->MetaKey).append(".diff/Index")) == true)

+ 6 - 4
apt-pkg/contrib/error.cc

@@ -67,9 +67,10 @@ bool GlobalError::NAME (const char *Function, const char *Description,...) { \
 	int const errsv = errno; \
 	while (true) { \
 		va_start(args,Description); \
-		if (InsertErrno(TYPE, Function, Description, args, errsv, msgSize) == false) \
-			break; \
+		bool const retry = InsertErrno(TYPE, Function, Description, args, errsv, msgSize); \
 		va_end(args); \
+		if (retry == false) \
+			break; \
 	} \
 	return false; \
 }
@@ -88,9 +89,10 @@ bool GlobalError::InsertErrno(MsgType const &type, const char *Function,
 	int const errsv = errno;
 	while (true) {
 		va_start(args,Description);
-		if (InsertErrno(type, Function, Description, args, errsv, msgSize) == false)
-			break;
+		bool const retry = InsertErrno(type, Function, Description, args, errsv, msgSize);
 		va_end(args);
+		if (retry == false)
+		   break;
 	}
 	return false;
 }

+ 18 - 5
apt-pkg/contrib/fileutl.cc

@@ -1599,7 +1599,11 @@ unsigned long long FileFd::Size()
       char ignore[1000];
       unsigned long long read = 0;
       do {
-	 Read(ignore, sizeof(ignore), &read);
+	 if (Read(ignore, sizeof(ignore), &read) == false)
+	 {
+	    Seek(oldSeek);
+	    return 0;
+	 }
       } while(read != 0);
       size = Tell();
       Seek(oldSeek);
@@ -1616,10 +1620,16 @@ unsigned long long FileFd::Size()
 	* bits of the file */
        // FIXME: Size for gz-files is limited by 32bit… no largefile support
        if (lseek(iFd, -4, SEEK_END) < 0)
-	  return FileFdErrno("lseek","Unable to seek to end of gzipped file");
-       size = 0L;
+       {
+	  FileFdErrno("lseek","Unable to seek to end of gzipped file");
+	  return 0;
+       }
+       size = 0;
        if (read(iFd, &size, 4) != 4)
-	  return FileFdErrno("read","Unable to read original size of gzipped file");
+       {
+	  FileFdErrno("read","Unable to read original size of gzipped file");
+	  return 0;
+       }
 
 #ifdef WORDS_BIGENDIAN
        uint32_t tmp_size = size;
@@ -1629,7 +1639,10 @@ unsigned long long FileFd::Size()
 #endif
 
        if (lseek(iFd, oldPos, SEEK_SET) < 0)
-	  return FileFdErrno("lseek","Unable to seek in gzipped file");
+       {
+	  FileFdErrno("lseek","Unable to seek in gzipped file");
+	  return 0;
+       }
 
        return size;
    }

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

@@ -295,7 +295,7 @@ bool pkgDPkgPM::SendPkgsInfo(FILE * const F, unsigned int const &Version)
       if (CurVer.end() == true && (I->Op == Item::Remove || I->Op == Item::Purge))
 	 CurVer = FindNowVersion(I->Pkg);
 
-      else if (CurVer.end() == true)
+      if (CurVer.end() == true)
       {
 	 if (Version <= 2)
 	    fprintf(F, "- ");

+ 3 - 3
apt-pkg/depcache.cc

@@ -1007,9 +1007,6 @@ struct CompareProviders {
 	 else if ((B->Flags & pkgCache::Flag::Important) == pkgCache::Flag::Important)
 	    return true;
       }
-      // higher priority seems like a good idea
-      if (AV->Priority != BV->Priority)
-	 return AV->Priority > BV->Priority;
       // prefer native architecture
       if (strcmp(A.Arch(), B.Arch()) != 0)
       {
@@ -1024,6 +1021,9 @@ struct CompareProviders {
 	    else if (*a == B.Arch())
 	       return true;
       }
+      // higher priority seems like a good idea
+      if (AV->Priority != BV->Priority)
+	 return AV->Priority > BV->Priority;
       // unable to decide…
       return A->ID < B->ID;
    }

+ 2 - 2
buildlib/configure.mak

@@ -2,7 +2,7 @@
 
 # This make fragment is included by the toplevel make to handle configure
 # and setup. It defines a target called startup that when run will init
-# the build directory, generate configure from configure.in, create aclocal
+# the build directory, generate configure from configure.ac, create aclocal
 # and has rules to run config.status should one of the .in files change.
 
 # Input
@@ -48,7 +48,7 @@ missing-config-files:
 	@echo "http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD"
 	exit 100
 
-configure: aclocal.m4 configure.in buildlib/config.guess buildlib/config.sub
+configure: aclocal.m4 configure.ac buildlib/config.guess buildlib/config.sub
 	autoconf
 
 aclocal.m4: $(wildcard buildlib/*.m4)

+ 8 - 9
buildlib/defaults.mak

@@ -172,12 +172,11 @@ ifeq ($(NUM_PROCS),1)
   PARALLEL_RUN=no
 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
+ifndef PARALLEL_RUN
+ PARALLEL_RUN=yes
+ export PARALLEL_RUN
+ # handle recursion
+ ifneq ($(NUM_PROCS),)
+  MAKEFLAGS += -j $(NUM_PROCS)
+ endif
+endif

+ 57 - 27
cmdline/apt-cache.cc

@@ -1127,6 +1127,24 @@ bool Dotty(CommandLine &CmdL)
 // ---------------------------------------------------------------------
 /* This displays the package record from the proper package index file. 
    It is not used by DumpAvail for performance reasons. */
+
+static unsigned char const* skipDescriptionFields(unsigned char const * DescP)
+{
+   char const * const TagName = "\nDescription";
+   size_t const TagLen = strlen(TagName);
+   while ((DescP = (unsigned char*)strchr((char*)DescP, '\n')) != NULL)
+   {
+      if (DescP[1] == ' ')
+	 DescP += 2;
+      else if (strncmp((char*)DescP, TagName, TagLen) == 0)
+	 DescP += TagLen;
+      else
+	 break;
+   }
+   if (DescP != NULL)
+      ++DescP;
+   return DescP;
+}
 bool DisplayRecord(pkgCacheFile &CacheFile, pkgCache::VerIterator V)
 {
    pkgCache *Cache = CacheFile.GetPkgCache();
@@ -1150,11 +1168,12 @@ bool DisplayRecord(pkgCacheFile &CacheFile, pkgCache::VerIterator V)
    if (PkgF.Open(I.FileName(), FileFd::ReadOnly, FileFd::Extension) == false)
       return false;
 
-   // Read the record
-   unsigned char *Buffer = new unsigned char[Cache->HeaderP->MaxVerFileSize+1];
-   Buffer[V.FileList()->Size] = '\n';
-   if (PkgF.Seek(V.FileList()->Offset) == false ||
-       PkgF.Read(Buffer,V.FileList()->Size) == false)
+   // Read the record (and ensure that it ends with a newline and NUL)
+   unsigned char *Buffer = new unsigned char[Cache->HeaderP->MaxVerFileSize+2];
+   Buffer[Vf->Size] = '\n';
+   Buffer[Vf->Size+1] = '\0';
+   if (PkgF.Seek(Vf->Offset) == false ||
+       PkgF.Read(Buffer,Vf->Size) == false)
    {
       delete [] Buffer;
       return false;
@@ -1165,10 +1184,11 @@ bool DisplayRecord(pkgCacheFile &CacheFile, pkgCache::VerIterator V)
    if (DescP != NULL)
       ++DescP;
    else
-      DescP = Buffer + V.FileList()->Size;
+      DescP = Buffer + Vf->Size;
 
    // Write all but Description
-   if (fwrite(Buffer,1,DescP - Buffer,stdout) < (size_t)(DescP - Buffer))
+   size_t const length = DescP - Buffer;
+   if (length != 0 && FileFd::Write(STDOUT_FILENO, Buffer, length) == false)
    {
       delete [] Buffer;
       return false;
@@ -1184,35 +1204,37 @@ bool DisplayRecord(pkgCacheFile &CacheFile, pkgCache::VerIterator V)
       cout << std::endl << "Description-md5: " << Desc.md5() << std::endl;
 
       // Find the first field after the description (if there is any)
-      while ((DescP = (unsigned char*)strchr((char*)DescP, '\n')) != NULL)
-      {
-	 if (DescP[1] == ' ')
-	    DescP += 2;
-	 else if (strncmp((char*)DescP, "\nDescription", strlen("\nDescription")) == 0)
-	    DescP += strlen("\nDescription");
-	 else
-	    break;
-      }
-      if (DescP != NULL)
-	 ++DescP;
+      DescP = skipDescriptionFields(DescP);
    }
-   // if we have no translation, we found a lonely Description-md5, so don't skip it
+   // else we have no translation, so we found a lonely Description-md5 -> don't skip it
 
-   if (DescP != NULL)
+   // write the rest of the buffer, but skip mixed in Descriptions* fields
+   while (DescP != NULL)
    {
-      // write the rest of the buffer
-      const unsigned char *end=&Buffer[V.FileList()->Size];
-      if (fwrite(DescP,1,end-DescP,stdout) < (size_t)(end-DescP))
+      const unsigned char * const Start = DescP;
+      const unsigned char *End = (unsigned char*)strstr((char*)DescP, "\nDescription");
+      if (End == NULL)
+      {
+	 End = &Buffer[Vf->Size];
+	 DescP = NULL;
+      }
+      else
+      {
+	 ++End; // get the newline into the output
+	 DescP = skipDescriptionFields(End + strlen("Description"));
+      }
+      size_t const length = End - Start;
+      if (length != 0 && FileFd::Write(STDOUT_FILENO, Start, length) == false)
       {
 	 delete [] Buffer;
 	 return false;
       }
    }
 
-   // write a final newline (after the description)
+   // write a final newline after the last field
    cout<<endl;
-   delete [] Buffer;
 
+   delete [] Buffer;
    return true;
 }
 									/*}}}*/
@@ -1300,7 +1322,11 @@ bool Search(CommandLine &CmdL)
       pkgCache::VerIterator V = Plcy->GetCandidateVer(P);
       if (V.end() == false)
       {
-	 DFList[G->ID].Df = V.TranslatedDescription().FileList();
+	 pkgCache::DescIterator const D = V.TranslatedDescription();
+	 //FIXME: packages without a description can't be found
+	 if (D.end() == true)
+	    continue;
+	 DFList[G->ID].Df = D.FileList();
 	 DFList[G->ID].ID = G->ID;
       }
 
@@ -1315,7 +1341,11 @@ bool Search(CommandLine &CmdL)
 	    continue;
 
 	 unsigned long id = Prv.OwnerPkg().Group()->ID;
-	 DFList[id].Df = V.TranslatedDescription().FileList();
+	 pkgCache::DescIterator const D = V.TranslatedDescription();
+	 //FIXME: packages without a description can't be found
+	 if (D.end() == true)
+	    continue;
+	 DFList[id].Df = D.FileList();
 	 DFList[id].ID = id;
 
 	 size_t const PrvPatternOffset = id * NumPatterns;

+ 32 - 3
cmdline/apt-get.cc

@@ -130,13 +130,42 @@ class CacheFile : public pkgCacheFile
 /* Returns true on a Yes.*/
 bool YnPrompt(bool Default=true)
 {
+   /* nl_langinfo does not support LANGUAGE setting, so we unset it here
+      to have the help-message (hopefully) match the expected characters */
+   char * language = getenv("LANGUAGE");
+   if (language != NULL)
+      language = strdup(language);
+   if (language != NULL)
+      unsetenv("LANGUAGE");
+
+   if (Default == true)
+      // TRANSLATOR: Yes/No question help-text: defaulting to Y[es]
+      //             e.g. "Do you want to continue? [Y/n] "
+      //             The user has to answer with an input matching the
+      //             YESEXPR/NOEXPR defined in your l10n.
+      c2out << " " << _("[Y/n]") << " " << std::flush;
+   else
+      // TRANSLATOR: Yes/No question help-text: defaulting to N[o]
+      //             e.g. "Should this file be removed? [y/N] "
+      //             The user has to answer with an input matching the
+      //             YESEXPR/NOEXPR defined in your l10n.
+      c2out << " " << _("[y/N]") << " " << std::flush;
+
+   if (language != NULL)
+   {
+      setenv("LANGUAGE", language, 0);
+      free(language);
+   }
+
    if (_config->FindB("APT::Get::Assume-Yes",false) == true)
    {
+      // TRANSLATOR: "Yes" answer printed for a yes/no question if --assume-yes is set
       c1out << _("Y") << endl;
       return true;
    }
    else if (_config->FindB("APT::Get::Assume-No",false) == true)
    {
+      // TRANSLATOR: "No" answer printed for a yes/no question if --assume-no is set
       c1out << _("N") << endl;
       return false;
    }
@@ -1076,7 +1105,7 @@ static bool CheckAuth(pkgAcquire& Fetcher)
    if (_config->FindI("quiet",0) < 2
        && _config->FindB("APT::Get::Assume-Yes",false) == false)
    {
-      c2out << _("Install these packages without verification [y/N]? ") << flush;
+      c2out << _("Install these packages without verification?") << flush;
       if (!YnPrompt(false))
          return _error->Error(_("Some packages could not be authenticated"));
 
@@ -1281,8 +1310,8 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask = true,
 	 if (_config->FindI("quiet",0) < 2 &&
 	     _config->FindB("APT::Get::Assume-Yes",false) == false)
 	 {
-	    c2out << _("Do you want to continue [Y/n]? ") << flush;
-	 
+	    c2out << _("Do you want to continue?") << flush;
+
 	    if (YnPrompt() == false)
 	    {
 	       c2out << _("Abort.") << endl;

+ 3 - 7
configure.in

@@ -10,15 +10,15 @@ dnl need a C++ compiler that is semi-standard conformant, exceptions are
 dnl not used but STL is.
 
 dnl 'make -f Makefile startup' will generate the configure file from 
-dnl configure.in correctly and can be run at any time
+dnl configure.ac correctly and can be run at any time
 
 AC_PREREQ(2.50)
-AC_INIT(configure.in)
+AC_INIT(configure.ac)
 AC_CONFIG_AUX_DIR(buildlib)
 AC_CONFIG_HEADER(include/config.h:buildlib/config.h.in include/apti18n.h:buildlib/apti18n.h.in)
 
 PACKAGE="apt"
-PACKAGE_VERSION="0.9.7.6ubuntu2"
+PACKAGE_VERSION="0.9.9.4"
 PACKAGE_MAIL="APT Development Team <deity@lists.debian.org>"
 AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE")
 AC_DEFINE_UNQUOTED(PACKAGE_VERSION,"$PACKAGE_VERSION")
@@ -180,10 +180,6 @@ AC_SUBST(DOTDIR)
 ah_NUM_PROCS
 ah_GCC3DEP
 
-dnl It used to be that the user could select translations and that could get
-dnl passed to the makefiles, but now that can only work if you use special
-dnl gettext approved makefiles, so this feature is unsupported by this.
-ALL_LINGUAS="bg bs ca cs cy da de dz el es eu fi fr gl hu it ja ko ku nb nl nn pl pt_BR pt ro ru sk sl sv th tl uk vi zn_CN zh_TW"
 AM_GNU_GETTEXT(external)
 if test x"$USE_NLS" = "xyes"; then
    AC_DEFINE(USE_NLS)

+ 1 - 1
debian/apt.auto-removal.sh

@@ -42,7 +42,7 @@ version_test_gt ()
 	return "$?"
 }
 
-list=$(${DPKG} -l 'linux-image-[0-9]*'|awk '/^ii/ { print $2 }' | sed -e's/linux-image-//')
+list=$(${DPKG} -l 'linux-image-[0-9]*'|awk '/^ii/ && $2 !~ /-dbg$/ { print $2 }' | sed -e's/linux-image-//')
 
 latest_version=""
 previous_version=""

+ 4 - 0
debian/apt.postinst

@@ -28,6 +28,10 @@ case "$1" in
             chmod -f 0640 /var/log/apt/term.log* || true
         fi
 
+        # create kernel autoremoval blacklist on update
+        if dpkg --compare-versions "$2" lt-nl 0.9.9.3; then
+            /etc/kernel/postinst.d/apt-auto-removal
+        fi
     ;;
 
     abort-upgrade|abort-remove|abort-deconfigure)

+ 50 - 0
debian/changelog

@@ -1,3 +1,53 @@
+apt (0.9.9.5) UNRELEASED; urgency=low
+
+  * Vietnamese translation update. Closes: #718615
+
+ -- Christian Perrier <bubulle@debian.org>  Sat, 03 Aug 2013 16:06:55 +0200
+
+apt (0.9.9.4) unstable; urgency=low
+
+  [ David Kalnischkies ]
+  * pick up Translation-* even if only compressed available (Closes: 717665)
+  * request absolute URIs from proxies again (0.9.9.3 regession)
+    (Closes: 717891)
+  
+  [ Michael vogt ]
+  * fix missing changelog entry for 0.9.9.3 (git-dch issue)
+
+ -- Michael Vogt <mvo@debian.org>  Fri, 26 Jul 2013 09:58:17 +0200
+
+apt (0.9.9.3) unstable; urgency=low
+
+  [ Ben Hutchings ]
+  * debian/apt.auto-removal.sh:
+    - do not include debug symbol packages for the kernel in the 
+      blacklist (closes: #717616)
+  
+  [ Michael Vogt ]
+  * debian/apt.postinst:
+    - run /etc/kernel/postinst.d/apt-auto-removal once on upgrade
+      to ensure that the correct auto-removal list is generated
+      (closes: #717615)
+
+  [ David Kalnischkies ]
+  * skip all Description fields in apt-cache, not just first (Closes: 717254)
+  * fix 'apt-cache search' crash with missing description (Closes: 647590)
+
+  [ Raphael Geissert ]
+  * Do not send a connection: keep-alive, at all
+  
+ -- Michael Vogt <mvo@debian.org>  Thu, 25 Jul 2013 17:14:58 +0200
+
+apt (0.9.9.2) unstable; urgency=low
+
+  [ Programs translations ]
+  * Vietnamese updated by Tran Ngoc Quan. Closes: #717016
+
+  [ David Kalnischkies ]
+  * fix if-clause to generate hook-info for 'rc' packages (Closes: 717006)
+
+ -- Michael Vogt <mvo@debian.org>  Wed, 17 Jul 2013 14:56:34 +0200
+
 apt (0.9.9.1) unstable; urgency=low
 
   [ Michael Vogt ]

+ 4 - 4
debian/control

@@ -5,7 +5,7 @@ Maintainer: APT Development Team <deity@lists.debian.org>
 Uploaders: Michael Vogt <mvo@debian.org>, Otavio Salvador <otavio@debian.org>,
  Christian Perrier <bubulle@debian.org>, Daniel Burrows <dburrows@debian.org>,
  Julian Andres Klode <jak@debian.org>
-Standards-Version: 3.9.3
+Standards-Version: 3.9.4
 Build-Depends: dpkg-dev (>= 1.15.8), debhelper (>= 8.1.3~), libdb-dev,
  gettext (>= 0.12), libcurl4-gnutls-dev (>= 7.19.4~),
  zlib1g-dev, libbz2-dev, xsltproc, docbook-xsl, docbook-xml,
@@ -43,7 +43,7 @@ Pre-Depends: ${misc:Pre-Depends}
 Depends: ${shlibs:Depends}, ${misc:Depends}
 Breaks: apt (<< 0.9.4~)
 Section: libs
-Description: package managment runtime library
+Description: package management runtime library
  This library provides the common functionality for searching and
  managing packages as well as information about packages.
  Higher-level package managers can depend upon this library.
@@ -107,9 +107,9 @@ Package: apt-utils
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}
 Suggests: xz-utils
-Description: package managment related utility programs
+Description: package management related utility programs
  This package contains some less used commandline utilities related
- to package managment with APT.
+ to package management with APT.
  .
   * apt-extracttemplates is used by debconf to prompt for configuration
     questions before installation.

+ 1 - 5
debian/libapt-inst1.5.symbols

@@ -81,12 +81,8 @@ libapt-inst.so.1.5 libapt-inst1.5 #MINVER#
  (c++|optional)"vtable for pkgCache::VerIterator@Base" 0.8.0
  (c++|optional)"vtable for pkgCache::Iterator<pkgCache::Dependency, pkgCache::DepIterator>@Base" 0.8.0
  (c++|optional)"vtable for pkgCache::Iterator<pkgCache::Version, pkgCache::VerIterator>@Base" 0.8.0
-### gcc-4.4 specific
-# (c++|regex|optional=std)"^char\* std::[^ ]+<.+ >::_.+@Base$" 0.8.0
-# (c++|optional=std)"std::basic_string<char, std::char_traits<char>, std::allocator<char> >& std::basic_string<char, std::char_traits<char>, std::allocator<char> >::append<unsigned char*>(unsigned char*, unsigned char*)@Base" 0.8.0
-### gcc-4.6 specific
+### gcc artefacts
  (c++|optional=std)"std::vector<APT::Configuration::Compressor, std::allocator<APT::Configuration::Compressor> >::~vector()@Base" 0.8.12
- (c++|optional=std)"std::basic_string<char, std::char_traits<char>, std::allocator<char> >& std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_replace_dispatch<unsigned char*>(__gnu_cxx::__normal_iterator<char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, __gnu_cxx::__normal_iterator<char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, unsigned char*, unsigned char*, std::__false_type)@Base" 0.8.0
 ### try to ignore std:: template instances
  (c++|regex|optional=std)"^std::basic_string<.+ >\(.+\)@Base$" 0.8.0
  (c++|regex|optional=std)"^typeinfo name for std::iterator<.*>@Base$" 0.8.0

Разница между файлами не показана из-за своего большого размера
+ 52 - 69
debian/libapt-pkg4.12.symbols


+ 22 - 17
debian/rules

@@ -66,7 +66,7 @@ LIBAPT_INST=libapt-inst$(LIBAPTINST_MAJOR)
 # do not fail as we are just experimenting with symbol files for now
 export DPKG_GENSYMBOLS_CHECK_LEVEL=0
 
-build: build/build-stamp
+build-binary: build/build-binary-stamp
 build-debiandoc: build/build-debiandoc-stamp
 build-manpages: build/build-manpages-stamp
 
@@ -76,15 +76,15 @@ build-manpages: build/build-manpages-stamp
 build/environment.mak: build/configure-stamp
 	@true
 
-configure: configure.in
-build/configure-stamp: configure
+configure: configure.ac
+build/configure-stamp: configure buildlib/config.sub buildlib/config.guess
 	dh_testdir
 	-mkdir build
 	cp COPYING debian/copyright
 	cd build && CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" CPPFLAGS="$(CPPFLAGS)" ../configure $(confflags)
 	touch $@
 
-build/build-stamp: build/configure-stamp
+build/build-binary-stamp: build/configure-stamp
 	# Add here commands to compile the package.
 	$(MAKE) binary
 	# compat symlink for the locale split
@@ -116,11 +116,12 @@ clean:
 	rm -rf build
 	rm -f debian/$(LIBAPT_PKG).install debian/$(LIBAPT_INST).install \
 	      debian/libapt-pkg-dev.install
+	test ! -L buildlib/config.guess || rm -f buildlib/config.guess
+	test ! -L buildlib/config.sub || rm -f buildlib/config.sub
 
 debian/%.install: debian/%.install.in
 	sed 's/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/g' $< > $@
 
-binary-indep: apt-doc libapt-pkg-doc
 # Build architecture-independent files here.
 libapt-pkg-doc: build-debiandoc
 	dh_testdir -p$@
@@ -172,9 +173,8 @@ apt-doc: build-debiandoc
 
 # Build architecture-dependent files here.
 
-binary-arch: $(LIBAPT_PKG) $(LIBAPT_INST) apt libapt-pkg-dev apt-utils apt-transport-https
 apt_MANPAGES = apt apt-cache apt-cdrom apt-config apt-get apt-key apt-mark apt-secure apt apt.conf apt_preferences sources.list
-apt: build build-manpages
+apt: build-binary build-manpages
 	dh_testdir -p$@
 	dh_testroot -p$@
 	dh_prep -p$@
@@ -220,7 +220,7 @@ apt: build build-manpages
 	dh_md5sums -p$@
 	dh_builddeb -p$@
 
-libapt-pkg-dev: build debian/libapt-pkg-dev.install
+libapt-pkg-dev: build-binary debian/libapt-pkg-dev.install
 	dh_testdir -p$@
 	dh_testroot -p$@
 	dh_prep -p$@
@@ -240,7 +240,7 @@ libapt-pkg-dev: build debian/libapt-pkg-dev.install
 	dh_builddeb -p$@
 
 apt-utils_MANPAGES = apt-sortpkgs apt-ftparchive apt-extracttemplates
-apt-utils: build build-manpages
+apt-utils: build-binary build-manpages
 	dh_testdir -p$@
 	dh_testroot -p$@
 	dh_prep -p$@
@@ -269,7 +269,7 @@ apt-utils: build build-manpages
 	dh_md5sums -p$@
 	dh_builddeb -p$@
 
-$(LIBAPT_PKG): build debian/$(LIBAPT_PKG).install
+$(LIBAPT_PKG): build-binary debian/$(LIBAPT_PKG).install
 	dh_testdir -p$@
 	dh_testroot -p$@
 	dh_prep -p$@
@@ -288,7 +288,7 @@ $(LIBAPT_PKG): build debian/$(LIBAPT_PKG).install
 	dh_md5sums -p$@
 	dh_builddeb -p$@
 
-$(LIBAPT_INST): build debian/$(LIBAPT_INST).install
+$(LIBAPT_INST): build-binary debian/$(LIBAPT_INST).install
 	dh_testdir -p$@
 	dh_testroot -p$@
 	dh_prep -p$@
@@ -307,7 +307,7 @@ $(LIBAPT_INST): build debian/$(LIBAPT_INST).install
 	dh_md5sums -p$@
 	dh_builddeb -p$@
 
-apt-transport-https: build libapt-pkg-dev
+apt-transport-https: build-binary libapt-pkg-dev
 	dh_testdir -p$@
 	dh_testroot -p$@
 	dh_prep -p$@
@@ -330,13 +330,18 @@ apt-transport-https: build libapt-pkg-dev
 	dh_md5sums -p$@
 	dh_builddeb -p$@
 
+buildlib/config.guess buildlib/config.sub:
+	$(MAKE) "$@"
+
 configure:
 	$(MAKE) configure
 
-really-clean: clean
-	-find . -name Makefile.in -print0 | xargs --null --no-run-if-empty -- rm -f
-	find -name ChangeLog | xargs rm -f
-	rm -f l33ch-stamp
-
+# translate targets to targets required by debian-policy
+binary-arch: $(LIBAPT_PKG) $(LIBAPT_INST) apt libapt-pkg-dev apt-utils apt-transport-https
+binary-indep: apt-doc libapt-pkg-doc
 binary: binary-indep binary-arch
+build-arch: build-binary
+build-indep: build-manpages build-debiandoc
+build: build-indep build-arch
+
 .PHONY: build clean binary-indep binary-arch binary

Разница между файлами не показана из-за своего большого размера
+ 522 - 146
doc/Doxyfile.in


+ 19 - 20
methods/http.cc

@@ -682,28 +682,27 @@ void HttpMethod::SendReq(FetchItem *Itm,CircleBuf &Out)
    // Just in case.
    if (Itm->Uri.length() >= sizeof(Buf))
        abort();
-       
-   /* Build the request. We include a keep-alive header only for non-proxy
-      requests. This is to tweak old http/1.0 servers that do support keep-alive
-      but not HTTP/1.1 automatic keep-alive. Doing this with a proxy server 
-      will glitch HTTP/1.0 proxies because they do not filter it out and 
-      pass it on, HTTP/1.1 says the connection should default to keep alive
-      and we expect the proxy to do this */
+
+   /* RFC 2616 §5.1.2 requires absolute URIs for requests to proxies,
+      but while its a must for all servers to accept absolute URIs,
+      it is assumed clients will sent an absolute path for non-proxies */
+   std::string requesturi;
    if (Proxy.empty() == true || Proxy.Host.empty())
-   {
-      // see LP bugs #1003633 and #1086997. The "+" is encoded as a workaround
-      // for a amazon S3 bug
-      sprintf(Buf,"GET %s HTTP/1.1\r\nHost: %s\r\nConnection: keep-alive\r\n",
-	      QuoteString(Uri.Path,"+~ ").c_str(),ProperHost.c_str());
-   }
+      requesturi = Uri.Path;
    else
-   {
-      /* Generate a cache control header if necessary. We place a max
-       	 cache age on index files, optionally set a no-cache directive
-       	 and a no-store directive for archives. */
-      sprintf(Buf,"GET %s HTTP/1.1\r\nHost: %s\r\n",
-	      Itm->Uri.c_str(),ProperHost.c_str());
-   }
+      requesturi = Itm->Uri;
+
+   // The "+" is encoded as a workaround for a amazon S3 bug
+   // see LP bugs #1003633 and #1086997.
+   requesturi = QuoteString(requesturi, "+~ ");
+
+   /* Build the request. No keep-alive is included as it is the default
+      in 1.1, can cause problems with proxies, and we are an HTTP/1.1
+      client anyway.
+      C.f. https://tools.ietf.org/wg/httpbis/trac/ticket/158 */
+   sprintf(Buf,"GET %s HTTP/1.1\r\nHost: %s\r\n",
+	   requesturi.c_str(),ProperHost.c_str());
+
    // generate a cache control header (if needed)
    if (_config->FindB("Acquire::http::No-Cache",false) == true) 
    {

+ 7 - 1
po/LINGUAS

@@ -1 +1,7 @@
-ar ast bg bs ca cs cy da de dz el es eu fi fr gl hu it ja km ko ku lt mr nb ne nl nn pl pt pt_BR ro ru sk sl sv th tl uk vi zh_CN zh_TW
+## If a language isn't listed here but a po file is available the build will fail.
+## If a language is disabled deliberately, list it in a line starting with a single '#'
+
+ar ast bg bs ca cs cy da de dz el es eu fi fr gl hu it ja km ko ku lt mr nb ne nl nn pl pt pt_BR ro ru sk sl sv th tl tr uk vi zh_CN zh_TW
+
+## disabled by translator request #313283:
+# he

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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


+ 15 - 5
po/makefile

@@ -14,7 +14,7 @@ SUBDIR=po
 # Bring in the default rules
 include ../buildlib/defaults.mak
 
-CATALOGS := $(addsuffix .gmo,$(shell cat LINGUAS))
+CATALOGS := $(addsuffix .gmo, $(shell sed -e '/^\#/ d' -e '/^$$/ d' LINGUAS | tr '\n' ' '))
 DOMAINS := $(notdir $(wildcard $(PO_DOMAINS)/*))
 POTFILES := $(addsuffix .pot,$(addprefix $(PO)/,$(DOMAINS)))
 
@@ -66,10 +66,10 @@ $(MOFILES) : $(PO_DOMAINS)/%.mo : $(PO_DOMAINS)/%.po
 	mkdir -p $(LOCALE)/$(notdir $*)/LC_MESSAGES/
 	cp $@ $(LOCALE)/$(notdir $*)/LC_MESSAGES/$(call GETDOMAIN,$*).mo
 
-stats:
+stats: all-linguas-enabled
 	for i in *.pot *.po; do echo -n "$$i: "; msgfmt --output-file=/dev/null --statistics $$i; done
 
-binary: $(POTFILES) $(MOFILES)
+binary: $(POTFILES) $(MOFILES) all-linguas-enabled
 
 $(PACKAGE)-all.pot: $(POTFILES)
 	# we create our partial pot files without a header to avoid changing dates in *.mo files,
@@ -80,8 +80,8 @@ $(PACKAGE)-all.pot: $(POTFILES)
 	$(MSGCOMM) --more-than=0 $(PO)/$(PACKAGE)-dummy.pot $(POTFILES) --output=$(PACKAGE)-all.pot
 	rm -f $(PO)/$(PACKAGE)-dummy.pot
 
-.PHONY: update-po
-update-po: $(PACKAGE)-all.pot
+.PHONY: update-po all-linguas-enabled
+update-po: $(PACKAGE)-all.pot all-linguas-enabled
 	for lang in ${LINGUAS}; do \
 	echo "Updating $$lang.po"; \
 	$(MSGMERGE) $$lang.po $(PACKAGE)-all.pot -o $$lang.new.po; \
@@ -89,6 +89,16 @@ update-po: $(PACKAGE)-all.pot
 	rm -f $$lang.new.po; \
 	done
 
+all-linguas-enabled: LINGUAS
+ifdef NOISY
+	echo "Available Translations: $(shell ls *.po | cut -d'.' -f 1 | sort | tr '\n' ' ')"
+	echo "Mentioned Translations: $(shell sed -e '/^\#\#/ d' -e '/^$$/ d' -e 's/# //' LINGUAS | tr ' ' '\n' | sort | tr '\n' ' ')"
+	echo "Build Translations:     $(shell echo "$(LINGUAS)" | tr ' ' '\n' | sort | tr '\n' ' ')"
+endif
+	test "$(shell ls *.po | cut -d'.' -f 1 | sort | tr '\n' ' ')" = \
+	   "$(shell sed -e '/^\#\#/ d' -e '/^$$/ d' -e 's/# //' LINGUAS | tr ' ' '\n' | sort | tr '\n' ' ')" || \
+	   ( echo "ERROR: Not all available translations are mentioned in po/LINGUAS!"; exit 100)
+
 clean: clean/local
 clean/local:
 	rm -f $(MOFILES) $(LANG_POFILES) $(PO)/*.d

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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


+ 1 - 1
prepare-release

@@ -39,7 +39,7 @@ if [ "$1" = 'pre-export' ]; then
 		make update-po
 	fi
 
-	sed -i -e "s/^PACKAGE_VERSION=\".*\"$/PACKAGE_VERSION=\"${VERSION}\"/" configure.in
+	sed -i -e "s/^PACKAGE_VERSION=\".*\"$/PACKAGE_VERSION=\"${VERSION}\"/" configure.ac
 	sed -i -e "s/^<!ENTITY apt-product-version \".*\">$/<!ENTITY apt-product-version \"${VERSION}\">/" doc/apt-verbatim.ent
 elif [ "$1" = 'post-build' ]; then
 	if [ "$DISTRIBUTION" != "UNRELEASED" ]; then

+ 2 - 2
test/integration/test-bug-596498-trusted-unsigned-repo

@@ -27,7 +27,7 @@ aptgetupdate
 testequal "$PKGTEXT
 WARNING: The following packages cannot be authenticated!
   cool
-Install these packages without verification [y/N]? N
+Install these packages without verification? [y/N] N
 E: Some packages could not be authenticated" aptget install cool --assume-no -d
 
 find aptarchive/ \( -name 'Release.gpg' -o -name 'InRelease' \) -delete
@@ -37,7 +37,7 @@ aptgetupdate
 testequal "$PKGTEXT
 WARNING: The following packages cannot be authenticated!
   cool
-Install these packages without verification [y/N]? N
+Install these packages without verification? [y/N] N
 E: Some packages could not be authenticated" aptget install cool --assume-no -d
 
 sed -i -e 's#deb#deb [trusted=yes]#' $DEBFILE

+ 34 - 21
test/integration/test-bug-624218-Translation-file-handling

@@ -14,34 +14,47 @@ changetowebserver
 
 rm -rf rootdir/var/lib/apt/lists
 
-msgtest 'No download of non-existent locals' 'with Index'
-LC_ALL="" aptget update -o Acquire::Languages=en | grep -q -e 'Translation-[^e][^n] ' && msgfail || msgpass
-rm -rf rootdir/var/lib/apt/lists
+translationslisted() {
+	msgtest 'No download of non-existent locals' "$1"
+	LC_ALL="" aptget update -o Acquire::Languages=en | grep -q -e 'Translation-[^e][^n] ' && msgfail || msgpass
+	rm -rf rootdir/var/lib/apt/lists
 
-msgtest 'Download of existent locals' 'with Index'
-LC_ALL="" aptget update | grep -q -e 'Translation-en ' && msgpass || msgfail
-rm -rf rootdir/var/lib/apt/lists
+	msgtest 'Download of existent locals' "$1"
+	LC_ALL="" aptget update | grep -q -e 'Translation-en ' && msgpass || msgfail
+	rm -rf rootdir/var/lib/apt/lists
 
-msgtest 'Download of en in LC_ALL=C' 'with Index'
-LC_ALL=C aptget update | grep -q -e 'Translation-en ' && msgpass || msgfail
-rm -rf rootdir/var/lib/apt/lists
+	msgtest 'Download of en in LC_ALL=C' "$1"
+	LC_ALL=C aptget update | grep -q -e 'Translation-en ' && msgpass || msgfail
+	rm -rf rootdir/var/lib/apt/lists
 
-msgtest 'Download of en as forced language' 'with Index'
-aptget update -o Acquire::Languages=en | grep -q -e 'Translation-en ' && msgpass || msgfail
-rm -rf rootdir/var/lib/apt/lists
+	msgtest 'Download of en as forced language' "$1"
+	aptget update -o Acquire::Languages=en | grep -q -e 'Translation-en ' && msgpass || msgfail
+	rm -rf rootdir/var/lib/apt/lists
 
-msgtest 'Download of nothing else in forced language' 'with Index'
-aptget update -o Acquire::Languages=en | grep -q -e 'Translation-[^e][^n] ' && msgfail || msgpass
-rm -rf rootdir/var/lib/apt/lists
+	msgtest 'Download of nothing else in forced language' "$1"
+	aptget update -o Acquire::Languages=en | grep -q -e 'Translation-[^e][^n] ' && msgfail || msgpass
+	rm -rf rootdir/var/lib/apt/lists
 
-msgtest 'Download no Translation- if forced language is non-existent' 'with Index'
-aptget update -o Acquire::Languages=ast_DE | grep -q -e 'Translation-' && msgfail || msgpass
-rm -rf rootdir/var/lib/apt/lists
+	msgtest 'Download no Translation- if forced language is non-existent' "$1"
+	aptget update -o Acquire::Languages=ast_DE | grep -q -e 'Translation-' && msgfail || msgpass
+	rm -rf rootdir/var/lib/apt/lists
+
+	msgtest 'Download of nothing if none is forced' "$1"
+	aptget update -o Acquire::Languages=none | grep -q -e 'Translation' && msgfail || msgpass
+	rm -rf rootdir/var/lib/apt/lists
+}
+
+translationslisted 'with full Index'
+
+
+# only compressed files available (as it happens on CD-ROM)
+sed -i '/i18n\/Translation-[^.]*$/ d' $(find aptarchive -name 'Release')
+signreleasefiles
+
+translationslisted 'with partial Index'
 
-msgtest 'Download of nothing if none is forced' 'with Index'
-aptget update -o Acquire::Languages=none | grep -q -e 'Translation' && msgfail || msgpass
-rm -rf rootdir/var/lib/apt/lists
 
+# no records at all about Translation files (fallback to guessing)
 sed -i '/i18n\/Translation-.*$/ d' $(find aptarchive -name 'Release')
 signreleasefiles
 

+ 25 - 0
test/integration/test-bug-712116-dpkg-pre-install-pkgs-hook-multiarch

@@ -13,6 +13,13 @@ buildsimplenativepackage 'libsame' 'i386,amd64' '2' 'unstable' 'Multi-Arch: same
 buildsimplenativepackage 'stuff' 'i386,amd64' '1' 'stable' 'Depends: libsame (= 1), toolkit (= 1)'
 buildsimplenativepackage 'stuff' 'i386,amd64' '2' 'unstable' 'Depends: libsame (= 2), toolkit (= 2)'
 
+setupsimplenativepackage 'confpkg' 'amd64' '1' 'unstable'
+BUILDDIR='incoming/confpkg-1'
+echo 'foo "bar";' > ${BUILDDIR}/pkg.conf
+echo 'pkg.conf	/etc/pkg.conf' >> ${BUILDDIR}/debian/install
+buildpackage "$BUILDDIR" 'unstable' 'main' 'amd64'
+rm -rf "$BUILDDIR"
+
 setupaptarchive
 
 hook='pre-install-pkgs'
@@ -93,3 +100,21 @@ testfileequal "${hook}-v3.list" 'libsame 2 amd64 same > - - none **REMOVE**
 stuff 2 i386 none > - - none **REMOVE**
 libsame 2 i386 same > - - none **REMOVE**
 toolkit 2 amd64 foreign > - - none **REMOVE**'
+
+observehook install confpkg
+testfileequal "${hook}-v2.list" 'confpkg - < 1 **CONFIGURE**'
+testfileequal "${hook}-v3.list" 'confpkg - - none < 1 amd64 none **CONFIGURE**'
+
+observehook remove confpkg
+testfileequal "${hook}-v2.list" 'confpkg 1 > - **REMOVE**'
+testfileequal "${hook}-v3.list" 'confpkg 1 amd64 none > - - none **REMOVE**'
+
+msgtest 'Conffiles of package remained after remove' 'confpkg'
+dpkg -l confpkg | grep -q '^rc' && msgpass || msgfail
+
+observehook purge confpkg
+testfileequal "${hook}-v2.list" 'confpkg 1 > - **REMOVE**'
+testfileequal "${hook}-v3.list" 'confpkg 1 amd64 none > - - none **REMOVE**'
+
+msgtest 'Conffiles are gone after purge' 'confpkg'
+dpkg -l confpkg 2>/dev/null | grep -q '^rc' && msgfail || msgpass

+ 77 - 1
test/integration/test-bug-712435-missing-descriptions

@@ -52,7 +52,32 @@ $PACKAGESTANZA
 Description-md5: dddddddddddddddddddddddddddddddd
 
 Package: apt-none
-$PACKAGESTANZA" > aptarchive/Packages
+$PACKAGESTANZA
+
+Package: apt-intermixed
+$PACKAGESTANZA
+$DESCRIPTION
+X-Some-Flag: yes
+Description-md5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+
+Package: apt-intermixed2
+$PACKAGESTANZA
+$DESCRIPTION
+X-Some-Flag: yes
+$TRANSDESCRIPTION
+X-Foo-Flag: Something with a Description
+Description-md5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+X-Bar-Flag: no
+
+Package: apt-intermixed3
+$PACKAGESTANZA
+$DESCRIPTION
+X-Some-Flag: yes
+$TRANSDESCRIPTION
+X-Foo-Flag: Something with a Description
+X-Bar-Flag: no
+Description-md5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" > aptarchive/Packages
+
 
 setupaptarchive
 
@@ -87,3 +112,54 @@ Description-md5: dddddddddddddddddddddddddddddddd
 testequal "Package: apt-none
 $PACKAGESTANZA
 " aptcache show apt-none
+
+testequal "Package: apt-intermixed
+$PACKAGESTANZA
+$DESCRIPTION
+Description-md5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+X-Some-Flag: yes
+" aptcache show apt-intermixed
+
+testequal "Package: apt-intermixed2
+$PACKAGESTANZA
+$DESCRIPTION
+Description-md5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+X-Some-Flag: yes
+X-Foo-Flag: Something with a Description
+X-Bar-Flag: no
+" aptcache show apt-intermixed2
+
+testequal "Package: apt-intermixed3
+$PACKAGESTANZA
+$DESCRIPTION
+Description-md5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+X-Some-Flag: yes
+X-Foo-Flag: Something with a Description
+X-Bar-Flag: no
+" aptcache show apt-intermixed3
+
+msgtest 'Test that no description does not destroy' 'showpkg'
+aptcache showpkg apt-none | sed 's#/tmp/.*_aptarchive_#/tmp/aptarchive_#' >showpkg.explosion && msgpass || msgfail
+testfileequal showpkg.explosion 'Package: apt-none
+Versions: 
+0.9.7.8 (/tmp/aptarchive_Packages)
+
+
+Reverse Depends: 
+Dependencies: 
+0.9.7.8 - 
+Provides: 
+0.9.7.8 - 
+Reverse Provides: '
+
+testempty aptcache search nonexistentstring
+
+# packages without a description can't be found
+testequal 'apt-normal - commandline package manager
+apt-both-below - commandline package manager
+apt-both-middle - commandline package manager
+apt-both-top - commandline package manager
+apt-trans - commandline package manager
+apt-intermixed - commandline package manager
+apt-intermixed2 - commandline package manager
+apt-intermixed3 - commandline package manager' aptcache search apt

+ 28 - 0
test/integration/test-bug-717891-abolute-uris-for-proxies

@@ -0,0 +1,28 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture 'amd64'
+
+buildsimplenativepackage 'unrelated' 'all' '0.5~squeeze1' 'unstable'
+
+setupaptarchive
+changetowebserver --request-absolute='uri'
+
+msgtest 'Check that absolute paths are' 'not accepted'
+aptget update >/dev/null 2>&1 && msgfail || msgpass
+
+echo 'Acquire::http::Proxy "http://localhost:8080";' > rootdir/etc/apt/apt.conf.d/99proxy
+
+msgtest 'Check that requests to proxies are' 'absolute uris'
+aptget update >/dev/null 2>&1 && msgpass || msgfail
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following NEW packages will be installed:
+  unrelated
+0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
+Inst unrelated (0.5~squeeze1 unstable [all])
+Conf unrelated (0.5~squeeze1 unstable [all])' aptget install unrelated -s

+ 25 - 0
test/integration/test-prefer-native-architecture-over-higher-priority

@@ -0,0 +1,25 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture 'amd64' 'arm64'
+
+insertpackage 'unstable' 'm4' 'amd64' '1' 'Multi-Arch: foreign' 'optional'
+insertpackage 'unstable' 'm4' 'arm64' '1' 'Multi-Arch: foreign' 'standard'
+insertpackage 'unstable' 'autoconf' 'all' '1' 'Depends: m4'
+
+setupaptarchive
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following extra packages will be installed:
+  m4
+The following NEW packages will be installed:
+  autoconf m4
+0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
+Inst m4 (1 unstable [amd64])
+Inst autoconf (1 unstable [all])
+Conf m4 (1 unstable [amd64])
+Conf autoconf (1 unstable [all])' aptget install autoconf -s

+ 28 - 8
test/interactive-helper/aptwebserver.cc

@@ -319,6 +319,33 @@ bool parseFirstLine(int const client, std::string const &request,	/*{{{*/
       sendError(client, 500, request, sendContent, "Filename contains an unencoded space");
       return false;
    }
+
+   std::string host = LookupTag(request, "Host", "");
+   if (host.empty() == true)
+   {
+      // RFC 2616 §14.23 requires Host
+      sendError(client, 400, request, sendContent, "Host header is required");
+      return false;
+   }
+   host = "http://" + host;
+
+   // Proxies require absolute uris, so this is a simple proxy-fake option
+   std::string const absolute = _config->Find("aptwebserver::request::absolute", "uri,path");
+   if (strncmp(host.c_str(), filename.c_str(), host.length()) == 0)
+   {
+      if (absolute.find("uri") == std::string::npos)
+      {
+	 sendError(client, 400, request, sendContent, "Request is absoluteURI, but configured to not accept that");
+	 return false;
+      }
+      // strip the host from the request to make it an absolute path
+      filename.erase(0, host.length());
+   }
+   else if (absolute.find("path") == std::string::npos)
+   {
+      sendError(client, 400, request, sendContent, "Request is absolutePath, but configured to not accept that");
+      return false;
+   }
    filename = DeQuoteString(filename);
 
    // this is not a secure server, but at least prevent the obvious …
@@ -342,6 +369,7 @@ int main(int const argc, const char * argv[])
 {
    CommandLine::Args Args[] = {
       {0, "port", "aptwebserver::port", CommandLine::HasArg},
+      {0, "request-absolute", "aptwebserver::request::absolute", CommandLine::HasArg},
       {'c',"config-file",0,CommandLine::ConfigFile},
       {'o',"option",0,CommandLine::ArbItem},
       {0,0,0,0}
@@ -447,14 +475,6 @@ int main(int const argc, const char * argv[])
 	    if (parseFirstLine(client, *m, filename, sendContent, closeConnection) == false)
 	       continue;
 
-	    std::string host = LookupTag(*m, "Host", "");
-	    if (host.empty() == true)
-	    {
-	       // RFC 2616 §14.23 requires Host
-	       sendError(client, 400, *m, sendContent, "Host header is required");
-	       continue;
-	    }
-
 	    // string replacements in the requested filename
 	    ::Configuration::Item const *Replaces = _config->Tree("aptwebserver::redirect::replace");
 	    if (Replaces != NULL)