Przeglądaj źródła

merge debian/sid into debian/experimental

David Kalnischkies 11 lat temu
rodzic
commit
d61960d924
78 zmienionych plików z 48773 dodań i 51183 usunięć
  1. 1 1
      apt-pkg/algorithms.cc
  2. 6 4
      apt-pkg/cacheiterators.h
  3. 32 6
      apt-pkg/deb/debsrcrecords.cc
  4. 1 0
      apt-pkg/deb/debsrcrecords.h
  5. 12 4
      apt-pkg/deb/dpkgpm.cc
  6. 0 6
      apt-pkg/pkgcache.cc
  7. 30 1
      apt-pkg/srcrecords.cc
  8. 7 2
      apt-pkg/srcrecords.h
  9. 4 4
      cmdline/apt-get.cc
  10. 1 1
      configure.ac
  11. 1 1
      debian/apt.auto-removal.sh
  12. 86 0
      debian/changelog
  13. 18 0
      debian/libapt-pkg4.15.symbols
  14. 5 5
      doc/apt-verbatim.ent
  15. 2 2
      doc/po/apt-doc.pot
  16. 270 379
      doc/po/fr.po
  17. 3 3
      ftparchive/cachedb.cc
  18. 27 14
      ftparchive/sources.cc
  19. 9 17
      ftparchive/sources.h
  20. 2 10
      ftparchive/writer.cc
  21. 19 9
      methods/https.cc
  22. 6 5
      methods/https.h
  23. 1 1
      methods/server.cc
  24. 950 1001
      po/apt-all.pot
  25. 967 1029
      po/ar.po
  26. 1074 1139
      po/ast.po
  27. 1117 1179
      po/bg.po
  28. 949 1008
      po/bs.po
  29. 1090 1152
      po/ca.po
  30. 1063 1125
      po/cs.po
  31. 1057 1123
      po/cy.po
  32. 1069 1131
      po/da.po
  33. 1101 1160
      po/de.po
  34. 1049 1114
      po/dz.po
  35. 1047 1112
      po/el.po
  36. 1507 1502
      po/es.po
  37. 1049 1114
      po/eu.po
  38. 1047 1112
      po/fi.po
  39. 1260 1306
      po/fr.po
  40. 1091 1155
      po/gl.po
  41. 1 6
      po/he.po
  42. 1087 1150
      po/hu.po
  43. 1093 1154
      po/it.po
  44. 1071 1133
      po/ja.po
  45. 1048 1113
      po/km.po
  46. 1067 1132
      po/ko.po
  47. 968 1030
      po/ku.po
  48. 1024 1086
      po/lt.po
  49. 1051 1117
      po/mr.po
  50. 1089 1154
      po/nb.po
  51. 1054 1118
      po/ne.po
  52. 1570 1551
      po/nl.po
  53. 1045 1110
      po/nn.po
  54. 1115 1177
      po/pl.po
  55. 1116 1178
      po/pt.po
  56. 1054 1118
      po/pt_BR.po
  57. 1059 1124
      po/ro.po
  58. 1097 1160
      po/ru.po
  59. 1086 1149
      po/sk.po
  60. 1074 1137
      po/sl.po
  61. 1080 1145
      po/sv.po
  62. 1059 1118
      po/th.po
  63. 1049 1114
      po/tl.po
  64. 1076 1136
      po/tr.po
  65. 1115 1178
      po/uk.po
  66. 1114 1174
      po/vi.po
  67. 1297 1315
      po/zh_CN.po
  68. 1052 1116
      po/zh_TW.po
  69. 2 3
      test/integration/framework
  70. 29 0
      test/integration/test-allow-scores-for-all-dependency-types
  71. 40 0
      test/integration/test-apt-download-progress
  72. 0 4
      test/integration/test-apt-ftparchive-src-cachedb
  73. 8 11
      test/integration/test-apt-get-install-deb
  74. 22 21
      test/integration/test-apt-helper
  75. 0 3
      test/integration/test-bug-769609-triggers-still-pending-after-run
  76. 0 7
      test/integration/test-kernel-helper-autoremove
  77. 29 3
      test/integration/test-no-fds-leaked-to-maintainer-scripts
  78. 2 1
      test/interactive-helper/aptwebserver.cc

+ 1 - 1
apt-pkg/algorithms.cc

@@ -468,7 +468,7 @@ void pkgProblemResolver::MakeScores()
 	 if (D->Version != 0)
 	 if (D->Version != 0)
 	 {
 	 {
 	    pkgCache::VerIterator const IV = Cache[T].InstVerIter(Cache);
 	    pkgCache::VerIterator const IV = Cache[T].InstVerIter(Cache);
-	    if (IV.end() == true || D.IsSatisfied(IV) != D.IsNegative())
+	    if (IV.end() == true || D.IsSatisfied(IV) == false)
 	       continue;
 	       continue;
 	 }
 	 }
 	 Scores[T->ID] += DepMap[D->Type];
 	 Scores[T->ID] += DepMap[D->Type];

+ 6 - 4
apt-pkg/cacheiterators.h

@@ -161,10 +161,12 @@ class pkgCache::PkgIterator: public Iterator<Package, PkgIterator> {
 	// Accessors
 	// Accessors
 	inline const char *Name() const { return Group().Name(); }
 	inline const char *Name() const { return Group().Name(); }
 	// Versions have sections - and packages can have different versions with different sections
 	// Versions have sections - and packages can have different versions with different sections
-	// so this interface is broken by design. It used to return the section of the "first parsed
-	// package stanza", but as this can potentially be anything it now returns the section of the
-	// newest version instead (if any). aka: Run as fast as you can to Version.Section().
-	APT_DEPRECATED const char *Section() const;
+	// so this interface is broken by design. Run as fast as you can to Version.Section().
+	APT_DEPRECATED inline const char *Section() const {
+	   APT_IGNORE_DEPRECATED_PUSH
+	   return S->Section == 0?0:Owner->StrP + S->Section;
+	   APT_IGNORE_DEPRECATED_POP
+	}
 	inline bool Purge() const {return S->CurrentState == pkgCache::State::Purge ||
 	inline bool Purge() const {return S->CurrentState == pkgCache::State::Purge ||
 		(S->CurrentVer == 0 && S->CurrentState == pkgCache::State::NotInstalled);}
 		(S->CurrentVer == 0 && S->CurrentState == pkgCache::State::NotInstalled);}
 	inline const char *Arch() const {return S->Arch == 0?0:Owner->StrP + S->Arch;}
 	inline const char *Arch() const {return S->Arch == 0?0:Owner->StrP + S->Arch;}

+ 32 - 6
apt-pkg/deb/debsrcrecords.cc

@@ -121,9 +121,32 @@ bool debSrcRecordParser::BuildDepends(std::vector<pkgSrcRecords::Parser::BuildDe
 // ---------------------------------------------------------------------
 // ---------------------------------------------------------------------
 /* This parses the list of files and returns it, each file is required to have
 /* This parses the list of files and returns it, each file is required to have
    a complete source package */
    a complete source package */
-bool debSrcRecordParser::Files(std::vector<pkgSrcRecords::File> &List)
+bool debSrcRecordParser::Files(std::vector<pkgSrcRecords::File> &F)
 {
 {
-   List.erase(List.begin(),List.end());
+   std::vector<pkgSrcRecords::File2> F2;
+   if (Files2(F2) == false)
+      return false;
+   for (std::vector<pkgSrcRecords::File2>::const_iterator f2 = F2.begin(); f2 != F2.end(); ++f2)
+   {
+      pkgSrcRecords::File2 f;
+#if __GNUC__ >= 4
+	#pragma GCC diagnostic push
+	#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
+      f.MD5Hash = f2->MD5Hash;
+      f.Size = f2->Size;
+#if __GNUC__ >= 4
+	#pragma GCC diagnostic pop
+#endif
+      f.Path = f2->Path;
+      f.Type = f2->Type;
+      F.push_back(f);
+   }
+   return true;
+}
+bool debSrcRecordParser::Files2(std::vector<pkgSrcRecords::File2> &List)
+{
+   List.clear();
 
 
    // Stash the / terminated directory prefix
    // Stash the / terminated directory prefix
    string Base = Sect.FindS("Directory");
    string Base = Sect.FindS("Directory");
@@ -162,7 +185,7 @@ bool debSrcRecordParser::Files(std::vector<pkgSrcRecords::File> &List)
 	    path = Base + path;
 	    path = Base + path;
 
 
 	 // look if we have a record for this file already
 	 // look if we have a record for this file already
-	 std::vector<pkgSrcRecords::File>::iterator file = List.begin();
+	 std::vector<pkgSrcRecords::File2>::iterator file = List.begin();
 	 for (; file != List.end(); ++file)
 	 for (; file != List.end(); ++file)
 	    if (file->Path == path)
 	    if (file->Path == path)
 	       break;
 	       break;
@@ -179,13 +202,16 @@ bool debSrcRecordParser::Files(std::vector<pkgSrcRecords::File> &List)
 	 }
 	 }
 
 
 	 // we haven't seen this file yet
 	 // we haven't seen this file yet
-	 pkgSrcRecords::File F;
+	 pkgSrcRecords::File2 F;
 	 F.Path = path;
 	 F.Path = path;
-	 F.Size = strtoull(size.c_str(), NULL, 10);
+	 F.FileSize = strtoull(size.c_str(), NULL, 10);
 	 F.Hashes.push_back(hashString);
 	 F.Hashes.push_back(hashString);
 
 
+	 APT_IGNORE_DEPRECATED_PUSH
+	 F.Size = F.FileSize;
 	 if (checksumField == "Files")
 	 if (checksumField == "Files")
-	    APT_IGNORE_DEPRECATED(F.MD5Hash = hash;)
+	    F.MD5Hash = hash;
+	 APT_IGNORE_DEPRECATED_POP
 
 
 	 // Try to guess what sort of file it is we are getting.
 	 // Try to guess what sort of file it is we are getting.
 	 string::size_type Pos = F.Path.length()-1;
 	 string::size_type Pos = F.Path.length()-1;

+ 1 - 0
apt-pkg/deb/debsrcrecords.h

@@ -54,6 +54,7 @@ class APT_HIDDEN debSrcRecordParser : public pkgSrcRecords::Parser
       return std::string(Start,Stop);
       return std::string(Start,Stop);
    };
    };
    virtual bool Files(std::vector<pkgSrcRecords::File> &F);
    virtual bool Files(std::vector<pkgSrcRecords::File> &F);
