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

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

Michael Vogt лет назад: 12
Родитель
Сommit
98c934f272
85 измененных файлов с 39606 добавлено и 39424 удалено
  1. 0 63
      README.MultiArch
  2. 4 2
      apt-pkg/cacheset.cc
  3. 41 25
      apt-pkg/cdrom.cc
  4. 1 0
      apt-pkg/cdrom.h
  5. 4 13
      apt-pkg/contrib/fileutl.cc
  6. 7 6
      apt-pkg/deb/dpkgpm.cc
  7. 1 0
      apt-pkg/init.cc
  8. 9 0
      apt-private/private-main.cc
  9. 1 0
      apt-private/private-main.h
  10. 21 0
      apt-private/private-output.cc
  11. 0 306
      cmdline/acqprogress.cc
  12. 0 39
      cmdline/acqprogress.h
  13. 3 19
      cmdline/apt-get.cc
  14. 4 0
      cmdline/apt.cc
  15. 1 1
      configure.ac
  16. 0 1
      debian/apt-doc.docs
  17. 2 0
      debian/apt.conf.autoremove
  18. 1 0
      debian/apt.dirs
  19. 1 1
      debian/apt.install.in
  20. 3 0
      debian/apt.maintscript
  21. 31 0
      debian/changelog
  22. 4 0
      debian/rules
  23. 1 1
      doc/apt-verbatim.ent
  24. 3 3
      doc/po/apt-doc.pot
  25. 10 3
      doc/po/de.po
  26. 3 3
      doc/po/es.po
  27. 3 3
      doc/po/fr.po
  28. 10 3
      doc/po/it.po
  29. 3 3
      doc/po/ja.po
  30. 3 3
      doc/po/pl.po
  31. 3 3
      doc/po/pt.po
  32. 3 3
      doc/po/pt_BR.po
  33. 2 2
      ftparchive/override.cc
  34. 31 57
      methods/http.cc
  35. 5 5
      methods/https.cc
  36. 845 837
      po/ar.po
  37. 941 933
      po/ast.po
  38. 967 959
      po/bg.po
  39. 789 781
      po/bs.po
  40. 959 951
      po/ca.po
  41. 937 928
      po/cs.po
  42. 943 935
      po/cy.po
  43. 939 931
      po/da.po
  44. 975 967
      po/de.po
  45. 918 910
      po/dz.po
  46. 937 929
      po/el.po
  47. 959 951
      po/es.po
  48. 931 923
      po/eu.po
  49. 933 925
      po/fi.po
  50. 985 977
      po/fr.po
  51. 961 953
      po/gl.po
  52. 936 928
      po/hu.po
  53. 965 957
      po/it.po
  54. 952 944
      po/ja.po
  55. 929 921
      po/km.po
  56. 932 925
      po/ko.po
  57. 835 827
      po/ku.po
  58. 861 853
      po/lt.po
  59. 930 922
      po/mr.po
  60. 936 928
      po/nb.po
  61. 917 909
      po/ne.po
  62. 960 952
      po/nl.po
  63. 921 913
      po/nn.po
  64. 948 939
      po/pl.po
  65. 967 959
      po/pt.po
  66. 936 928
      po/pt_BR.po
  67. 936 927
      po/ro.po
  68. 968 959
      po/ru.po
  69. 938 929
      po/sk.po
  70. 940 930
      po/sl.po
  71. 944 936
      po/sv.po
  72. 1 1
      po/th.po
  73. 921 913
      po/tl.po
  74. 952 944
      po/tr.po
  75. 948 939
      po/uk.po
  76. 937 929
      po/vi.po
  77. 938 931
      po/zh_CN.po
  78. 929 921
      po/zh_TW.po
  79. 95 0
      share/bash-completions/apt
  80. 1 1
      test/integration/test-failing-maintainer-scripts
  81. 5 1
      test/integration/test-ubuntu-bug-365611-long-package-names
  82. 66 0
      vendor/README
  83. 8 0
      vendor/blankon/apt-vendor.ent
  84. 10 0
      vendor/blankon/sources.list.in
  85. 6 0
      vendor/ubuntu/apt.conf-01-vendor-ubuntu

+ 0 - 63
README.MultiArch

@@ -1,63 +0,0 @@
-Before we start with this topic: Note that MultiArch is not yet ready for
-prime time and/or for the casual user. The implementation is so far widely
-untested and only useful for developers of packagemanagment tools which
-use APT and his friends and maintainers of (upcoming) MultiArch packages.
-This README is especially NOT written for the casual user and is NOT a
-usage guide - you have been warned. It is assumed that the reader has
-at least a bit of knowledge about APT internals, dependency relations
-and the MultiArch spec [0].
-
-Note also that the toolchain isn't ready yet, e.g. while you can simulate
-the installation of MultiArch packages they will more sooner than later
-cause enormous problems if really installed as dpkg can't handle MultiArch
-yet (no, --force-{overwrite,architecture} aren't good options here).
-Other parts of the big picture are missing and/or untested too.
-You have been warned!
-
-
-The implementation is focused on NOT breaking existing singleArch-only
-applications and/or systems as this is the current status-quo for all
-systems. Also, many systems don't need (or can't make use of) MultiArch,
-so APT will proceed in thinking SingleArch as long as it is not explicitly
-told to handle MultiArch:
-To activate MultiArch handling you need to specify architectures you
-want to be considered by APT with the config list APT::Architectures
-(Insert architectures in order of preference).
-APT will download Packages files for all these architectures in the
-update step. Exception: In the sourcelist is the optionfield used:
-deb [ arch=amd64,i386 ] http://example.org/ experimental main
-(This optionfield is a NOP in previous apt versions)
-
-Internally in APT a package is represented as a PkgIterator -
-before MultiArch this PkgIterator was architecture unaware,
-only VerIterators include the architecture they came from.
-This is/was a big problem as all versions in a package are
-considered for dependency resolution, so pinning will not work in all cases.
-
-The problem is solved by a conceptional change:
-A PkgIterator is now architecture aware, so the packages
-of foobar for amd64 and for i386 are now for apt internal totally
-different packages. That is a good thing for e.g. pinning, but
-sometimes you need the information that such packages are belonging together:
-All these foobar packages therefore form a Group accessible with GrpIterators.
-Note that the GrpIterator has the same name as all the packages in this group,
-so e.g. apt-cache pkgnames iterates over GrpIterator to get the package names:
-This is compatible to SingleArch as a Group consists only of a single package
-and also to MultiArch as a Group consists of possible many packages which
-all have the same name and are therefore out of interest for pkgnames.
-
-
-Given all these internal changes it is quite interesting that the actual
-implementation of MultiArch is trivial: Some implicit dependencies and a few
-more provides are all changes needed to get it working. Especially noteworthy
-is that it wasn't needed to change the resolver in any way and other parts only
-need to be told about using GrpIterator instead of PkgIterator, so chances are
-good that libapt-applications will proceed to work without or at least only
-require minor changes, but your mileage may vary…
-
-
-Known Issues and/or noteworthy stuff:
-* The implementation is mostly untested, so it is very likely that APT will
-  eat your kids if you aren't as lucky as the author of these patches.
-
-[0] https://wiki.ubuntu.com/MultiarchSpec

+ 4 - 2
apt-pkg/cacheset.cc