+   bool Files2(std::vector<pkgSrcRecords::File2> &F);
 
 
    debSrcRecordParser(std::string const &File,pkgIndexFile const *Index) 
    debSrcRecordParser(std::string const &File,pkgIndexFile const *Index) 
       : Parser(Index), Fd(File,FileFd::ReadOnly, FileFd::Extension), Tags(&Fd,102400),
       : Parser(Index), Fd(File,FileFd::ReadOnly, FileFd::Extension), Tags(&Fd,102400),

+ 12 - 4
apt-pkg/deb/dpkgpm.cc

@@ -73,7 +73,8 @@ public:
    pkgDPkgPMPrivate() : stdin_is_dev_null(false), dpkgbuf_pos(0),
    pkgDPkgPMPrivate() : stdin_is_dev_null(false), dpkgbuf_pos(0),
 			term_out(NULL), history_out(NULL),
 			term_out(NULL), history_out(NULL),
 			progress(NULL), tt_is_valid(false), master(-1),
 			progress(NULL), tt_is_valid(false), master(-1),
-			slave(NULL), protect_slave_from_dying(-1)
+			slave(NULL), protect_slave_from_dying(-1),
+			direct_stdin(false)
    {
    {
       dpkgbuf[0] = '\0';
       dpkgbuf[0] = '\0';
    }
    }
@@ -100,6 +101,7 @@ public:
    sigset_t sigmask;
    sigset_t sigmask;
    sigset_t original_sigmask;
    sigset_t original_sigmask;
 
 
+   bool direct_stdin;
 };
 };
 
 
 namespace
 namespace
@@ -1069,6 +1071,9 @@ void pkgDPkgPM::StartPtyMagic()
       return;
       return;
    }
    }
 
 
+   if (isatty(STDIN_FILENO) == 0)
+      d->direct_stdin = true;
+
    _error->PushToStack();
    _error->PushToStack();
 
 
    d->master = posix_openpt(O_RDWR | O_NOCTTY);
    d->master = posix_openpt(O_RDWR | O_NOCTTY);
@@ -1166,7 +1171,10 @@ void pkgDPkgPM::SetupSlavePtyMagic()
       _error->FatalE("ioctl", "Setting TIOCSCTTY for slave fd %d failed!", slaveFd);
       _error->FatalE("ioctl", "Setting TIOCSCTTY for slave fd %d failed!", slaveFd);
    else
    else
    {
    {
-      for (unsigned short i = 0; i < 3; ++i)
+      unsigned short i = 0;
+      if (d->direct_stdin == true)
+	 ++i;
+      for (; i < 3; ++i)
 	 if (dup2(slaveFd, i) == -1)
 	 if (dup2(slaveFd, i) == -1)
 	    _error->FatalE("dup2", "Dupping %d to %d in child failed!", slaveFd, i);
 	    _error->FatalE("dup2", "Dupping %d to %d in child failed!", slaveFd, i);
 
 
@@ -1582,8 +1590,8 @@ bool pkgDPkgPM::Go(APT::Progress::PackageManager *progress)
 
 
 	 // wait for input or output here
 	 // wait for input or output here
 	 FD_ZERO(&rfds);
 	 FD_ZERO(&rfds);
-	 if (d->master >= 0 && !d->stdin_is_dev_null)
-	    FD_SET(0, &rfds); 
+	 if (d->master >= 0 && d->direct_stdin == false && d->stdin_is_dev_null == false)
+	    FD_SET(STDIN_FILENO, &rfds);
 	 FD_SET(_dpkgin, &rfds);
 	 FD_SET(_dpkgin, &rfds);
 	 if(d->master >= 0)
 	 if(d->master >= 0)
 	    FD_SET(d->master, &rfds);
 	    FD_SET(d->master, &rfds);

+ 0 - 6
apt-pkg/pkgcache.cc

@@ -1036,9 +1036,3 @@ bool pkgCache::PrvIterator::IsMultiArchImplicit() const
    return false;
    return false;
 }
 }
 									/*}}}*/
 									/*}}}*/
-APT_DEPRECATED APT_PURE const char * pkgCache::PkgIterator::Section() const {/*{{{*/
-   if (S->VersionList == 0)
-      return 0;
-   return VersionList().Section();
-}
-									/*}}}*/

+ 30 - 1
apt-pkg/srcrecords.cc

@@ -14,6 +14,7 @@
 #include<config.h>
 #include<config.h>
 
 
 #include <apt-pkg/srcrecords.h>
 #include <apt-pkg/srcrecords.h>
+#include <apt-pkg/debsrcrecords.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/sourcelist.h>
 #include <apt-pkg/sourcelist.h>
 #include <apt-pkg/metaindex.h>
 #include <apt-pkg/metaindex.h>
@@ -147,5 +148,33 @@ const char *pkgSrcRecords::Parser::BuildDepType(unsigned char const &Type)
    return fields[Type];
    return fields[Type];
 }
 }
 									/*}}}*/
 									/*}}}*/
+bool pkgSrcRecords::Parser::Files2(std::vector<pkgSrcRecords::File2> &F2)/*{{{*/
+{
+   debSrcRecordParser * const deb = dynamic_cast<debSrcRecordParser*>(this);
+   if (deb != NULL)
+      return deb->Files2(F2);
 
 
-
+   std::vector<pkgSrcRecords::File> F;
+   if (Files(F) == false)
+      return false;
+   for (std::vector<pkgSrcRecords::File>::const_iterator f = F.begin(); f != F.end(); ++f)
+   {
+      pkgSrcRecords::File2 f2;
+#if __GNUC__ >= 4
+	#pragma GCC diagnostic push
+	#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
+      f2.MD5Hash = f->MD5Hash;
+      f2.Size = f->Size;
+      f2.Hashes.push_back(HashString("MD5Sum", f->MD5Hash));
+      f2.FileSize = f->Size;
+#if __GNUC__ >= 4
+	#pragma GCC diagnostic pop
+#endif
+      f2.Path = f->Path;
+      f2.Type = f->Type;
+      F2.push_back(f2);
+   }
+   return true;
+}
+									/*}}}*/

+ 7 - 2
apt-pkg/srcrecords.h

@@ -34,11 +34,15 @@ APT_IGNORE_DEPRECATED_PUSH
    // Describes a single file
    // Describes a single file
    struct File
    struct File
    {
    {
+      APT_DEPRECATED std::string MD5Hash;
+      APT_DEPRECATED unsigned long Size;
       std::string Path;
       std::string Path;
       std::string Type;
       std::string Type;
-      unsigned long long Size;
+   };
+   struct File2 : public File
+   {
+      unsigned long long FileSize;
       HashStringList Hashes;
       HashStringList Hashes;
-      APT_DEPRECATED std::string MD5Hash;
    };
    };
 APT_IGNORE_DEPRECATED_POP
 APT_IGNORE_DEPRECATED_POP
 
 
@@ -81,6 +85,7 @@ APT_IGNORE_DEPRECATED_POP
       static const char *BuildDepType(unsigned char const &Type) APT_PURE;
       static const char *BuildDepType(unsigned char const &Type) APT_PURE;
 
 
       virtual bool Files(std::vector<pkgSrcRecords::File> &F) = 0;
       virtual bool Files(std::vector<pkgSrcRecords::File> &F) = 0;
+      bool Files2(std::vector<pkgSrcRecords::File2> &F);
       
       
       Parser(const pkgIndexFile *Index) : iIndex(Index) {};
       Parser(const pkgIndexFile *Index) : iIndex(Index) {};
       virtual ~Parser() {};
       virtual ~Parser() {};

+ 4 - 4
cmdline/apt-get.cc

@@ -791,13 +791,13 @@ static bool DoSource(CommandLine &CmdL)
       }
       }
 
 
       // Back track
       // Back track
-      vector<pkgSrcRecords::File> Lst;
-      if (Last->Files(Lst) == false) {
+      vector<pkgSrcRecords::File2> Lst;
+      if (Last->Files2(Lst) == false) {
 	 return false;
 	 return false;
       }
       }
 
 
       // Load them into the fetcher
       // Load them into the fetcher
-      for (vector<pkgSrcRecords::File>::const_iterator I = Lst.begin();
+      for (vector<pkgSrcRecords::File2>::const_iterator I = Lst.begin();
 	   I != Lst.end(); ++I)
 	   I != Lst.end(); ++I)
       {
       {
 	 // Try to guess what sort of file it is we are getting.
 	 // Try to guess what sort of file it is we are getting.
@@ -844,7 +844,7 @@ static bool DoSource(CommandLine &CmdL)
 	 }
 	 }
 
 
 	 new pkgAcqFile(&Fetcher,Last->Index().ArchiveURI(I->Path),
 	 new pkgAcqFile(&Fetcher,Last->Index().ArchiveURI(I->Path),
-			I->Hashes, I->Size, Last->Index().SourceInfo(*Last,*I), Src);
+			I->Hashes, I->FileSize, Last->Index().SourceInfo(*Last,*I), Src);
       }
       }
    }
    }
 
 

+ 1 - 1
configure.ac

@@ -18,7 +18,7 @@ AC_CONFIG_AUX_DIR(buildlib)
 AC_CONFIG_HEADER(include/config.h:buildlib/config.h.in include/apti18n.h:buildlib/apti18n.h.in)
 AC_CONFIG_HEADER(include/config.h:buildlib/config.h.in include/apti18n.h:buildlib/apti18n.h.in)
 
 
 PACKAGE="apt"
 PACKAGE="apt"
-PACKAGE_VERSION="1.1~exp7"
+PACKAGE_VERSION="1.0.9.7"
 PACKAGE_MAIL="APT Development Team <deity@lists.debian.org>"
 PACKAGE_MAIL="APT Development Team <deity@lists.debian.org>"
 AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE")
 AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE")
 AC_DEFINE_UNQUOTED(PACKAGE_VERSION,"$PACKAGE_VERSION")
 AC_DEFINE_UNQUOTED(PACKAGE_VERSION,"$PACKAGE_VERSION")

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

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

+ 86 - 0
debian/changelog

@@ -234,6 +234,92 @@ apt (1.1~exp1) experimental; urgency=low
 
 
  -- Michael Vogt <mvo@debian.org>  Thu, 19 Jun 2014 12:01:48 +0200
  -- Michael Vogt <mvo@debian.org>  Thu, 19 Jun 2014 12:01:48 +0200
 
 