@@ -391,6 +391,8 @@ bool VersionContainerInterface::FromModifierCommandLine(unsigned short &modID,
 							CacheSetHelper &helper) {
 	Version select = NEWEST;
 	std::string str = cmdline;
+	if (unlikely(str.empty() == true))
+		return false;
 	bool modifierPresent = false;
 	unsigned short fallback = modID;
 	for (std::list<Modifier>::const_iterator mod = mods.begin();
@@ -400,8 +402,8 @@ bool VersionContainerInterface::FromModifierCommandLine(unsigned short &modID,
 		size_t const alength = strlen(mod->Alias);
 		switch(mod->Pos) {
 		case Modifier::POSTFIX:
-			if (str.compare(str.length() - alength, alength,
-					mod->Alias, 0, alength) != 0)
+			if (str.length() <= alength ||
+			      str.compare(str.length() - alength, alength, mod->Alias, 0, alength) != 0)
 				continue;
 			str.erase(str.length() - alength);
 			modID = mod->ID;

+ 41 - 25
apt-pkg/cdrom.cc

@@ -563,6 +563,15 @@ bool pkgCdrom::WriteSourceList(string Name,vector<string> &List,bool Source)
    return true;
 }
 									/*}}}*/
+bool pkgCdrom::UnmountCDROM(std::string const &CDROM, pkgCdromStatus * const log)/*{{{*/
+{
+   if (_config->FindB("APT::CDROM::NoMount",false) == true)
+      return true;
+   if (log != NULL)
+      log->Update(_("Unmounting CD-ROM...\n"), STEP_LAST);
+   return UnmountCdrom(CDROM);
+}
+									/*}}}*/
 bool pkgCdrom::MountAndIdentCDROM(Configuration &Database, std::string &CDROM, std::string &ident, pkgCdromStatus * const log, bool const interactive)/*{{{*/
 {
    // Startup
@@ -583,9 +592,7 @@ bool pkgCdrom::MountAndIdentCDROM(Configuration &Database, std::string &CDROM, s
    {
       if (interactive == true)
       {
-	 if(log != NULL)
-	    log->Update(_("Unmounting CD-ROM...\n"), STEP_LAST);
-	 UnmountCdrom(CDROM);
+	 UnmountCDROM(CDROM, log);
 
 	 if(log != NULL)
 	 {
@@ -605,6 +612,9 @@ bool pkgCdrom::MountAndIdentCDROM(Configuration &Database, std::string &CDROM, s
 	 return _error->Error("Failed to mount the cdrom.");
    }
 
+   if (IsMounted(CDROM) == false)
+      return _error->Error("Failed to mount the cdrom.");
+
    // Hash the CD to get an ID
    if (log != NULL)
       log->Update(_("Identifying... "), STEP_IDENT);
@@ -614,6 +624,7 @@ bool pkgCdrom::MountAndIdentCDROM(Configuration &Database, std::string &CDROM, s
       ident = "";
       if (log != NULL)
 	 log->Update("\n");
+      UnmountCDROM(CDROM, NULL);
       return false;
    }
 
@@ -629,8 +640,11 @@ bool pkgCdrom::MountAndIdentCDROM(Configuration &Database, std::string &CDROM, s
    if (FileExists(DFile) == true)
    {
       if (ReadConfigFile(Database,DFile) == false)
+      {
+	 UnmountCDROM(CDROM, NULL);
 	 return _error->Error("Unable to read the cdrom database %s",
 			      DFile.c_str());
+      }
    }
    return true;
 }
@@ -651,13 +665,7 @@ bool pkgCdrom::Ident(string &ident, pkgCdromStatus *log)		/*{{{*/
    }
 
    // Unmount and finish
-   if (_config->FindB("APT::CDROM::NoMount",false) == false)
-   {
-      if (log != NULL)
-	 log->Update(_("Unmounting CD-ROM...\n"), STEP_LAST);
-      UnmountCdrom(CDROM);
-   }
-
+   UnmountCDROM(CDROM, log);
    return true;
 }
 									/*}}}*/
@@ -682,11 +690,15 @@ bool pkgCdrom::Add(pkgCdromStatus *log)					/*{{{*/
    {
       if (log != NULL)
 	 log->Update("\n");
+      UnmountCDROM(CDROM, NULL);
       return false;
    }
 
    if (chdir(StartDir.c_str()) != 0)
+   {
+      UnmountCDROM(CDROM, NULL);
       return _error->Errno("chdir","Unable to change to %s", StartDir.c_str());
+   }
 
    if (_config->FindB("Debug::aptcdrom",false) == true)
    {
@@ -728,8 +740,7 @@ bool pkgCdrom::Add(pkgCdromStatus *log)					/*{{{*/
 
    if (List.empty() == true && SourceList.empty() == true) 
    {
-      if (_config->FindB("APT::CDROM::NoMount",false) == false) 
-	 UnmountCdrom(CDROM);
+      UnmountCDROM(CDROM, NULL);
       return _error->Error(_("Unable to locate any package files, perhaps this is not a Debian Disc or the wrong architecture?"));
    }
 
@@ -769,14 +780,14 @@ bool pkgCdrom::Add(pkgCdromStatus *log)					/*{{{*/
       {
 	 if(log == NULL) 
          {
-	    if (_config->FindB("APT::CDROM::NoMount",false) == false) 
-	       UnmountCdrom(CDROM);
+	    UnmountCDROM(CDROM, NULL);
 	    return _error->Error("No disc name found and no way to ask for it");
 	 }
 
 	 while(true) {
 	    if(!log->AskCdromName(Name)) {
 	       // user canceld
+	       UnmountCDROM(CDROM, NULL);
 	       return false; 
 	    }
 	    cout << "Name: '" << Name << "'" << endl;
@@ -813,7 +824,10 @@ bool pkgCdrom::Add(pkgCdromStatus *log)					/*{{{*/
    string const partialListDir = listDir + "partial/";
    if (CreateAPTDirectoryIfNeeded(_config->FindDir("Dir::State"), partialListDir) == false &&
        CreateAPTDirectoryIfNeeded(listDir, partialListDir) == false)
+   {
+      UnmountCDROM(CDROM, NULL);
       return _error->Errno("cdrom", _("List directory %spartial is missing."), listDir.c_str());
+   }
 
    // take care of the signatures and copy them if they are ok
    // (we do this before PackageCopy as it modifies "List" and "SourceList")
@@ -827,7 +841,10 @@ bool pkgCdrom::Add(pkgCdromStatus *log)					/*{{{*/
    if (Copy.CopyPackages(CDROM,Name,List, log) == false ||
        SrcCopy.CopyPackages(CDROM,Name,SourceList, log) == false ||
        TransCopy.CopyTranslations(CDROM,Name,TransList, log) == false)
+   {
+      UnmountCDROM(CDROM, NULL);
       return false;
+   }
 
    // reduce the List so that it takes less space in sources.list
    ReduceSourcelist(CDROM,List);
@@ -837,13 +854,19 @@ bool pkgCdrom::Add(pkgCdromStatus *log)					/*{{{*/
    if (_config->FindB("APT::cdrom::NoAct",false) == false)
    {
       if (WriteDatabase(Database) == false)
+      {
+	 UnmountCDROM(CDROM, NULL);
 	 return false;
-      
+      }
+
       if(log != NULL)
 	 log->Update(_("Writing new source list\n"), STEP_WRITE);
       if (WriteSourceList(Name,List,false) == false ||
 	  WriteSourceList(Name,SourceList,true) == false)
+      {
+	 UnmountCDROM(CDROM, NULL);
 	 return false;
+      }
    }
 
    // Print the sourcelist entries
@@ -855,8 +878,7 @@ bool pkgCdrom::Add(pkgCdromStatus *log)					/*{{{*/
       string::size_type Space = (*I).find(' ');
       if (Space == string::npos)
       {
-	 if (_config->FindB("APT::CDROM::NoMount",false) == false) 
-	    UnmountCdrom(CDROM);
+	 UnmountCDROM(CDROM, NULL);
 	 return _error->Error("Internal error");
       }
 
@@ -874,8 +896,7 @@ bool pkgCdrom::Add(pkgCdromStatus *log)					/*{{{*/
       string::size_type Space = (*I).find(' ');
       if (Space == string::npos)
       {
-	 if (_config->FindB("APT::CDROM::NoMount",false) == false) 
-	    UnmountCdrom(CDROM);
+	 UnmountCDROM(CDROM, NULL);
 	 return _error->Error("Internal error");
       }
 
@@ -888,12 +909,7 @@ bool pkgCdrom::Add(pkgCdromStatus *log)					/*{{{*/
    }
 
    // Unmount and finish
-   if (_config->FindB("APT::CDROM::NoMount",false) == false) {
-      if (log != NULL)
-	 log->Update(_("Unmounting CD-ROM...\n"), STEP_LAST);
-      UnmountCdrom(CDROM);
-   }
-
+   UnmountCDROM(CDROM, log);
    return true;
 }
 									/*}}}*/

+ 1 - 0
apt-pkg/cdrom.h

@@ -77,6 +77,7 @@ class pkgCdrom								/*{{{*/
  private:
    APT_HIDDEN bool MountAndIdentCDROM(Configuration &Database, std::string &CDROM,
 	 std::string &ident, pkgCdromStatus * const log, bool const interactive);
+   APT_HIDDEN bool UnmountCDROM(std::string const &CDROM, pkgCdromStatus * const log);
 };
 									/*}}}*/
 

+ 4 - 13
apt-pkg/contrib/fileutl.cc

@@ -58,13 +58,10 @@
 	#include <bzlib.h>
 #endif
 #ifdef HAVE_LZMA
-	#include <stdint.h>
 	#include <lzma.h>
 #endif
-
-#ifdef WORDS_BIGENDIAN
-#include <inttypes.h>
-#endif
+#include <endian.h>
+#include <stdint.h>
 
 #include <apti18n.h>
 									/*}}}*/
@@ -1880,19 +1877,13 @@ unsigned long long FileFd::Size()
 	  FileFdErrno("lseek","Unable to seek to end of gzipped file");
 	  return 0;
        }
-       size = 0;
+       uint32_t size = 0;
        if (read(iFd, &size, 4) != 4)
        {
 	  FileFdErrno("read","Unable to read original size of gzipped file");
 	  return 0;
        }
-
-#ifdef WORDS_BIGENDIAN
-       uint32_t tmp_size = size;
-       uint8_t const * const p = (uint8_t const * const) &tmp_size;
-       tmp_size = (p[3] << 24) | (p[2] << 16) | (p[1] << 8) | p[0];
-       size = tmp_size;
-#endif
+       size = le32toh(size);
 
        if (lseek(iFd, oldPos, SEEK_SET) < 0)
        {

+ 7 - 6
apt-pkg/deb/dpkgpm.cc

@@ -1053,14 +1053,15 @@ void pkgDPkgPM::StartPtyMagic()
    }
 
    // setup the pty and stuff
-   struct	winsize win;
+   struct winsize win;
 
-   // if tcgetattr does not return zero there was a error
-   // and we do not do any pty magic
+   // if tcgetattr for both stdin/stdout returns 0 (no error)
+   // we do the pty magic
    _error->PushToStack();
-   if (tcgetattr(STDOUT_FILENO, &d->tt) == 0)
+   if (tcgetattr(STDIN_FILENO, &d->tt) == 0 &&
+       tcgetattr(STDOUT_FILENO, &d->tt) == 0)
    {
-       if (ioctl(1, TIOCGWINSZ, (char *)&win) < 0)
+       if (ioctl(STDOUT_FILENO, TIOCGWINSZ, (char *)&win) < 0)
        {
            _error->Errno("ioctl", _("ioctl(TIOCGWINSZ) failed"));
        } else if (openpty(&d->master, &d->slave, NULL, &d->tt, &win) < 0)
@@ -1617,7 +1618,7 @@ void pkgDPkgPM::WriteApportReport(const char *pkgpath, const char *errormsg)
    string::size_type pos;
    FILE *report;
 
-   if (_config->FindB("Dpkg::ApportFailureReport", false) == false)
+   if (_config->FindB("Dpkg::ApportFailureReport", true) == false)
    {
       std::clog << "configured to not write apport reports" << std::endl;
       return;

+ 1 - 0
apt-pkg/init.cc

@@ -86,6 +86,7 @@ bool pkgInitConfig(Configuration &Cnf)
    Cnf.Set("Dir::Ignore-Files-Silently::", "\\.dpkg-[a-z]+$");
    Cnf.Set("Dir::Ignore-Files-Silently::", "\\.save$");
    Cnf.Set("Dir::Ignore-Files-Silently::", "\\.orig$");
+   Cnf.Set("Dir::Ignore-Files-Silently::", "\\.distUpgrade$");
 
    // Default cdrom mount point
    Cnf.CndSet("Acquire::cdrom::mount", "/media/cdrom/");

+ 9 - 0
apt-private/private-main.cc

@@ -8,9 +8,18 @@
 #include <iostream>
 #include <string.h>
 #include <unistd.h>
+#include <signal.h>
 
 #include <apti18n.h>
 
+
+void InitSignals()
+{
+   // Setup the signals
+   signal(SIGPIPE,SIG_IGN);
+}
+
+
 void CheckSimulateMode(CommandLine &CmdL)
 {
    // simulate user-friendly if apt-get has no root privileges

+ 1 - 0
apt-private/private-main.h

@@ -6,5 +6,6 @@
 class CommandLine;
 
 APT_PUBLIC void CheckSimulateMode(CommandLine &CmdL);
+APT_PUBLIC void InitSignals();
 
 #endif

+ 21 - 0
apt-private/private-output.cc

@@ -22,6 +22,7 @@
 #include <iostream>
 #include <langinfo.h>
 #include <unistd.h>
+#include <signal.h>
 
 #include <apti18n.h>
 									/*}}}*/
@@ -32,8 +33,24 @@ std::ostream c0out(0);
 std::ostream c1out(0);
 std::ostream c2out(0);
 std::ofstream devnull("/dev/null");
+
+
 unsigned int ScreenWidth = 80 - 1; /* - 1 for the cursor */
 
+// SigWinch - Window size change signal handler				/*{{{*/
+// ---------------------------------------------------------------------
+/* */
+static void SigWinch(int)
+{
+   // Riped from GNU ls
+#ifdef TIOCGWINSZ
+   struct winsize ws;
+  
+   if (ioctl(1, TIOCGWINSZ, &ws) != -1 && ws.ws_col >= 5)
+      ScreenWidth = ws.ws_col - 1;
+#endif
+}
+									/*}}}*/
 bool InitOutput()							/*{{{*/
 {
    if (!isatty(STDOUT_FILENO) && _config->FindI("quiet", -1) == -1)
@@ -47,6 +64,10 @@ bool InitOutput()							/*{{{*/
    if (_config->FindI("quiet",0) > 1)
       c1out.rdbuf(devnull.rdbuf());
 
+   // deal with window size changes
+   signal(SIGWINCH,SigWinch);
+   SigWinch(0);
+
    if(!isatty(1))
    {
       _config->Set("APT::Color", "false");

+ 0 - 306
cmdline/acqprogress.cc

@@ -1,306 +0,0 @@
-// -*- mode: cpp; mode: fold -*-
-// Description								/*{{{*/
-// $Id: acqprogress.cc,v 1.24 2003/04/27 01:56:48 doogie Exp $
-/* ######################################################################
-
-   Acquire Progress - Command line progress meter 
-   
-   ##################################################################### */
-									/*}}}*/
-// Include files							/*{{{*/
-#include<config.h>
-
-#include <apt-pkg/acquire.h>
-#include <apt-pkg/acquire-item.h>
-#include <apt-pkg/acquire-worker.h>
-#include <apt-pkg/configuration.h>
-#include <apt-pkg/strutl.h>
-#include <apt-pkg/error.h>
-
-#include <string.h>
-#include <stdio.h>
-#include <signal.h>
-#include <iostream>
-#include <unistd.h>
-
-#include "acqprogress.h"
-#include <apti18n.h>
-									/*}}}*/
-
-using namespace std;
-
-// AcqTextStatus::AcqTextStatus - Constructor				/*{{{*/
-// ---------------------------------------------------------------------
-/* */
-AcqTextStatus::AcqTextStatus(unsigned int &ScreenWidth,unsigned int Quiet) :
-    ScreenWidth(ScreenWidth), ID(0), Quiet(Quiet)
-{
-   BlankLine[0] = 0;
-}
-									/*}}}*/
-// AcqTextStatus::Start - Downloading has started			/*{{{*/
-// ---------------------------------------------------------------------
-/* */
-void AcqTextStatus::Start() 
-{
-   pkgAcquireStatus::Start(); 
-   BlankLine[0] = 0;
-   ID = 1;
-};
-									/*}}}*/
-// AcqTextStatus::IMSHit - Called when an item got a HIT response	/*{{{*/
-// ---------------------------------------------------------------------
-/* */
-void AcqTextStatus::IMSHit(pkgAcquire::ItemDesc &Itm)
-{
-   if (Quiet > 1)
-      return;
-
-   if (Quiet <= 0)
-      cout << '\r' << BlankLine << '\r';   
-   
-   cout << _("Hit ") << Itm.Description;
-   if (Itm.Owner->FileSize != 0)
-      cout << " [" << SizeToStr(Itm.Owner->FileSize) << "B]";
-   cout << endl;
-   Update = true;
-};
-									/*}}}*/
-// AcqTextStatus::Fetch - An item has started to download		/*{{{*/
-// ---------------------------------------------------------------------
-/* This prints out the short description and the expected size */
-void AcqTextStatus::Fetch(pkgAcquire::ItemDesc &Itm)
-{
-   Update = true;
-   if (Itm.Owner->Complete == true)
-      return;
-   
-   Itm.Owner->ID = ID++;
-   
-   if (Quiet > 1)
-      return;
-
-   if (Quiet <= 0)
-      cout << '\r' << BlankLine << '\r';
-   
-   cout << _("Get:") << Itm.Owner->ID << ' ' << Itm.Description;
-   if (Itm.Owner->FileSize != 0)
-      cout << " [" << SizeToStr(Itm.Owner->FileSize) << "B]";
-   cout << endl;
-};
-									/*}}}*/
-// AcqTextStatus::Done - Completed a download				/*{{{*/
-// ---------------------------------------------------------------------
-/* We don't display anything... */
-void AcqTextStatus::Done(pkgAcquire::ItemDesc &Itm)
-{
-   Update = true;
-};
-									/*}}}*/
-// AcqTextStatus::Fail - Called when an item fails to download		/*{{{*/
-// ---------------------------------------------------------------------
-/* We print out the error text  */
-void AcqTextStatus::Fail(pkgAcquire::ItemDesc &Itm)
-{
-   if (Quiet > 1)
-      return;
-
-   // Ignore certain kinds of transient failures (bad code)
-   if (Itm.Owner->Status == pkgAcquire::Item::StatIdle)
-      return;
-      
-   if (Quiet <= 0)
-      cout << '\r' << BlankLine << '\r';
-   
-   if (Itm.Owner->Status == pkgAcquire::Item::StatDone)
-   {
-      cout << _("Ign ") << Itm.Description << endl;
-   }
-   else
-   {
-      cout << _("Err ") << Itm.Description << endl;
-      cout << "  " << Itm.Owner->ErrorText << endl;
-   }
-   
-   Update = true;
-};
-									/*}}}*/
-// AcqTextStatus::Stop - Finished downloading				/*{{{*/
-// ---------------------------------------------------------------------
-/* This prints out the bytes downloaded and the overall average line
-   speed */
-void AcqTextStatus::Stop()
-{
-   pkgAcquireStatus::Stop();
-   if (Quiet > 1)
-      return;
-
-   if (Quiet <= 0)
-      cout << '\r' << BlankLine << '\r' << flush;
-
-   if (FetchedBytes != 0 && _error->PendingError() == false)
-      ioprintf(cout,_("Fetched %sB in %s (%sB/s)\n"),
-	       SizeToStr(FetchedBytes).c_str(),
-	       TimeToStr(ElapsedTime).c_str(),
-	       SizeToStr(CurrentCPS).c_str());
-}
-									/*}}}*/
-// AcqTextStatus::Pulse - Regular event pulse				/*{{{*/
-// ---------------------------------------------------------------------
-/* This draws the current progress. Each line has an overall percent
-   meter and a per active item status meter along with an overall 
-   bandwidth and ETA indicator. */
-bool AcqTextStatus::Pulse(pkgAcquire *Owner)
-{
-   pkgAcquireStatus::Pulse(Owner);
-   
-   if (Quiet > 0)
-      return true;
-   
-   enum {Long = 0,Medium,Short} Mode = Medium;
-   
-   char Buffer[sizeof(BlankLine)];
-   char *End = Buffer + sizeof(Buffer);
-   char *S = Buffer;
-   if (ScreenWidth >= sizeof(Buffer))
-      ScreenWidth = sizeof(Buffer)-1;
-
-   // Put in the percent done
-   sprintf(S,"%.0f%%",((CurrentBytes + CurrentItems)*100.0)/(TotalBytes+TotalItems));
-
-   bool Shown = false;
-   for (pkgAcquire::Worker *I = Owner->WorkersBegin(); I != 0;
-	I = Owner->WorkerStep(I))
-   {
-      S += strlen(S);
-      
-      // There is no item running 
-      if (I->CurrentItem == 0)
-      {
-	 if (I->Status.empty() == false)
-	 {
-	    snprintf(S,End-S," [%s]",I->Status.c_str());
-	    Shown = true;
-	 }
-	 
-	 continue;
-      }
-
-      Shown = true;
-      
-      // Add in the short description
-      if (I->CurrentItem->Owner->ID != 0)
-	 snprintf(S,End-S," [%lu %s",I->CurrentItem->Owner->ID,
-		  I->CurrentItem->ShortDesc.c_str());
-      else
-	 snprintf(S,End-S," [%s",I->CurrentItem->ShortDesc.c_str());
-      S += strlen(S);
-
-      // Show the short mode string
-      if (I->CurrentItem->Owner->Mode != 0)
-      {
-	 snprintf(S,End-S," %s",I->CurrentItem->Owner->Mode);
-	 S += strlen(S);
-      }
-            
-      // Add the current progress
-      if (Mode == Long)
-	 snprintf(S,End-S," %llu",I->CurrentSize);
-      else
-      {
-	 if (Mode == Medium || I->TotalSize == 0)
-	    snprintf(S,End-S," %sB",SizeToStr(I->CurrentSize).c_str());
-      }
-      S += strlen(S);
-      
-      // Add the total size and percent
-      if (I->TotalSize > 0 && I->CurrentItem->Owner->Complete == false)
-      {
-	 if (Mode == Short)
-	    snprintf(S,End-S," %.0f%%",
-		     (I->CurrentSize*100.0)/I->TotalSize);
-	 else
-	    snprintf(S,End-S,"/%sB %.0f%%",SizeToStr(I->TotalSize).c_str(),
-		     (I->CurrentSize*100.0)/I->TotalSize);
-      }      
-      S += strlen(S);
-      snprintf(S,End-S,"]");
-   }
-
-   // Show something..
-   if (Shown == false)
-      snprintf(S,End-S,_(" [Working]"));
-      
-   /* Put in the ETA and cps meter, block off signals to prevent strangeness
-      during resizing */
-   sigset_t Sigs,OldSigs;
-   sigemptyset(&Sigs);
-   sigaddset(&Sigs,SIGWINCH);
-   sigprocmask(SIG_BLOCK,&Sigs,&OldSigs);
-   
-   if (CurrentCPS != 0)
-   {      
-      char Tmp[300];
-      unsigned long long ETA = (TotalBytes - CurrentBytes)/CurrentCPS;
-      sprintf(Tmp," %sB/s %s",SizeToStr(CurrentCPS).c_str(),TimeToStr(ETA).c_str());
-      unsigned int Len = strlen(Buffer);
-      unsigned int LenT = strlen(Tmp);
-      if (Len + LenT < ScreenWidth)
-      {	 
-	 memset(Buffer + Len,' ',ScreenWidth - Len);
-	 strcpy(Buffer + ScreenWidth - LenT,Tmp);
-      }      
-   }
-   Buffer[ScreenWidth] = 0;
-   BlankLine[ScreenWidth] = 0;
-   sigprocmask(SIG_SETMASK,&OldSigs,0);
-
-   // Draw the current status
-   if (strlen(Buffer) == strlen(BlankLine))
-      cout << '\r' << Buffer << flush;
-   else
-      cout << '\r' << BlankLine << '\r' << Buffer << flush;
-   memset(BlankLine,' ',strlen(Buffer));
-   BlankLine[strlen(Buffer)] = 0;
-   
-   Update = false;
-
-   return true;
-}
-									/*}}}*/
-// AcqTextStatus::MediaChange - Media need to be swapped		/*{{{*/
-// ---------------------------------------------------------------------
-/* Prompt for a media swap */
-bool AcqTextStatus::MediaChange(string Media,string Drive)
-{
-   // If we do not output on a terminal and one of the options to avoid user
-   // interaction is given, we assume that no user is present who could react
-   // on your media change request
-   if (isatty(STDOUT_FILENO) != 1 && Quiet >= 2 &&
-       (_config->FindB("APT::Get::Assume-Yes",false) == true ||
-	_config->FindB("APT::Get::Force-Yes",false) == true ||
-	_config->FindB("APT::Get::Trivial-Only",false) == true))
-
-      return false;
-
-   if (Quiet <= 0)
-      cout << '\r' << BlankLine << '\r';
-   ioprintf(cout,_("Media change: please insert the disc labeled\n"
-		   " '%s'\n"
-		   "in the drive '%s' and press enter\n"),
-	    Media.c_str(),Drive.c_str());
-
-   char C = 0;
-   bool bStatus = true;
-   while (C != '\n' && C != '\r')
-   {
-      int len = read(STDIN_FILENO,&C,1);
-      if(C == 'c' || len <= 0)
-	 bStatus = false;
-   }
-
-   if(bStatus)
-      Update = true;
-   return bStatus;
-}
-									/*}}}*/

+ 0 - 39
cmdline/acqprogress.h

@@ -1,39 +0,0 @@
-// -*- mode: cpp; mode: fold -*-
-// Description								/*{{{*/
-// $Id: acqprogress.h,v 1.5 2003/02/02 22:24:11 jgg Exp $
-/* ######################################################################
-
-   Acquire Progress - Command line progress meter 
-   
-   ##################################################################### */
-									/*}}}*/
-#ifndef ACQPROGRESS_H
-#define ACQPROGRESS_H
-
-#include <apt-pkg/acquire.h>
-
-#include <string>
-
-class AcqTextStatus : public pkgAcquireStatus
-{
-   unsigned int &ScreenWidth;
-   char BlankLine[1024];
-   unsigned long ID;
-   unsigned long Quiet;
-   
-   public:
-   
-   virtual bool MediaChange(std::string Media,std::string Drive);
-   virtual void IMSHit(pkgAcquire::ItemDesc &Itm);
-   virtual void Fetch(pkgAcquire::ItemDesc &Itm);
-   virtual void Done(pkgAcquire::ItemDesc &Itm);
-   virtual void Fail(pkgAcquire::ItemDesc &Itm);
-   virtual void Start();
-   virtual void Stop();
-   
-   bool Pulse(pkgAcquire *Owner);
-
-   AcqTextStatus(unsigned int &ScreenWidth,unsigned int Quiet);
-};
-
-#endif

+ 3 - 19
cmdline/apt-get.cc

@@ -1664,20 +1664,6 @@ static bool ShowHelp(CommandLine &)
       "pages for more information and options.\n"
       "                       This APT has Super Cow Powers.\n");
    return true;
-}
-									/*}}}*/
-// SigWinch - Window size change signal handler				/*{{{*/
-// ---------------------------------------------------------------------
-/* */
-static void SigWinch(int)
-{
-   // Riped from GNU ls
-#ifdef TIOCGWINSZ
-   struct winsize ws;
-  
-   if (ioctl(1, TIOCGWINSZ, &ws) != -1 && ws.ws_col >= 5)
-      ScreenWidth = ws.ws_col - 1;
-#endif
 }
 									/*}}}*/
 int main(int argc,const char *argv[])					/*{{{*/
@@ -1734,14 +1720,12 @@ int main(int argc,const char *argv[])					/*{{{*/
    // see if we are in simulate mode
    CheckSimulateMode(CmdL);
 
+   // Init the signals
+   InitSignals();
+
    // Setup the output streams
    InitOutput();
 
-   // Setup the signals
-   signal(SIGPIPE,SIG_IGN);
-   signal(SIGWINCH,SigWinch);
-   SigWinch(0);
-
    // Match the operation
    CmdL.DispatchArg(Cmds);
 

+ 4 - 0
cmdline/apt.cc

@@ -96,6 +96,10 @@ int main(int argc, const char *argv[])					/*{{{*/
 
    std::vector<CommandLine::Args> Args = getCommandArgs("apt", CommandLine::GetCommand(Cmds, argc, argv));
 
+   // Init the signals
+   InitSignals();
+
+   // Init the output
    InitOutput();
 
    // Set up gettext support

+ 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)
 
 PACKAGE="apt"
-PACKAGE_VERSION="1.0.1"
+PACKAGE_VERSION="1.0.2"
 PACKAGE_MAIL="APT Development Team <deity@lists.debian.org>"
 AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE")
 AC_DEFINE_UNQUOTED(PACKAGE_VERSION,"$PACKAGE_VERSION")

+ 0 - 1
debian/apt-doc.docs

@@ -1,3 +1,2 @@
 README.progress-reporting
-README.MultiArch
 doc/external-dependency-solver-protocol.txt

+ 2 - 0
debian/apt.conf.autoremove

@@ -22,6 +22,8 @@ APT
 	".*-modules";
 	".*-kernel";
 	"linux-backports-modules-.*";
+        # tools
+        "linux-tools";
   };
 
   Never-MarkAuto-Sections

+ 1 - 0
debian/apt.dirs

@@ -15,3 +15,4 @@ var/lib/apt/mirrors/partial
 var/lib/apt/periodic
 var/log/apt
 usr/share/bug/apt
+usr/share/bash-completion/completions/

+ 1 - 1
debian/apt.install.in

@@ -3,4 +3,4 @@ bin/apt-* usr/bin/
 bin/methods/* usr/lib/apt/methods/
 scripts/dselect/* usr/lib/dpkg/methods/apt/
 usr/share/locale/*/*/apt.mo
-bin/libapt-private.so.* usr/lib/@DEB_HOST_MULTIARCH@/
+bin/libapt-private.so.* usr/lib/@DEB_HOST_MULTIARCH@/

+ 3 - 0
debian/apt.maintscript

@@ -0,0 +1,3 @@
+rm_conffile /etc/apt/apt.conf.d/20changelog 1.0.3 -- "@"
+
+

+ 31 - 0
debian/changelog

@@ -1,3 +1,34 @@
+apt (1.0.2) unstable; urgency=medium
+
+  [ Michael Vogt ]
+  * fix apt list output for pkgs in dpkg ^rc state
+  * Notice the user about "apt list -a" when only a single hit if found
+  * fix test-failure in adt
+  * apt-private/acqprogress.cc: fix output when ctrl-c is hit during 
+    apt update (LP: #1310548, closes: #744297)
+  * Fix option name DPkg::Progress-Fancy in apt.8 manpage
+    (LP: #1310506)
+
+  [ David Kalnischkies ]
+  * don't double-count seeks in FileFd::Skip for bzip/xz
+  * deal with umask only if we really need to for mkstemp
+  * consider priorities only for downloadable pkgs in resolver
+  * force fancy progressbar redraw on window size change
+  * clear HitEof flag in FileFd::Seek
+  * use Google C++ Testing Framework for libapt tests
+  * support dist-upgrade options in full-upgrade
+
+  [ Trần Ngọc Quân ]
+  * l10n: vi.po (624t): Update translation
+
+  [ Theppitak Karoonboonyanan ]
+  * Updated Thai program translation (closes: #745120)
+
+  [ James McCoy ]
+  * Consistently use Dpkg::Progress* in documentation (Closes: 745452)
+
+ -- Michael Vogt <mvo@debian.org>  Fri, 25 Apr 2014 13:15:03 +0200
+
 apt (1.0.1) unstable; urgency=medium
 
   [ Michael Vogt ]

+ 4 - 0
debian/rules

@@ -189,6 +189,10 @@ apt: build-binary build-manpages debian/apt.install
 	cp debian/apt.conf.autoremove debian/$@/etc/apt/apt.conf.d/01autoremove
 	cp debian/apt.auto-removal.sh debian/$@/etc/kernel/postinst.d/apt-auto-removal
 	chmod 755 debian/$@/etc/kernel/postinst.d/apt-auto-removal
+	# install bash completion
+	cp share/bash-completions/* debian/$@/usr/share/bash-completion/completions/
+	# install vendor specific apt confs
+	find -L vendor/current -name 'apt.conf-*' | while read conf; do cp "$${conf}" "debian/$@/etc/apt/apt.conf.d/$${conf#*-}"; done
 
 	# make rosetta happy and remove pot files in po/ (but leave stuff
 	# in po/domains/* untouched) and cp *.po into each domain dir

+ 1 - 1
doc/apt-verbatim.ent

@@ -225,7 +225,7 @@
 ">
 
 <!-- this will be updated by 'prepare-release' -->
-<!ENTITY apt-product-version "1.0.1">
+<!ENTITY apt-product-version "1.0.2">
 
 <!-- (Code)names for various things used all over the place -->
 <!ENTITY oldstable-codename "squeeze">

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

@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: apt-doc 1.0.1\n"
 "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
-"POT-Creation-Date: 2014-04-10 10:18+0200\n"
+"POT-Creation-Date: 2014-04-25 13:17+0200\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -642,7 +642,7 @@ msgstr ""
 
 #. type: Content of: <refentry><refsect1><para><itemizedlist><listitem><para>
 #: apt.8.xml:151
-msgid "The option <literal>DPkgPM::Progress-Fancy</literal> is enabled."
+msgid "The option <literal>DPkg::Progress-Fancy</literal> is enabled."
 msgstr ""
 
 #. type: Content of: <refentry><refsect1><para><itemizedlist><listitem><para>
@@ -1280,7 +1280,7 @@ msgid ""
 "Show user friendly progress information in the terminal window when packages "
 "are installed, upgraded or removed. For a machine parsable version of this "
 "data see README.progress-reporting in the apt doc directory.  Configuration "
-"Item: <literal>DpkgPM::Progress</literal> and "
+"Item: <literal>Dpkg::Progress</literal> and "
 "<literal>Dpkg::Progress-Fancy</literal>."
 msgstr ""
 

+ 10 - 3
doc/po/de.po

@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: apt-doc 0.9.16\n"
 "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
-"POT-Creation-Date: 2014-04-10 09:49+0200\n"
+"POT-Creation-Date: 2014-04-25 13:17+0200\n"
 "PO-Revision-Date: 2014-04-01 14:00+0200\n"
 "Last-Translator: Chris Leick <c.leick@vollbio.de>\n"
 "Language-Team: German <debian-l10n-german@lists.debian.org>\n"
@@ -798,7 +798,7 @@ msgstr ""
 #: apt.8.xml:151
 #, fuzzy
 #| msgid "the <literal>Package:</literal> line"
-msgid "The option <literal>DPkgPM::Progress-Fancy</literal> is enabled."
+msgid "The option <literal>DPkg::Progress-Fancy</literal> is enabled."
 msgstr "die <literal>Package:</literal>-Zeile"
 
 #. type: Content of: <refentry><refsect1><para><itemizedlist><listitem><para>
@@ -1766,11 +1766,18 @@ msgstr ""
 # FIXME s/Item/Items/
 #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para>
 #: apt-get.8.xml:535
+#, fuzzy
+#| msgid ""
+#| "Show user friendly progress information in the terminal window when "
+#| "packages are installed, upgraded or removed. For a machine parsable "
+#| "version of this data see README.progress-reporting in the apt doc "
+#| "directory.  Configuration Item: <literal>DpkgPM::Progress</literal> and "
+#| "<literal>Dpkg::Progress-Fancy</literal>."
 msgid ""
 "Show user friendly progress information in the terminal window when packages "
 "are installed, upgraded or removed. For a machine parsable version of this "
 "data see README.progress-reporting in the apt doc directory.  Configuration "
-"Item: <literal>DpkgPM::Progress</literal> and <literal>Dpkg::Progress-Fancy</"
+"Item: <literal>Dpkg::Progress</literal> and <literal>Dpkg::Progress-Fancy</"
 "literal>."
 msgstr ""
 "zeigt benutzerfreundliche Fortschrittsinformationen im Terminalfenster, wenn "

+ 3 - 3
doc/po/es.po

@@ -38,7 +38,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: apt 0.9.7.1\n"
 "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
-"POT-Creation-Date: 2014-04-10 09:49+0200\n"
+"POT-Creation-Date: 2014-04-25 13:17+0200\n"
 "PO-Revision-Date: 2014-04-01 14:00+0200\n"
 "Last-Translator: Omar Campagne <ocampagne@gmail.com>\n"
 "Language-Team: Debian l10n Spanish <debian-l10n-spanish@lists.debian.org>\n"
@@ -882,7 +882,7 @@ msgstr ""
 #: apt.8.xml:151
 #, fuzzy
 #| msgid "the <literal>Package:</literal> line"
-msgid "The option <literal>DPkgPM::Progress-Fancy</literal> is enabled."
+msgid "The option <literal>DPkg::Progress-Fancy</literal> is enabled."
 msgstr "La línea <literal>Package:</literal>"
 
 #. type: Content of: <refentry><refsect1><para><itemizedlist><listitem><para>
@@ -1883,7 +1883,7 @@ msgid ""
 "Show user friendly progress information in the terminal window when packages "
 "are installed, upgraded or removed. For a machine parsable version of this "
 "data see README.progress-reporting in the apt doc directory.  Configuration "
-"Item: <literal>DpkgPM::Progress</literal> and <literal>Dpkg::Progress-Fancy</"
+"Item: <literal>Dpkg::Progress</literal> and <literal>Dpkg::Progress-Fancy</"
 "literal>."
 msgstr ""
 

+ 3 - 3
doc/po/fr.po

@@ -10,7 +10,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: \n"
 "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
-"POT-Creation-Date: 2014-04-10 09:49+0200\n"
+"POT-Creation-Date: 2014-04-25 13:17+0200\n"
 "PO-Revision-Date: 2014-04-01 14:00+0200\n"
 "Last-Translator: Christian Perrier <bubulle@debian.org>\n"
 "Language-Team: French <debian-l10n-french@lists.debian.org>\n"
@@ -793,7 +793,7 @@ msgstr ""
 #: apt.8.xml:151
 #, fuzzy
 #| msgid "the <literal>Package:</literal> line"
-msgid "The option <literal>DPkgPM::Progress-Fancy</literal> is enabled."
+msgid "The option <literal>DPkg::Progress-Fancy</literal> is enabled."
 msgstr "la ligne <literal>Package:</literal>"
 
 #. type: Content of: <refentry><refsect1><para><itemizedlist><listitem><para>
@@ -1804,7 +1804,7 @@ msgid ""
 "Show user friendly progress information in the terminal window when packages "
 "are installed, upgraded or removed. For a machine parsable version of this "
 "data see README.progress-reporting in the apt doc directory.  Configuration "
-"Item: <literal>DpkgPM::Progress</literal> and <literal>Dpkg::Progress-Fancy</"
+"Item: <literal>Dpkg::Progress</literal> and <literal>Dpkg::Progress-Fancy</"
 "literal>."
 msgstr ""
 

+ 10 - 3
doc/po/it.po

@@ -10,7 +10,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: \n"
 "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
-"POT-Creation-Date: 2014-04-10 09:49+0200\n"
+"POT-Creation-Date: 2014-04-25 13:17+0200\n"
 "PO-Revision-Date: 2014-04-01 14:00+0200\n"
 "Last-Translator: Beatrice Torracca <beatricet@libero.it>\n"
 "Language-Team: Italian <debian-l10n-italian@lists.debian.org>\n"
@@ -845,7 +845,7 @@ msgstr ""
 #: apt.8.xml:151
 #, fuzzy
 #| msgid "the <literal>Package:</literal> line"
-msgid "The option <literal>DPkgPM::Progress-Fancy</literal> is enabled."
+msgid "The option <literal>DPkg::Progress-Fancy</literal> is enabled."
 msgstr "la riga <literal>Package:</literal>"
 
 #. type: Content of: <refentry><refsect1><para><itemizedlist><listitem><para>
@@ -1802,11 +1802,18 @@ msgstr ""
 
 #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para>
 #: apt-get.8.xml:535
+#, fuzzy
+#| msgid ""
+#| "Show user friendly progress information in the terminal window when "
+#| "packages are installed, upgraded or removed. For a machine parsable "
+#| "version of this data see README.progress-reporting in the apt doc "
+#| "directory.  Configuration Item: <literal>DpkgPM::Progress</literal> and "
+#| "<literal>Dpkg::Progress-Fancy</literal>."
 msgid ""
 "Show user friendly progress information in the terminal window when packages "
 "are installed, upgraded or removed. For a machine parsable version of this "
 "data see README.progress-reporting in the apt doc directory.  Configuration "
-"Item: <literal>DpkgPM::Progress</literal> and <literal>Dpkg::Progress-Fancy</"
+"Item: <literal>Dpkg::Progress</literal> and <literal>Dpkg::Progress-Fancy</"
 "literal>."
 msgstr ""
 "Mostra informazioni sul progresso facili da leggere nella finestra del "

+ 3 - 3
doc/po/ja.po

@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: apt 0.7.25.3\n"
 "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
-"POT-Creation-Date: 2014-04-10 09:49+0200\n"
+"POT-Creation-Date: 2014-04-25 13:17+0200\n"
 "PO-Revision-Date: 2014-04-01 14:00+0200\n"
 "Last-Translator: KURASAWA Nozomu <nabetaro@debian.or.jp>\n"
 "Language-Team: Debian Japanese List <debian-japanese@lists.debian.org>\n"
@@ -838,7 +838,7 @@ msgstr ""
 #: apt.8.xml:151
 #, fuzzy
 #| msgid "the <literal>Package:</literal> line"
-msgid "The option <literal>DPkgPM::Progress-Fancy</literal> is enabled."
+msgid "The option <literal>DPkg::Progress-Fancy</literal> is enabled."
 msgstr "<literal>Package:</literal> 行"
 
 #. type: Content of: <refentry><refsect1><para><itemizedlist><listitem><para>
@@ -1793,7 +1793,7 @@ msgid ""
 "Show user friendly progress information in the terminal window when packages "
 "are installed, upgraded or removed. For a machine parsable version of this "
 "data see README.progress-reporting in the apt doc directory.  Configuration "
-"Item: <literal>DpkgPM::Progress</literal> and <literal>Dpkg::Progress-Fancy</"
+"Item: <literal>Dpkg::Progress</literal> and <literal>Dpkg::Progress-Fancy</"
 "literal>."
 msgstr ""
 

+ 3 - 3
doc/po/pl.po

@@ -11,7 +11,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: apt 0.9.7.3\n"
 "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
-"POT-Creation-Date: 2014-04-10 09:49+0200\n"
+"POT-Creation-Date: 2014-04-25 13:17+0200\n"
 "PO-Revision-Date: 2014-04-01 13:59+0200\n"
 "Last-Translator: Robert Luberda <robert@debian.org>\n"
 "Language-Team: Polish <manpages-pl-list@lists.sourceforge.net>\n"
@@ -841,7 +841,7 @@ msgstr ""
 #: apt.8.xml:151
 #, fuzzy
 #| msgid "the <literal>Package:</literal> line"
-msgid "The option <literal>DPkgPM::Progress-Fancy</literal> is enabled."
+msgid "The option <literal>DPkg::Progress-Fancy</literal> is enabled."
 msgstr "linia <literal>Package:</literal>"
 
 #. type: Content of: <refentry><refsect1><para><itemizedlist><listitem><para>
@@ -1882,7 +1882,7 @@ msgid ""
 "Show user friendly progress information in the terminal window when packages "
 "are installed, upgraded or removed. For a machine parsable version of this "
 "data see README.progress-reporting in the apt doc directory.  Configuration "
-"Item: <literal>DpkgPM::Progress</literal> and <literal>Dpkg::Progress-Fancy</"
+"Item: <literal>Dpkg::Progress</literal> and <literal>Dpkg::Progress-Fancy</"
 "literal>."
 msgstr ""
 

+ 3 - 3
doc/po/pt.po

@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: apt 0.9.7.1\n"
 "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
-"POT-Creation-Date: 2014-04-10 09:49+0200\n"
+"POT-Creation-Date: 2014-04-25 13:17+0200\n"
 "PO-Revision-Date: 2014-04-01 13:59+0200\n"
 "Last-Translator: Américo Monteiro <a_monteiro@netcabo.pt>\n"
 "Language-Team: Portuguese <l10n@debianpt.org>\n"
@@ -842,7 +842,7 @@ msgstr ""
 #: apt.8.xml:151
 #, fuzzy
 #| msgid "the <literal>Package:</literal> line"
-msgid "The option <literal>DPkgPM::Progress-Fancy</literal> is enabled."
+msgid "The option <literal>DPkg::Progress-Fancy</literal> is enabled."
 msgstr "a linha <literal>Package:</literal>"
 
 #. type: Content of: <refentry><refsect1><para><itemizedlist><listitem><para>
@@ -1831,7 +1831,7 @@ msgid ""
 "Show user friendly progress information in the terminal window when packages "
 "are installed, upgraded or removed. For a machine parsable version of this "
 "data see README.progress-reporting in the apt doc directory.  Configuration "
-"Item: <literal>DpkgPM::Progress</literal> and <literal>Dpkg::Progress-Fancy</"
+"Item: <literal>Dpkg::Progress</literal> and <literal>Dpkg::Progress-Fancy</"
 "literal>."
 msgstr ""
 

+ 3 - 3
doc/po/pt_BR.po

@@ -10,7 +10,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: apt\n"
 "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
-"POT-Creation-Date: 2014-04-10 09:49+0200\n"
+"POT-Creation-Date: 2014-04-25 13:17+0200\n"
 "PO-Revision-Date: 2004-09-20 17:02+0000\n"
 "Last-Translator: André Luís Lopes <andrelop@debian.org>\n"
 "Language-Team: <debian-l10n-portuguese@lists.debian.org>\n"
@@ -639,7 +639,7 @@ msgstr ""
 #. type: Content of: <refentry><refsect1><para><itemizedlist><listitem><para>
 #: apt.8.xml:151
 #, fuzzy
-msgid "The option <literal>DPkgPM::Progress-Fancy</literal> is enabled."
+msgid "The option <literal>DPkg::Progress-Fancy</literal> is enabled."
 msgstr "a linha <literal>Package:</literal>"
 
 #. type: Content of: <refentry><refsect1><para><itemizedlist><listitem><para>
@@ -1278,7 +1278,7 @@ msgid ""
 "Show user friendly progress information in the terminal window when packages "
 "are installed, upgraded or removed. For a machine parsable version of this "
 "data see README.progress-reporting in the apt doc directory.  Configuration "
-"Item: <literal>DpkgPM::Progress</literal> and <literal>Dpkg::Progress-Fancy</"
+"Item: <literal>Dpkg::Progress</literal> and <literal>Dpkg::Progress-Fancy</"
 "literal>."
 msgstr ""
 

+ 2 - 2
ftparchive/override.cc

@@ -37,7 +37,7 @@ bool Override::ReadOverride(string const &File,bool const &Source)
    if (F == 0)
       return _error->Errno("fopen",_("Unable to open %s"),File.c_str());
    
-   char Line[500];
+   char Line[1000];
    unsigned long long Counter = 0;
    while (fgets(Line,sizeof(Line),F) != 0)
    {
@@ -141,7 +141,7 @@ bool Override::ReadExtraOverride(string const &File,bool const &/*Source*/)
    if (F == 0)
       return _error->Errno("fopen",_("Unable to open %s"),File.c_str());
   
-   char Line[500];
+   char Line[1000];
    unsigned long long Counter = 0;
    while (fgets(Line,sizeof(Line),F) != 0)
    {

+ 31 - 57
methods/http.cc

@@ -45,6 +45,7 @@
 #include <stdio.h>
 #include <errno.h>
 #include <iostream>
+#include <sstream>
 
 #include "config.h"
 #include "connect.h"
@@ -667,22 +668,13 @@ void HttpMethod::SendReq(FetchItem *Itm)
    URI Uri = Itm->Uri;
 
    // The HTTP server expects a hostname with a trailing :port
-   char Buf[1000];
+   std::stringstream Req;
    string ProperHost;
 
    if (Uri.Host.find(':') != string::npos)
       ProperHost = '[' + Uri.Host + ']';
    else
       ProperHost = Uri.Host;
-   if (Uri.Port != 0)
-   {
-      sprintf(Buf,":%u",Uri.Port);
-      ProperHost += Buf;
-   }   
-      
-   // Just in case.
-   if (Itm->Uri.length() >= sizeof(Buf))
-       abort();
 
    /* RFC 2616 §5.1.2 requires absolute URIs for requests to proxies,
       but while its a must for all servers to accept absolute URIs,
@@ -701,27 +693,20 @@ void HttpMethod::SendReq(FetchItem *Itm)
       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());
+   Req << "GET " << requesturi << " HTTP/1.1\r\n";
+   if (Uri.Port != 0)
+      Req << "Host: " << ProperHost << ":" << Uri.Port << "\r\n";
+   else
+      Req << "Host: " << ProperHost << "\r\n";
 
    // generate a cache control header (if needed)
-   if (_config->FindB("Acquire::http::No-Cache",false) == true) 
-   {
-      strcat(Buf,"Cache-Control: no-cache\r\nPragma: no-cache\r\n");
-   }
-   else
-   {
-      if (Itm->IndexFile == true) 
-      {
-	 sprintf(Buf+strlen(Buf),"Cache-Control: max-age=%u\r\n",
-		 _config->FindI("Acquire::http::Max-Age",0));
-      }
-      else
-      {
-	 if (_config->FindB("Acquire::http::No-Store",false) == true)
-	    strcat(Buf,"Cache-Control: no-store\r\n");
-      }
-   }
+   if (_config->FindB("Acquire::http::No-Cache",false) == true)
+      Req << "Cache-Control: no-cache\r\n"
+	 << "Pragma: no-cache\r\n";
+   else if (Itm->IndexFile == true)
+      Req << "Cache-Control: max-age=" << _config->FindI("Acquire::http::Max-Age",0) << "\r\n";
+   else if (_config->FindB("Acquire::http::No-Store",false) == true)
+      Req << "Cache-Control: no-store\r\n";
 
    // If we ask for uncompressed files servers might respond with content-
    // negotiation which lets us end up with compressed files we do not support,
@@ -733,46 +718,35 @@ void HttpMethod::SendReq(FetchItem *Itm)
       size_t const filepos = Itm->Uri.find_last_of('/');
       string const file = Itm->Uri.substr(filepos + 1);
       if (flExtension(file) == file)
-	 strcat(Buf,"Accept: text/*\r\n");
+	 Req << "Accept: text/*\r\n";
    }
 
-   string Req = Buf;
-
-   // Check for a partial file
+   // Check for a partial file and send if-queries accordingly
    struct stat SBuf;
    if (stat(Itm->DestFile.c_str(),&SBuf) >= 0 && SBuf.st_size > 0)
-   {
-      // In this case we send an if-range query with a range header
-      sprintf(Buf,"Range: bytes=%lli-\r\nIf-Range: %s\r\n",(long long)SBuf.st_size,
-	      TimeRFC1123(SBuf.st_mtime).c_str());
-      Req += Buf;
-   }
-   else
-   {
-      if (Itm->LastModified != 0)
-      {
-	 sprintf(Buf,"If-Modified-Since: %s\r\n",TimeRFC1123(Itm->LastModified).c_str());
-	 Req += Buf;
-      }
-   }
+      Req << "Range: bytes=" << SBuf.st_size << "-\r\n"
+	 << "If-Range: " << TimeRFC1123(SBuf.st_mtime) << "\r\n";
+   else if (Itm->LastModified != 0)
+      Req << "If-Modified-Since: " << TimeRFC1123(Itm->LastModified).c_str() << "\r\n";
 
    if (Server->Proxy.User.empty() == false || Server->Proxy.Password.empty() == false)
-      Req += string("Proxy-Authorization: Basic ") + 
-          Base64Encode(Server->Proxy.User + ":" + Server->Proxy.Password) + "\r\n";
+      Req << "Proxy-Authorization: Basic "
+	 << Base64Encode(Server->Proxy.User + ":" + Server->Proxy.Password) << "\r\n";
 
    maybe_add_auth (Uri, _config->FindFile("Dir::Etc::netrc"));
    if (Uri.User.empty() == false || Uri.Password.empty() == false)
-   {
-      Req += string("Authorization: Basic ") + 
-          Base64Encode(Uri.User + ":" + Uri.Password) + "\r\n";
-   }
-   Req += "User-Agent: " + _config->Find("Acquire::http::User-Agent",
-		"Debian APT-HTTP/1.3 (" PACKAGE_VERSION ")") + "\r\n\r\n";
-   
+      Req << "Authorization: Basic "
+	 << Base64Encode(Uri.User + ":" + Uri.Password) << "\r\n";
+
+   Req << "User-Agent: " << _config->Find("Acquire::http::User-Agent",
+		"Debian APT-HTTP/1.3 (" PACKAGE_VERSION ")") << "\r\n";
+
+   Req << "\r\n";
+
    if (Debug == true)
       cerr << Req << endl;
 
-   Server->WriteResponse(Req);
+   Server->WriteResponse(Req.str());
 }
 									/*}}}*/
 // HttpMethod::Configuration - Handle a configuration message		/*{{{*/

+ 5 - 5
methods/https.cc

@@ -325,11 +325,11 @@ bool HttpsMethod::Fetch(FetchItem *Itm)
    // if we have the file send an if-range query with a range header
    if (stat(Itm->DestFile.c_str(),&SBuf) >= 0 && SBuf.st_size > 0)
    {
-      char Buf[1000];
-      sprintf(Buf, "Range: bytes=%li-", (long) SBuf.st_size);
-      headers = curl_slist_append(headers, Buf);
-      sprintf(Buf, "If-Range: %s", TimeRFC1123(SBuf.st_mtime).c_str());
-      headers = curl_slist_append(headers, Buf);
+      std::string Buf;
+      strprintf(Buf, "Range: bytes=%lli-", (long long) SBuf.st_size);
+      headers = curl_slist_append(headers, Buf.c_str());
+      strprintf(Buf, "If-Range: %s", TimeRFC1123(SBuf.st_mtime).c_str());
+      headers = curl_slist_append(headers, Buf.c_str());
    }
    else if(Itm->LastModified > 0)
    {

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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


+ 1 - 1
po/th.po

@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: apt\n"
 "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
-"POT-Creation-Date: 2014-04-18 16:21+0200\n"
+"POT-Creation-Date: 2014-04-25 13:17+0200\n"
 "PO-Revision-Date: 2014-04-20 09:38+0700\n"
 "Last-Translator: Theppitak Karoonboonyanan <thep@debian.org>\n"
 "Language-Team: Thai <thai-l10n@googlegroups.com>\n"

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


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


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


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


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


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


+ 95 - 0
share/bash-completions/apt

@@ -0,0 +1,95 @@
+# Debian apt(8) completion                             -*- shell-script -*-
+
+_apt()
+{
+    local sourcesdir="/etc/apt/sources.list.d"
+    local cur prev words cword
+    _init_completion || return
+
+    # see if the user selected a command already
+    local COMMANDS=("install" "remove" "purge" "show" "list"
+                    "update" "upgrade" "full-upgrade" "dist-upgrade"
+                    "edit-sources" "help")
+
+    local command i
+    for (( i=0; i < ${#words[@]}-1; i++ )); do
+        if [[ ${COMMANDS[@]} =~ ${words[i]} ]]; then
+            command=${words[i]}
+            break
+        fi
+    done
+
+    # supported options per command
+    if [[ "$cur" == -* ]]; then
+        case $command in
+            install|remove|purge|upgrade|full-upgrade)
+                COMPREPLY=( $( compgen -W '--show-progress
+                  --fix-broken --purge --verbose-versions --auto-remove
+                  --simulate --dry-run
+                  --download
+                  --fix-missing
+                  --fix-policy
+                  --ignore-hold
+                  --force-yes
+                  --trivial-only
+                  --reinstall --solver' -- "$cur" ) )
+                return 0
+                ;;
+            update)
+                COMPREPLY=( $( compgen -W '--list-cleanup 
+                  ' -- "$cur" ) )
+                return 0
+                ;;
+            list)
+                COMPREPLY=( $( compgen -W '--installed --upgradable 
+                  --manual-installed
+                  -v --verbose
+                  -a --all-versions
+                  ' -- "$cur" ) )
+                return 0
+                ;;
+            show)
+                COMPREPLY=( $( compgen -W '-a --all-versions
+                  ' -- "$cur" ) )
+                return 0
+                ;;
+        esac
+    fi
+
+    # specific command arguments
+    if [[ -n $command ]]; then
+        case $command in
+            remove|purge)
+                if [[ -f /etc/debian_version ]]; then
+                    # Debian system
+                    COMPREPLY=( $( \
+                        _xfunc dpkg _comp_dpkg_installed_packages $cur ) )
+                else
+                    # assume RPM based
+                    _xfunc rpm _rpm_installed_packages
+                fi
+                return 0
+                ;;
+            install|show|list)
+                COMPREPLY=( $( apt-cache --no-generate pkgnames "$cur" \
+                    2> /dev/null ) )
+                return 0
+                ;;
+            edit-sources)
+                COMPREPLY=( $( compgen -W '$( command ls $sourcesdir )' \
+                    -- "$cur" ) )
+                return 0
+                ;;
+        esac
+    fi
+
+    # no command yet, show what commands we have
+    if [ "$command" = "" ]; then
+        COMPREPLY=( $( compgen -W '${COMMANDS[@]}' -- "$cur" ) )
+    fi
+
+    return 0
+} &&
+complete -F _apt apt
+
+# ex: ts=4 sw=4 et filetype=sh

+ 1 - 1
test/integration/test-failing-maintainer-scripts

@@ -86,7 +86,7 @@ testmyfailure() {
 	testfailure "$@" -o APT::Status-Fd=3
 	msgtest 'Test for failure message of maintainerscript in' 'console log'
 	local TEST='rootdir/tmp/testfailure.output'
-	if grep -q 'exit status 29$' "$TEST"; then
+	if grep -q 'exit status 29' "$TEST"; then
 		msgpass
 	else
 		cat $TEST

+ 5 - 1
test/integration/test-ubuntu-bug-365611-long-package-names

@@ -4,8 +4,12 @@ set -e
 TESTDIR=$(readlink -f $(dirname $0))
 . $TESTDIR/framework
 setupenvironment
-configarchitecture "i386"
+configarchitecture 'i386'
 setupaptarchive
 
 aptget install $(for i in $(seq 0 1000); do echo -n 'a'; done) 2> longpackagename.log > /dev/null || true
 testfileequal 'longpackagename.log' "E: Unable to locate package $(for i in $(seq 0 1000); do echo -n 'a'; done)"
+
+# … and the opposite of long:
+aptget install "" -s >longpackagename.log 2>&1 || true
+testfileequal 'longpackagename.log' "$(aptget install -s)"

+ 66 - 0
vendor/README

@@ -0,0 +1,66 @@
+The vendor system in APT is an experiment to help distributions ship a stock
+apt release instead of applying documentation patches to it, increasing
+maintenance burden for everyone and hiding 'interesting' patches in the mix.
+
+The provided information is used in the apt-key script and in documentation
+like manpages and example configuration files. If you have patches modifying
+additional bits and pieces currently not covered by this system please
+contact us so we can change this!
+
+
+== Adding a new vendor
+
+In the same directory you found this README in you should create a new
+directory with the name of your distribution (as defined by dpkg-vendor,
+ e.g. via "dpkg-vendor --query Vendor"). The name is case-insensitive,
+but ensure that the name is otherwise correct and the other fields in
+your deb-origin(5) file are correct as well as our buildsystem relies on
+this information.
+
+If no information is found for the current vendor at buildtime, the system
+looks for a vendor the current vendor is a derivative of, falling back to
+Debian if all else fails.
+
+The directory should include 2 files at the moment. It is best to look
+at the files of other distributions to understand what values are to be
+expected. Some additional notes about them can be found below.
+
+If we happen to include new fields/files in this system, we will opt for
+using a sensible default rather than failing the build or similar, so
+you are recommend to watch this space.
+Ensure also that your information is up-to-date!
+
+Contributing a new vendor as well as updating a existing one is best done
+by opening a bug in the Debian BTS against apt with a patch attached.
+
+
+== apt-vendor.ent
+
+The format used is the one DocBook XML uses. The file is included as an
+entity file in the manpages xml source, so the syntax has to be valid!
+
+The keyring-* settings are additionally used also in the creation of the
+apt-key script and the keyring-package in particular as a dependency for apt.
+
+The field current-codename is optional and can be used in sources.list.in.
+
+
+== sources.list.in
+
+An example for a sources.list which will be shipped in /usr/share/doc.
+This file will NOT be installed in /etc or otherwise used by apt.
+
+You can use some placeholders in this file, namely:
+* &debian-stable-codename;
+* &debian-oldstable-codename;
+* &debian-testing-codename;
+* &ubuntu-codename;
+with the value you would expect based on the name.
+
+The placeholder &current-codename; is yours and can be set in apt-vendor.ent
+
+
+== apt.conf-*
+
+Files in your vendor directory following this naming scheme will be picked up
+by the debian/rules file and installed in /etc/apt/apt.conf.d/ directory.

+ 8 - 0
vendor/blankon/apt-vendor.ent

@@ -0,0 +1,8 @@
+<!-- details about the keys used by the distribution -->
+<!ENTITY keyring-distro "BlankOn">
+<!ENTITY keyring-package "<package>blankon-keyring</package>">
+<!ENTITY keyring-filename "<filename>/usr/share/keyrings/blankon-archive-keyring.gpg</filename>">
+<!ENTITY keyring-removed-filename "<filename>/usr/share/keyrings/blankon-archive-removed-keys.gpg</filename>">
+<!ENTITY keyring-master-filename "/usr/share/keyrings/blankon-master-keyring.gpg">
+<!ENTITY keyring-uri "http://arsip.blankonlinux.or.id/blankon/project/blankon-archive-keyring.gpg">
+<!ENTITY current-codename "tambora">

+ 10 - 0
vendor/blankon/sources.list.in

@@ -0,0 +1,10 @@
+# See sources.list(5) manpage for more information
+# Remember that CD-ROMs, DVDs and such are managed through the apt-cdrom tool.
+deb http://arsip.blankonlinux.or.id/blankon &current-codename; main restricted
+deb-src http://arsip.blankonlinux.or.id/blankon &current-codename; main restricted
+
+deb http://arsip.blankonlinux.or.id/blankon &current-codename;-security main restricted
+deb-src http://arsip.blankonlinux.or.id/blankon &current-codename;-security main restricted
+
+deb http://arsip.blankonlinux.or.id/blankon &current-codename;-updates main restricted
+deb-src http://arsip.blankonlinux.or.id/blankon &current-codename;-updates main restricted

+ 6 - 0
vendor/ubuntu/apt.conf-01-vendor-ubuntu

@@ -0,0 +1,6 @@
+// Server information for apt-changelog
+APT {
+  Changelogs {
+    Server "http://changelogs.ubuntu.com/changelogs";
+  };
+};