+apt (1.0.9.7) unstable; urgency=medium
+
+  [ Tomasz Buchert ]
+  * Fix crash in the apt-transport-https when Owner is NULL (Closes: #778375)
+
+ -- Michael Vogt <mvo@debian.org>  Mon, 23 Feb 2015 12:54:03 +0100
+
+apt (1.0.9.6) unstable; urgency=medium
+
+  [ Michael Vogt ]
+  * Fix missing URIStart() for https downloads
+  * Add regression test for the previous commit
+
+  [ David Kalnischkies ]
+  * 128 KiB DSC files ought to be enough for everyone (Closes: 774893)
+  * award points for positive dependencies again (Closes: 774924)
+
+ -- Michael Vogt <mvo@ubuntu.com>  Fri, 16 Jan 2015 08:37:25 +0100
+
+apt (1.0.9.5) unstable; urgency=medium
+
+  [ David Kalnischkies ]
+  * dispose http(s) 416 error page as non-content (Closes: 768797)
+  * do not make PTY slave the controlling terminal (Closes: 772641)
+  * always run 'dpkg --configure -a' at the end of our dpkg callings
+    (Closes: 769609)
+  * pass-through stdin fd instead of content if not a terminal (Closes: 773061)
+
+  [ James McCoy ]
+  * tighten filtering of kernel images in apt.auto-removal (Closes: 772732)
+
+  [ Jean-Pierre Giraud ]
+  * French manpages translation update (Closes: 771967)
+
+  [ Zhou Mo ]
+  * Chinese (simplified) program translation update (Closes: 771982)
+
+  [ Kenshi Muto ]
+  * Japanese program translation update (Closes: 772678)
+
+  [ Theppitak Karoonboonyanan ]
+  * Thai program translation update (Closes: 772913)
+
+ -- David Kalnischkies <david@kalnischkies.de>  Tue, 23 Dec 2014 13:22:42 +0100
+
+apt (1.0.9.4) unstable; urgency=medium
+
+  [ David Kalnischkies ]
+  * use 'best' hash for source authentication (LP: 1098738)
+  * deprecate the Section member from package struct
+  * allow options between command and -- on commandline
+  * re-enable support for -s (and co) in apt-get source (Closes: 742578)
+  * change codenames to jessie as stable POV in docs
+  * close leaking slave fd after setting up pty magic (Closes: 767774)
+  * fix PTY interaction on linux and kfreebsd (Closes: 765687)
+
+  [ James McCoy ]
+  * support long keyids in "apt-key del" instead of ignoring them
+    (Closes: 754436)
+
+  [ Michael Vogt ]
+  * Use sysconf(_SC_ARG_MAX) to find the size of Dpkg::MaxArgBytes
+
+  [ Frans Spiesschaert ]
+  * Dutch program translation update (Closes: 771039)
+
+  [ Julien Patriarca ]
+  * French program translation update (Closes: 766755)
+
+  [ Zhou Mo ]
+  * Chinese (simplified) program translation update (Closes: 766170)
+
+  [ Miroslav Kure ]
+  * Czech program translation update (Closes: 764055)
+
+  [ Mert Dirik ]
+  * Turkish program translation update (Closes: 763379)
+
+  [ Kenshi Muto ]
+  * Japanese program translation update (Closes: 763033)
+
+  [ Manuel "Venturi" Porras Peralta ]
+  * Spanish program translation update (Closes: 771815)
+
+ -- David Kalnischkies <david@kalnischkies.de>  Wed, 03 Dec 2014 14:26:04 +0100
+
 apt (1.0.9.3) unstable; urgency=medium
 apt (1.0.9.3) unstable; urgency=medium
 
 
   [ josch ]
   [ josch ]

Plik diff jest za duży
+ 18 - 0
debian/libapt-pkg4.15.symbols


+ 5 - 5
doc/apt-verbatim.ent

@@ -225,13 +225,13 @@
 ">
 ">
 
 
 <!-- this will be updated by 'prepare-release' -->
 <!-- this will be updated by 'prepare-release' -->
-<!ENTITY apt-product-version "1.1~exp7">
+<!ENTITY apt-product-version "1.0.9.7">
 
 
 <!-- (Code)names for various things used all over the place -->
 <!-- (Code)names for various things used all over the place -->
-<!ENTITY oldstable-codename "squeeze">
-<!ENTITY stable-codename "wheezy">
-<!ENTITY testing-codename "jessie">
-<!ENTITY stable-version "7">
+<!ENTITY oldstable-codename "wheezy">
+<!ENTITY stable-codename "jessie">
+<!ENTITY testing-codename "stretch">
+<!ENTITY stable-version "8">
 <!ENTITY ubuntu-codename "trusty">
 <!ENTITY ubuntu-codename "trusty">
 
 
 <!-- good and bad just refers to matching and not matching a pattern…
 <!-- good and bad just refers to matching and not matching a pattern…

+ 2 - 2
doc/po/apt-doc.pot

@@ -6,9 +6,9 @@
 #, fuzzy
 #, fuzzy
 msgid ""
 msgid ""
 msgstr ""
 msgstr ""
-"Project-Id-Version: apt-doc 1.1~exp3\n"
+"Project-Id-Version: apt-doc 1.0.9.5\n"
 "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
 "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
-"POT-Creation-Date: 2014-11-06 09:45+0100\n"
+"POT-Creation-Date: 2015-01-16 04:37-0500\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"

Plik diff jest za duży
+ 270 - 379
doc/po/fr.po


+ 3 - 3
ftparchive/cachedb.cc

@@ -322,12 +322,12 @@ bool CacheDB::LoadSource()						/*{{{*/
    if (Dsc.Read(FileName) == false)
    if (Dsc.Read(FileName) == false)
       return false;
       return false;
 
 
-   if (Dsc.Data == 0)
+   if (Dsc.Length == 0)
       return _error->Error(_("Failed to read .dsc"));
       return _error->Error(_("Failed to read .dsc"));
-   
+
    // Write back the control information
    // Write back the control information
    InitQuerySource();
    InitQuerySource();
-   if (Put(Dsc.Data, Dsc.Length) == true)
+   if (Put(Dsc.Data.c_str(), Dsc.Length) == true)
       CurStat.Flags |= FlSource;
       CurStat.Flags |= FlSource;
 
 
    return true;
    return true;

+ 27 - 14
ftparchive/sources.cc

@@ -1,5 +1,5 @@
 #include <string>
 #include <string>
-#include <iostream>
+#include <sstream>
 
 
 // for memcpy
 // for memcpy
 #include <cstring>
 #include <cstring>
@@ -9,17 +9,19 @@
 
 
 #include "sources.h"
 #include "sources.h"
 
 
-bool DscExtract::TakeDsc(const void *newData, unsigned long newSize)
+bool DscExtract::TakeDsc(const void *newData, unsigned long long newSize)
 {
 {
-   if(newSize > maxSize)
-     return _error->Error("DSC data is too large %lu!", newSize);
-
    if (newSize == 0)
    if (newSize == 0)
    {
    {
+      // adding two newlines 'off record' for pkgTagSection.Scan() calls
+      Data = "\n\n";
       Length = 0;
       Length = 0;
       return true;
       return true;
    }
    }
-   memcpy(Data, newData, newSize);
+
+   Data = std::string((const char*)newData, newSize);
+   // adding two newlines 'off record' for pkgTagSection.Scan() calls
+   Data.append("\n\n");
    Length = newSize;
    Length = newSize;
 
 
    return true;
    return true;
@@ -27,20 +29,31 @@ bool DscExtract::TakeDsc(const void *newData, unsigned long newSize)
 
 
 bool DscExtract::Read(std::string FileName)
 bool DscExtract::Read(std::string FileName)
 {
 {
+   Data.clear();
+   Length = 0;
+
    FileFd F;
    FileFd F;
    if (OpenMaybeClearSignedFile(FileName, F) == false)
    if (OpenMaybeClearSignedFile(FileName, F) == false)
       return false;
       return false;
-   
-   unsigned long long const FSize = F.FileSize();
-   if(FSize > maxSize)
-     return _error->Error("DSC file '%s' is too large!",FileName.c_str());
-
-   if (F.Read(Data, FSize) == false)
-      return false;
-   Length = FSize;
 
 
    IsClearSigned = (FileName != F.Name());
    IsClearSigned = (FileName != F.Name());
 
 
+   std::ostringstream data;
+   char buffer[1024];
+   do {
+      unsigned long long actual = 0;
+      if (F.Read(buffer, sizeof(buffer)-1, &actual) == false)
+	 return _error->Errno("read", "Failed to read dsc file %s", FileName.c_str());
+      if (actual == 0)
+	 break;
+      Length += actual;
+      buffer[actual] = '\0';
+      data << buffer;
+   } while(true);
+
+   // adding two newlines 'off record' for pkgTagSection.Scan() calls
+   data << "\n\n";
+   Data = data.str();
    return true;
    return true;
 }
 }
 
 

+ 9 - 17
ftparchive/sources.h

@@ -3,29 +3,21 @@
 
 
 #include <apt-pkg/tagfile.h>
 #include <apt-pkg/tagfile.h>
 
 
-class DscExtract 
+#include <string>
+
+class DscExtract
 {
 {
  public:
  public:
-   //FIXME: do we really need to enforce a maximum size of the dsc file?
-   static const int maxSize = 128*1024;
-
-   char *Data;
+   std::string Data;
    pkgTagSection Section;
    pkgTagSection Section;
-   unsigned long Length;
+   unsigned long long Length;
    bool IsClearSigned;
    bool IsClearSigned;
 
 
-   bool TakeDsc(const void *Data, unsigned long Size);
+   bool TakeDsc(const void *Data, unsigned long long Size);
    bool Read(std::string FileName);
    bool Read(std::string FileName);
-   
-   DscExtract() : Data(0), Length(0), IsClearSigned(false) {
-     Data = new char[maxSize];
-   };
-   ~DscExtract() { 
-      if(Data != NULL) {
-         delete [] Data;
-         Data = NULL;
-      } 
-   };
+
+   DscExtract() : Length(0), IsClearSigned(false) {};
+   ~DscExtract() {};
 };
 };
 
 
 
 

+ 2 - 10
ftparchive/writer.cc

@@ -648,18 +648,10 @@ bool SourcesWriter::DoPackage(string FileName)
    // the "db cursor"
    // the "db cursor"
    Db.Finish();
    Db.Finish();
 
 
-   // read stuff
-   char *Start = Db.Dsc.Data;
-   char *BlkEnd = Db.Dsc.Data + Db.Dsc.Length;
-
-   // Add extra \n to the end, just in case (as in clearsigned they are missing)
-   *BlkEnd++ = '\n';
-   *BlkEnd++ = '\n';
-
    pkgTagSection Tags;
    pkgTagSection Tags;
-   if (Tags.Scan(Start,BlkEnd - Start) == false)
+   if (Tags.Scan(Db.Dsc.Data.c_str(), Db.Dsc.Data.length()) == false)
       return _error->Error("Could not find a record in the DSC '%s'",FileName.c_str());
       return _error->Error("Could not find a record in the DSC '%s'",FileName.c_str());
-   
+
    if (Tags.Exists("Source") == false)
    if (Tags.Exists("Source") == false)
       return _error->Error("Could not find a Source entry in the DSC '%s'",FileName.c_str());
       return _error->Error("Could not find a Source entry in the DSC '%s'",FileName.c_str());
    Tags.Trim();
    Tags.Trim();

+ 19 - 9
methods/https.cc

@@ -95,24 +95,33 @@ HttpsMethod::write_data(void *buffer, size_t size, size_t nmemb, void *userp)
    if (me->Server->JunkSize != 0)
    if (me->Server->JunkSize != 0)
       return buffer_size;
       return buffer_size;
 
 
-   if (me->Res.Size == 0)
+   if (me->Server->ReceivedData == false)
+   {
       me->URIStart(me->Res);
       me->URIStart(me->Res);
+      me->Server->ReceivedData = true;
+   }
+
    if(me->File->Write(buffer, buffer_size) != true)
    if(me->File->Write(buffer, buffer_size) != true)
-      return false;
+      return 0;
 
 
-   if(me->Queue->MaximumSize > 0 && me->File->Tell() > me->Queue->MaximumSize)
+   if(me->Queue->MaximumSize > 0)
    {
    {
-      me->SetFailReason("MaximumSizeExceeded");
-      _error->Error("Writing more data than expected (%llu > %llu)",
-                           me->TotalWritten, me->Queue->MaximumSize);
-      return 0;
+      unsigned long long const TotalWritten = me->File->Tell();
+      if (TotalWritten > me->Queue->MaximumSize)
+      {
+	 me->SetFailReason("MaximumSizeExceeded");
+	 _error->Error("Writing more data than expected (%llu > %llu)",
+	       TotalWritten, me->Queue->MaximumSize);
+	 return 0;
+      }
    }
    }
+
    return buffer_size;
    return buffer_size;
 }
 }
 
 
 int
 int
 HttpsMethod::progress_callback(void *clientp, double dltotal, double /*dlnow*/,
 HttpsMethod::progress_callback(void *clientp, double dltotal, double /*dlnow*/,
-			      double /*ultotal*/, double /*ulnow*/)
+			       double /*ultotal*/, double /*ulnow*/)
 {
 {
    HttpsMethod *me = (HttpsMethod *)clientp;
    HttpsMethod *me = (HttpsMethod *)clientp;
    if(dltotal > 0 && me->Res.Size == 0) {
    if(dltotal > 0 && me->Res.Size == 0) {
@@ -125,6 +134,7 @@ HttpsMethod::progress_callback(void *clientp, double dltotal, double /*dlnow*/,
 HttpsServerState::HttpsServerState(URI Srv,HttpsMethod * /*Owner*/) : ServerState(Srv, NULL)
 HttpsServerState::HttpsServerState(URI Srv,HttpsMethod * /*Owner*/) : ServerState(Srv, NULL)
 {
 {
    TimeOut = _config->FindI("Acquire::https::Timeout",TimeOut);
    TimeOut = _config->FindI("Acquire::https::Timeout",TimeOut);
+   ReceivedData = false;
    Reset();
    Reset();
 }
 }
 									/*}}}*/
 									/*}}}*/
@@ -192,7 +202,7 @@ void HttpsMethod::SetupProxy()  					/*{{{*/
 bool HttpsMethod::Fetch(FetchItem *Itm)
 bool HttpsMethod::Fetch(FetchItem *Itm)
 {
 {
    struct stat SBuf;
    struct stat SBuf;
-   struct curl_slist *headers=NULL;  
+   struct curl_slist *headers=NULL;
    char curl_errorstr[CURL_ERROR_SIZE];
    char curl_errorstr[CURL_ERROR_SIZE];
    URI Uri = Itm->Uri;
    URI Uri = Itm->Uri;
    string remotehost = Uri.Host;
    string remotehost = Uri.Host;

+ 6 - 5
methods/https.h

@@ -50,6 +50,8 @@ class HttpsServerState : public ServerState
 
 
    HttpsServerState(URI Srv, HttpsMethod *Owner);
    HttpsServerState(URI Srv, HttpsMethod *Owner);
    virtual ~HttpsServerState() {Close();};
    virtual ~HttpsServerState() {Close();};
+
+   bool ReceivedData;
 };
 };
 
 
 class HttpsMethod : public pkgAcqMethod
 class HttpsMethod : public pkgAcqMethod
@@ -62,18 +64,17 @@ class HttpsMethod : public pkgAcqMethod
 
 
    static size_t parse_header(void *buffer, size_t size, size_t nmemb, void *userp);
    static size_t parse_header(void *buffer, size_t size, size_t nmemb, void *userp);
    static size_t write_data(void *buffer, size_t size, size_t nmemb, void *userp);
    static size_t write_data(void *buffer, size_t size, size_t nmemb, void *userp);
-   static int progress_callback(void *clientp, double dltotal, double dlnow, 
-				double ultotal, double ulnow);
+   static int progress_callback(void *clientp, double dltotal, double dlnow,
+				 double ultotal, double ulnow);
    void SetupProxy();
    void SetupProxy();
    CURL *curl;
    CURL *curl;
    FetchResult Res;
    FetchResult Res;
    HttpsServerState *Server;
    HttpsServerState *Server;
-   unsigned long long TotalWritten;
 
 
    public:
    public:
    FileFd *File;
    FileFd *File;
-      
-   HttpsMethod() : pkgAcqMethod("1.2",Pipeline | SendConfig), Server(NULL), TotalWritten(0), File(NULL)
+
+   HttpsMethod() : pkgAcqMethod("1.2",Pipeline | SendConfig), Server(NULL), File(NULL)
    {
    {
       curl = curl_easy_init();
       curl = curl_easy_init();
    };
    };

+ 1 - 1
methods/server.cc

@@ -129,7 +129,7 @@ bool ServerState::HeaderLine(string Line)
 	 if (elements == 3)
 	 if (elements == 3)
 	 {
 	 {
 	    Code[0] = '\0';
 	    Code[0] = '\0';
-	    if (Owner->Debug == true)
+	    if (Owner != NULL && Owner->Debug == true)
 	       clog << "HTTP server doesn't give Reason-Phrase for " << Result << std::endl;
 	       clog << "HTTP server doesn't give Reason-Phrase for " << Result << std::endl;
 	 }
 	 }
 	 else if (elements != 4)
 	 else if (elements != 4)

Plik diff jest za duży
+ 950 - 1001
po/apt-all.pot


Plik diff jest za duży
+ 967 - 1029
po/ar.po


Plik diff jest za duży
+ 1074 - 1139
po/ast.po


Plik diff jest za duży
+ 1117 - 1179
po/bg.po


Plik diff jest za duży
+ 949 - 1008
po/bs.po


Plik diff jest za duży
+ 1090 - 1152
po/ca.po


Plik diff jest za duży
+ 1063 - 1125
po/cs.po


Plik diff jest za duży
+ 1057 - 1123
po/cy.po


Plik diff jest za duży
+ 1069 - 1131
po/da.po


Plik diff jest za duży
+ 1101 - 1160
po/de.po


Plik diff jest za duży
+ 1049 - 1114
po/dz.po


Plik diff jest za duży
+ 1047 - 1112
po/el.po


Plik diff jest za duży
+ 1507 - 1502
po/es.po


Plik diff jest za duży
+ 1049 - 1114
po/eu.po


Plik diff jest za duży
+ 1047 - 1112
po/fi.po


Plik diff jest za duży
+ 1260 - 1306
po/fr.po


Plik diff jest za duży
+ 1091 - 1155
po/gl.po


+ 1 - 6
po/he.po

@@ -2259,12 +2259,7 @@ msgstr "כשלון בפענוח %s"
 
 
 #: apt-pkg/tagfile.cc:102
 #: apt-pkg/tagfile.cc:102
 #, c-format
 #, c-format
-msgid "Unable to parse package file %s (1)"
-msgstr ""
-
-#: apt-pkg/tagfile.cc:189
-#, c-format
-msgid "Unable to parse package file %s (2)"
+msgid "Unable to parse package file %s (%d)"
 msgstr ""
 msgstr ""
 
 
 #: apt-pkg/sourcelist.cc:90
 #: apt-pkg/sourcelist.cc:90

Plik diff jest za duży
+ 1087 - 1150
po/hu.po


Plik diff jest za duży
+ 1093 - 1154
po/it.po


Plik diff jest za duży
+ 1071 - 1133
po/ja.po


Plik diff jest za duży
+ 1048 - 1113
po/km.po


Plik diff jest za duży
+ 1067 - 1132
po/ko.po


Plik diff jest za duży
+ 968 - 1030
po/ku.po


Plik diff jest za duży
+ 1024 - 1086
po/lt.po


Plik diff jest za duży
+ 1051 - 1117
po/mr.po


Plik diff jest za duży
+ 1089 - 1154
po/nb.po


Plik diff jest za duży
+ 1054 - 1118
po/ne.po


Plik diff jest za duży
+ 1570 - 1551
po/nl.po


Plik diff jest za duży
+ 1045 - 1110
po/nn.po


Plik diff jest za duży
+ 1115 - 1177
po/pl.po


Plik diff jest za duży
+ 1116 - 1178
po/pt.po


Plik diff jest za duży
+ 1054 - 1118
po/pt_BR.po


Plik diff jest za duży
+ 1059 - 1124
po/ro.po


Plik diff jest za duży
+ 1097 - 1160
po/ru.po


Plik diff jest za duży
+ 1086 - 1149
po/sk.po


Plik diff jest za duży
+ 1074 - 1137
po/sl.po


Plik diff jest za duży
+ 1080 - 1145
po/sv.po


Plik diff jest za duży
+ 1059 - 1118
po/th.po


Plik diff jest za duży
+ 1049 - 1114
po/tl.po


Plik diff jest za duży
+ 1076 - 1136
po/tr.po


Plik diff jest za duży
+ 1115 - 1178
po/uk.po


Plik diff jest za duży
+ 1114 - 1174
po/vi.po


Plik diff jest za duży
+ 1297 - 1315
po/zh_CN.po


Plik diff jest za duży
+ 1052 - 1116
po/zh_TW.po


+ 2 - 3
test/integration/framework

@@ -248,7 +248,7 @@ setupenvironment() {
 		echo "Dir::Bin::apt-key \"${BUILDDIRECTORY}/apt-key\";" >> aptconfig.conf
 		echo "Dir::Bin::apt-key \"${BUILDDIRECTORY}/apt-key\";" >> aptconfig.conf
 	fi
 	fi
 
 
-	cat > "${TMPWORKINGDIRECTORY}/rootdir/usr/bin/dpkg" <<EOF
+	cat << EOF > "${TMPWORKINGDIRECTORY}/rootdir/usr/bin/dpkg"
 #!/bin/sh
 #!/bin/sh
 set -e
 set -e
 if [ -r "${TMPWORKINGDIRECTORY}/noopchroot.so" ]; then
 if [ -r "${TMPWORKINGDIRECTORY}/noopchroot.so" ]; then
@@ -262,7 +262,6 @@ exec fakeroot dpkg --root="${TMPWORKINGDIRECTORY}/rootdir" \\
 	--log=${TMPWORKINGDIRECTORY}/rootdir/var/log/dpkg.log \\
 	--log=${TMPWORKINGDIRECTORY}/rootdir/var/log/dpkg.log \\
 	--force-not-root --force-bad-path "\$@"
 	--force-not-root --force-bad-path "\$@"
 EOF
 EOF
-	cat "${TMPWORKINGDIRECTORY}/rootdir/usr/bin/dpkg"
 	chmod +x "${TMPWORKINGDIRECTORY}/rootdir/usr/bin/dpkg"
 	chmod +x "${TMPWORKINGDIRECTORY}/rootdir/usr/bin/dpkg"
 	echo "Dir::Bin::dpkg \"${TMPWORKINGDIRECTORY}/rootdir/usr/bin/dpkg\";" > rootdir/etc/apt/apt.conf.d/99dpkg
 	echo "Dir::Bin::dpkg \"${TMPWORKINGDIRECTORY}/rootdir/usr/bin/dpkg\";" > rootdir/etc/apt/apt.conf.d/99dpkg
 
 
@@ -827,7 +826,7 @@ buildaptarchivefromincoming() {
 	[ -e ftparchive.conf ] || createaptftparchiveconfig
 	[ -e ftparchive.conf ] || createaptftparchiveconfig
 	[ -e dists ] || buildaptftparchivedirectorystructure
 	[ -e dists ] || buildaptftparchivedirectorystructure
 	msgninfo "\tGenerate Packages, Sources and Contents files… "
 	msgninfo "\tGenerate Packages, Sources and Contents files… "
-	aptftparchive -qq generate ftparchive.conf
+	testsuccess aptftparchive generate ftparchive.conf
 	cd - > /dev/null
 	cd - > /dev/null
 	msgdone "info"
 	msgdone "info"
 	generatereleasefiles "$@"
 	generatereleasefiles "$@"

+ 29 - 0
test/integration/test-allow-scores-for-all-dependency-types

@@ -32,6 +32,11 @@ insertpackage 'multipleyes' 'foo' 'amd64' '2.2' 'Conflicts: bar (<= 3)'
 # having foo multiple times as conflict is a non-advisable hack in general
 # having foo multiple times as conflict is a non-advisable hack in general
 insertpackage 'multipleyes' 'bar' 'amd64' '2.2' 'Conflicts: foo (<= 3), foo (<= 3)'
 insertpackage 'multipleyes' 'bar' 'amd64' '2.2' 'Conflicts: foo (<= 3), foo (<= 3)'
 
 
+#774924 - slightly simplified
+insertpackage 'jessie' 'login' 'amd64' '2' 'Pre-Depends: libaudit1 (>= 0)'
+insertpackage 'jessie' 'libaudit1' 'amd64' '2' 'Depends: libaudit-common (>= 0)'
+insertpackage 'jessie' 'libaudit-common' 'amd64' '2' 'Breaks: libaudit0, libaudit1 (<< 2)'
+
 cp rootdir/var/lib/dpkg/status rootdir/var/lib/dpkg/status-backup
 cp rootdir/var/lib/dpkg/status rootdir/var/lib/dpkg/status-backup
 setupaptarchive
 setupaptarchive
 
 
@@ -148,3 +153,27 @@ Inst foo [1] (2 versioned [amd64])
 Inst baz (2 versioned [amd64])
 Inst baz (2 versioned [amd64])
 Conf foo (2 versioned [amd64])
 Conf foo (2 versioned [amd64])
 Conf baz (2 versioned [amd64])' aptget install baz -st versioned
 Conf baz (2 versioned [amd64])' aptget install baz -st versioned
+
+# recreating the exact situation is hard, so we pull tricks to get the score
+cp -f rootdir/var/lib/dpkg/status-backup rootdir/var/lib/dpkg/status
+insertinstalledpackage 'gdm3' 'amd64' '1' 'Depends: libaudit0, libaudit0'
+insertinstalledpackage 'login' 'amd64' '1' 'Essential: yes'
+insertinstalledpackage 'libaudit0' 'amd64' '1'
+testequal 'Reading package lists...
+Building dependency tree...
+Calculating upgrade...
+The following packages will be REMOVED:
+  gdm3 libaudit0
+The following NEW packages will be installed:
+  libaudit-common libaudit1
+The following packages will be upgraded:
+  login
+1 upgraded, 2 newly installed, 2 to remove and 0 not upgraded.
+Remv gdm3 [1]
+Remv libaudit0 [1]
+Inst libaudit-common (2 jessie [amd64])
+Conf libaudit-common (2 jessie [amd64])
+Inst libaudit1 (2 jessie [amd64])
+Conf libaudit1 (2 jessie [amd64])
+Inst login [1] (2 jessie [amd64])
+Conf login (2 jessie [amd64])' aptget dist-upgrade -st jessie

+ 40 - 0
test/integration/test-apt-download-progress

@@ -0,0 +1,40 @@
+#!/bin/sh
+#
+# ensure downloading sends progress as a regression test for commit 9127d7ae
+#
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+
+setupenvironment
+changetohttpswebserver
+
+assertprogress() {
+    T="$1"
+    testsuccess grep "dlstatus:1:0:Retrieving file 1 of 1" "$T"
+    if ! egrep -q "dlstatus:1:[1-9][0-9](\..*)?:Retrieving file 1 of 1" "$T"; then
+        cat "$T"
+        msgfail "Failed to detect download progress"
+    fi
+    testsuccess grep "dlstatus:1:100:Retrieving file 1 of 1" "$T"
+}
+
+# we need to ensure the file is reasonable big so that apt has a chance to
+# actually report progress - but not too big to ensure its not delaying the
+# test too much
+TESTFILE=testfile.big
+testsuccess dd if=/dev/zero of=./aptarchive/$TESTFILE bs=800k count=1 
+
+msgtest 'download progress works via' 'http'
+exec 3> apt-progress.log
+testsuccess --nomsg apthelper download-file "http://localhost:8080/$TESTFILE" http-$TESTFILE -o APT::Status-Fd=3 -o Acquire::http::Dl-Limit=800
+assertprogress apt-progress.log
+
+msgtest 'download progress works via' 'https'
+exec 3> apt-progress.log
+testsuccess --nomsg apthelper download-file "https://localhost:4433/$TESTFILE" https-$TESTFILE -o APT::Status-Fd=3 -o Acquire::https::Dl-Limit=800
+assertprogress apt-progress.log
+
+# cleanup
+rm -f apt-progress*.log

+ 0 - 4
test/integration/test-apt-ftparchive-src-cachedb

@@ -180,10 +180,6 @@ testequal "
 E: Could not find a Source entry in the DSC 'aptarchive/pool/invalid/invalid_1.0.dsc'" aptftparchive sources aptarchive/pool/invalid
 E: Could not find a Source entry in the DSC 'aptarchive/pool/invalid/invalid_1.0.dsc'" aptftparchive sources aptarchive/pool/invalid
 rm -f aptarchive/pool/invalid/invalid_1.0.dsc
 rm -f aptarchive/pool/invalid/invalid_1.0.dsc
 
 
-dd if=/dev/zero of="aptarchive/pool/invalid/toobig_1.0.dsc" bs=1k count=129 2>/dev/null
-testequal "
-E: DSC file 'aptarchive/pool/invalid/toobig_1.0.dsc' is too large!" aptftparchive sources aptarchive/pool/invalid
-
 # ensure clean works
 # ensure clean works
 rm -f aptarchive/pool/main/*
 rm -f aptarchive/pool/main/*
 testsuccess aptftparchive clean apt-ftparchive.conf -q=0 -o Debug::APT::FTPArchive::Clean=1
 testsuccess aptftparchive clean apt-ftparchive.conf -q=0 -o Debug::APT::FTPArchive::Clean=1

+ 8 - 11
test/integration/test-apt-get-install-deb

@@ -14,17 +14,14 @@ testequal 'E: Unable to locate package /dev/null' aptget install -qq /dev/null
 cat > foo.deb <<EOF
 cat > foo.deb <<EOF
 I'm not a deb, I'm a teapot.
 I'm not a deb, I'm a teapot.
 EOF
 EOF
-testequal 'E: Sub-process Popen returned an error code (100)
-E: Encountered a section with no Package: header
+testfailure aptget install ./foo.deb
+testsuccess grep '^E: Sub-process Popen returned an error code' rootdir/tmp/testfailure.output
+testequal 'E: Encountered a section with no Package: header
 E: Problem with MergeLister for ./foo.deb
 E: Problem with MergeLister for ./foo.deb
-E: The package lists or status file could not be parsed or opened.' aptget install -qq ./foo.deb
+E: The package lists or status file could not be parsed or opened.' tail -n 3 rootdir/tmp/testfailure.output
 
 
 # fakeroot is currently not found, framwork needs updating
 # fakeroot is currently not found, framwork needs updating
-#
-#buildsimplenativepackage 'foo' 'all' '1.0' 
-#
-#testequal 'Selecting previously unselected package foo.
-#(Reading database ... 0 files and directories currently installed.)
-# Preparing to unpack .../incoming/foo_1.0_all.deb ...
-#Unpacking foo (1.0) ...
-#Setting up foo (1.0) ...' aptget install -qq ./incoming/foo_1.0_all.deb
+buildsimplenativepackage 'foo' 'all' '1.0'
+testdpkgnotinstalled 'foo'
+testsuccess aptget install ./incoming/foo_1.0_all.deb
+testdpkginstalled 'foo'

+ 22 - 21
test/integration/test-apt-helper

@@ -11,34 +11,35 @@ changetohttpswebserver
 
 
 test_apt_helper_download() {
 test_apt_helper_download() {
     echo 'foo' > aptarchive/foo
     echo 'foo' > aptarchive/foo
+    echo 'bar' > aptarchive/foo2
 
 
-    msgtest 'apt-file download-file' 'md5sum'
-    apthelper -qq download-file http://localhost:8080/foo downloaded/foo2 MD5Sum:d3b07384d113edec49eaa6238ad5ff00 && msgpass || msgfail
-    testfileequal downloaded/foo2 'foo'
+    msgtest 'apt-file download-file md5sum'
+    testsuccess --nomsg apthelper download-file http://localhost:8080/foo foo2 MD5Sum:d3b07384d113edec49eaa6238ad5ff00
+    testfileequal foo2 'foo'
 
 
-    msgtest 'apt-file download-file' 'sha1'
-    apthelper -qq download-file http://localhost:8080/foo downloaded/foo1 SHA1:f1d2d2f924e986ac86fdf7b36c94bcdf32beec15 && msgpass || msgfail
-    testfileequal downloaded/foo1 'foo'
+    msgtest 'apt-file download-file sha1'
+    testsuccess --nomsg apthelper download-file http://localhost:8080/foo foo1 SHA1:f1d2d2f924e986ac86fdf7b36c94bcdf32beec15
+    testfileequal foo1 'foo'
 
 
-    msgtest 'apt-file download-file' 'sha256'
-    apthelper -qq download-file http://localhost:8080/foo downloaded/foo3 SHA256:b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c && msgpass || msgfail
-    testfileequal downloaded/foo3 'foo'
+    msgtest 'apt-file download-file sha256'
+    testsuccess --nomsg apthelper download-file http://localhost:8080/foo foo3 SHA256:b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c
+    testfileequal foo3 'foo'
 
 
-    msgtest 'apt-file download-file' 'no-hash'
-    apthelper -qq download-file http://localhost:8080/foo downloaded/foo4 && msgpass || msgfail
-    testfileequal downloaded/foo4 'foo'
+    msgtest 'apt-file download-file no-hash'
+    testsuccess --nomsg apthelper download-file http://localhost:8080/foo foo4
+    testfileequal foo4 'foo'
     
     
-    msgtest 'apt-file download-file' 'wrong hash'
-    if ! apthelper -qq download-file http://localhost:8080/foo downloaded/foo5 MD5Sum:aabbcc 2>&1 2> download.stderr; then
-        msgpass
-    else
-        msgfail
-    fi
-    testfileequal download.stderr 'E: Failed to fetch http://localhost:8080/foo  Hash Sum mismatch
+    msgtest 'apt-file download-file wrong hash'
+    testfailure --nomsg apthelper -qq download-file http://localhost:8080/foo foo5 MD5Sum:aabbcc
+    testfileequal rootdir/tmp/testfailure.output 'E: Failed to fetch http://localhost:8080/foo  Hash Sum mismatch
 
 
 E: Download Failed'
 E: Download Failed'
-    testfileequal downloaded/foo5.FAILED 'foo'
-    testfailure test -e downloaded/foo5
+    testfileequal foo5.FAILED 'foo'
+
+    msgtest 'apt-file download-file md5sum sha1'
+    testsuccess --nomsg apthelper download-file http://localhost:8080/foo foo6 MD5Sum:d3b07384d113edec49eaa6238ad5ff00 http://localhost:8080/foo2 foo7 SHA1:e242ed3bffccdf271b7fbaf34ed72d089537b42f
+    testfileequal foo6 'foo'
+    testfileequal foo7 'bar'
 }
 }
 
 
 test_apt_helper_detect_proxy() {
 test_apt_helper_detect_proxy() {

+ 0 - 3
test/integration/test-bug-769609-triggers-still-pending-after-run

@@ -32,13 +32,10 @@ EOF
 	buildsimplenativepackage "trigdepends-$TYPE" 'all' '1.0' 'unstable'
 	buildsimplenativepackage "trigdepends-$TYPE" 'all' '1.0' 'unstable'
 }
 }
 
 
-# FIXME: implement test with activate-style triggers
 #buildtriggerpackages 'interest'
 #buildtriggerpackages 'interest'
 buildtriggerpackages 'interest-noawait'
 buildtriggerpackages 'interest-noawait'
-
 buildsimplenativepackage "trigstuff" 'all' '1.0' 'unstable'
 buildsimplenativepackage "trigstuff" 'all' '1.0' 'unstable'
 
 
-
 setupaptarchive
 setupaptarchive
 
 
 runtests() {
 runtests() {

+ 0 - 7
test/integration/test-kernel-helper-autoremove

@@ -26,13 +26,6 @@ insertinstalledpackage 'linux-headers-1000000-1-generic' 'amd64' '100.0.0-1'
 
 
 testsuccess aptmark auto "$CURRENTKERNEL" 'linux-image-1.0.0-2-generic' 'linux-image-100.0.0-1-generic' 'linux-headers-1000000-1-generic'
 testsuccess aptmark auto "$CURRENTKERNEL" 'linux-image-1.0.0-2-generic' 'linux-image-100.0.0-1-generic' 'linux-headers-1000000-1-generic'
 
 
-cat > ./fake-dpkg <<EOF
-#!/bin/sh
-exec $(aptconfig dump --no-empty --format='%v ' 'DPKG::options') "\$@"
-EOF
-chmod +x ./fake-dpkg
-echo 'Dir::Bin::dpkg "./fake-dpkg";' > rootdir/etc/apt/apt.conf.d/99fakedpkg
-
 # install fake-dpkg into it
 # install fake-dpkg into it
 catfail() {
 catfail() {
 	echo >&2
 	echo >&2

+ 29 - 3
test/integration/test-no-fds-leaked-to-maintainer-scripts

@@ -11,14 +11,20 @@ configdpkgnoopchroot
 setupsimplenativepackage "fdleaks" 'all' '1.0' 'unstable'
 setupsimplenativepackage "fdleaks" 'all' '1.0' 'unstable'
 BUILDDIR="incoming/fdleaks-1.0"
 BUILDDIR="incoming/fdleaks-1.0"
 for script in 'preinst' 'postinst' 'prerm' 'postrm'; do
 for script in 'preinst' 'postinst' 'prerm' 'postrm'; do
-	echo '#!/bin/sh
-ls -l /proc/self/fd/' > ${BUILDDIR}/debian/$script
+	cat > ${BUILDDIR}/debian/$script << EOF
+#!/bin/sh
+if [ -e "$(pwd)/rootdir/tmp/read_stdin" ]; then
+	read line;
+	echo "STDIN: -\$line-"
+fi
+ls -l /proc/self/fd/
+EOF
 done
 done
 buildpackage "$BUILDDIR" 'unstable' 'main' 'native'
 buildpackage "$BUILDDIR" 'unstable' 'main' 'native'
 rm -rf "$BUILDDIR"
 rm -rf "$BUILDDIR"
 
 
 PKGNAME='fdleaks:all'
 PKGNAME='fdleaks:all'
-if ! dpkg-checkbuilddeps -d 'dpkg (>= 1.16.2)' /dev/null; then
+if ! dpkg-checkbuilddeps -d 'dpkg (>= 1.16.2)' /dev/null >/dev/null 2>&1; then
 	PKGNAME='fdleaks'
 	PKGNAME='fdleaks'
 fi
 fi
 
 
@@ -84,6 +90,14 @@ startup packages configure" cut -f 3- -d' ' rootdir/var/log/dpkg.log
 }
 }
 checkpurge
 checkpurge
 
 
+msgtest 'setsid provided is new enough to support' '-w'
+if dpkg-checkbuilddeps -d 'util-linux (>= 2.24.2-1)' /dev/null >/dev/null 2>&1; then
+	msgpass
+else
+	msgskip "$(command dpkg -l util-linux)"
+	exit
+fi
+
 rm -f rootdir/var/log/dpkg.log rootdir/var/log/apt/term.log
 rm -f rootdir/var/log/dpkg.log rootdir/var/log/apt/term.log
 testsuccess runapt command setsid -w "${BUILDDIRECTORY}/apt-get" install -y fdleaks -qq < /dev/null
 testsuccess runapt command setsid -w "${BUILDDIRECTORY}/apt-get" install -y fdleaks -qq < /dev/null
 checkinstall
 checkinstall
@@ -91,3 +105,15 @@ checkinstall
 rm -f rootdir/var/log/dpkg.log rootdir/var/log/apt/term.log
 rm -f rootdir/var/log/dpkg.log rootdir/var/log/apt/term.log
 testsuccess runapt command setsid -w "${BUILDDIRECTORY}/apt-get" purge -y fdleaks -qq
 testsuccess runapt command setsid -w "${BUILDDIRECTORY}/apt-get" purge -y fdleaks -qq
 checkpurge
 checkpurge
+
+touch rootdir/tmp/read_stdin
+
+rm -f rootdir/var/log/dpkg.log rootdir/var/log/apt/term.log
+for i in $(seq 1 10); do echo "$i"; done | testsuccess aptget install -y fdleaks -qq
+checkinstall
+testequal '2' grep -c '^STDIN: ' rootdir/var/log/apt/term.log
+
+rm -f rootdir/var/log/dpkg.log rootdir/var/log/apt/term.log
+yes '' | testsuccess runapt command setsid -w "${BUILDDIRECTORY}/apt-get" purge -y fdleaks -qq
+checkpurge
+testequal '3' grep -c '^STDIN: ' rootdir/var/log/apt/term.log

+ 2 - 1
test/interactive-helper/aptwebserver.cc

@@ -861,7 +861,8 @@ int main(int const argc, const char * argv[])
 
 
    std::clog << "Serving ANY file on port: " << port << std::endl;
    std::clog << "Serving ANY file on port: " << port << std::endl;
 
 
-   int const slaves = _config->FindB("aptwebserver::slaves", SOMAXCONN);
+   int const slaves = _config->FindI("aptwebserver::slaves", SOMAXCONN);
+   std::cerr << "SLAVES: " << slaves << std::endl;
    listen(sock, slaves);
    listen(sock, slaves);
    /*}}}*/
    /*}}}*/