Переглянути джерело

* apt-pkg/acquire.cc:
- make the max pipeline depth of the acquire queue configurable
via Acquire::Max-Pipeline-Depth
* apt-pkg/deb/dpkgpm.cc:
- add Dpkg::UseIoNice boolean option to run dpkg with ionice -c3
(off by default)
- send "dpkg-exec" message on the status fd when dpkg is run
- provide DPkg::Chroot-Directory config option (useful for testing)
- fix potential hang when in a backgroud process group
* apt-pkg/algorithms.cc:
- consider recommends when making the scores for the problem
resolver
* apt-pkg/acquire-worker.cc:
- show error details of failed methods
* apt-pkg/contrib/fileutl.cc:
- if a process aborts with signal, show signal number
* methods/http.cc:
- ignore SIGPIPE, we deal with EPIPE from write in
HttpMethod::ServerDie() (LP: #385144)
* apt-pkg/indexcopy.cc:
- support having CDs with no Packages file (just a Packages.gz)
by not forcing a verification on non-existing files
(LP: #255545)
- remove the gettext from a string that consists entirely
of variables (LP: #56792)
* apt-pkg/cacheiterators.h:
- add missing checks for Owner == 0 in end()
* apt-pkg/indexrecords.cc:
- fix some i18n issues
* apt-pkg/contrib/strutl.h:
- add new strprintf() function to make i18n strings easier
- fix compiler warning
* apt-pkg/deb/debsystem.cc:
- make strings i18n able
* fix problematic use of tolower() when calculating the version
hash by using locale independant tolower_ascii() function.
Thanks to M. Vefa Bicakci (LP: #80248)
* build fixes for g++-4.4
* cmdline/apt-mark:
- add "showauto" option to show automatically installed packages
* document --install-recommends and --no-install-recommends
(thanks to Dereck Wonnacott, LP: #126180)
* Updated cron script to support backups by hardlinks and
verbose levels. All features turned off by default.
* Added more error handlings. Closes: #438803, #462734, #454989,
* Refactored condition structure to make download and upgrade performed
if only previous steps succeeded. Closes: #341970
* Documented all cron script related configuration items in
configure-index.
* apt-ftparchive might write corrupt Release files (LP: #46439)
* Apply --important option to apt-cache depends (LP: #16947)

Michael Vogt 17 роки тому
батько
коміт
53391d0fc5

+ 1 - 1
README.arch

@@ -1,7 +1,7 @@
 
 
 You can build apt from arch, but this needs the following additional
 You can build apt from arch, but this needs the following additional
 packages (in addtion to the usual build-depends):
 packages (in addtion to the usual build-depends):
-autoconf automake xmlto perlsgml sgml2x sgmlspl docbook
+autoconf automake xmlto perlsgml sgml2x sgmlspl docbook doxygen
 
 
 then run:
 then run:
 
 

+ 2 - 5
apt-pkg/acquire-worker.cc

@@ -527,10 +527,6 @@ bool pkgAcquire::Worker::OutFdReady()
    
    
    if (Res <= 0)
    if (Res <= 0)
       return MethodFailure();
       return MethodFailure();
-
-   // Hmm.. this should never happen.
-   if (Res < 0)
-      return true;
    
    
    OutQueue.erase(0,Res);
    OutQueue.erase(0,Res);
    if (OutQueue.empty() == true)
    if (OutQueue.empty() == true)
@@ -558,7 +554,8 @@ bool pkgAcquire::Worker::MethodFailure()
 {
 {
    _error->Error("Method %s has died unexpectedly!",Access.c_str());
    _error->Error("Method %s has died unexpectedly!",Access.c_str());
    
    
-   ExecWait(Process,Access.c_str(),true);
+   // do not reap the child here to show meaningfull error to the user
+   ExecWait(Process,Access.c_str(),false);
    Process = -1;
    Process = -1;
    close(InFd);
    close(InFd);
    close(OutFd);
    close(OutFd);

+ 3 - 2
apt-pkg/acquire.cc

@@ -24,7 +24,8 @@
 
 
 #include <iostream>
 #include <iostream>
 #include <sstream>
 #include <sstream>
-    
+#include <stdio.h>
+
 #include <dirent.h>
 #include <dirent.h>
 #include <sys/time.h>
 #include <sys/time.h>
 #include <errno.h>
 #include <errno.h>
@@ -620,7 +621,7 @@ bool pkgAcquire::Queue::Startup()
          added other source retry to have cycle maintain a pipeline depth
          added other source retry to have cycle maintain a pipeline depth
          on its own. */
          on its own. */
       if (Cnf->Pipeline == true)
       if (Cnf->Pipeline == true)
-	 MaxPipeDepth = 1000;
+	 MaxPipeDepth = _config->FindI("Acquire::Max-Pipeline-Depth",10);
       else
       else
 	 MaxPipeDepth = 1;
 	 MaxPipeDepth = 1;
    }
    }

+ 10 - 3
apt-pkg/algorithms.cc

@@ -501,6 +501,7 @@ void pkgProblemResolver::MakeScores()
    signed short PrioEssentials = _config->FindI("pkgProblemResolver::Scores::Essentials",100);
    signed short PrioEssentials = _config->FindI("pkgProblemResolver::Scores::Essentials",100);
    signed short PrioInstalledAndNotObsolete = _config->FindI("pkgProblemResolver::Scores::NotObsolete",1);
    signed short PrioInstalledAndNotObsolete = _config->FindI("pkgProblemResolver::Scores::NotObsolete",1);
    signed short PrioDepends = _config->FindI("pkgProblemResolver::Scores::Depends",1);
    signed short PrioDepends = _config->FindI("pkgProblemResolver::Scores::Depends",1);
+   signed short PrioRecommends = _config->FindI("pkgProblemResolver::Scores::Recommends",1);
    signed short AddProtected = _config->FindI("pkgProblemResolver::Scores::AddProtected",10000);
    signed short AddProtected = _config->FindI("pkgProblemResolver::Scores::AddProtected",10000);
    signed short AddEssential = _config->FindI("pkgProblemResolver::Scores::AddEssential",5000);
    signed short AddEssential = _config->FindI("pkgProblemResolver::Scores::AddEssential",5000);
 
 
@@ -514,6 +515,7 @@ void pkgProblemResolver::MakeScores()
          << "  Essentials => " << PrioEssentials << endl
          << "  Essentials => " << PrioEssentials << endl
          << "  InstalledAndNotObsolete => " << PrioInstalledAndNotObsolete << endl
          << "  InstalledAndNotObsolete => " << PrioInstalledAndNotObsolete << endl
          << "  Depends => " << PrioDepends << endl
          << "  Depends => " << PrioDepends << endl
+         << "  Recommends => " << PrioRecommends << endl
          << "  AddProtected => " << AddProtected << endl
          << "  AddProtected => " << AddProtected << endl
          << "  AddEssential => " << AddEssential << endl;
          << "  AddEssential => " << AddEssential << endl;
 
 
@@ -552,8 +554,11 @@ void pkgProblemResolver::MakeScores()
       
       
       for (pkgCache::DepIterator D = Cache[I].InstVerIter(Cache).DependsList(); D.end() == false; D++)
       for (pkgCache::DepIterator D = Cache[I].InstVerIter(Cache).DependsList(); D.end() == false; D++)
       {
       {
-	 if (D->Type == pkgCache::Dep::Depends || D->Type == pkgCache::Dep::PreDepends)
-	    Scores[D.TargetPkg()->ID]+= PrioDepends;
+	 if (D->Type == pkgCache::Dep::Depends || 
+	     D->Type == pkgCache::Dep::PreDepends)
+	    Scores[D.TargetPkg()->ID] += PrioDepends;
+	 else if (D->Type == pkgCache::Dep::Recommends)
+	    Scores[D.TargetPkg()->ID] += PrioRecommends;
       }
       }
    }   
    }   
    
    
@@ -573,7 +578,9 @@ void pkgProblemResolver::MakeScores()
       {
       {
 	 // Only do it for the install version
 	 // Only do it for the install version
 	 if ((pkgCache::Version *)D.ParentVer() != Cache[D.ParentPkg()].InstallVer ||
 	 if ((pkgCache::Version *)D.ParentVer() != Cache[D.ParentPkg()].InstallVer ||
-	     (D->Type != pkgCache::Dep::Depends && D->Type != pkgCache::Dep::PreDepends))
+	     (D->Type != pkgCache::Dep::Depends && 
+	      D->Type != pkgCache::Dep::PreDepends &&
+	      D->Type != pkgCache::Dep::Recommends))
 	    continue;	 
 	    continue;	 
 	 
 	 
 	 Scores[I->ID] += abs(OldScores[D.ParentPkg()->ID]);
 	 Scores[I->ID] += abs(OldScores[D.ParentPkg()->ID]);

+ 5 - 5
apt-pkg/cacheiterators.h

@@ -110,7 +110,7 @@ class pkgCache::VerIterator
    // Iteration
    // Iteration
    void operator ++(int) {if (Ver != Owner->VerP) Ver = Owner->VerP + Ver->NextVer;};
    void operator ++(int) {if (Ver != Owner->VerP) Ver = Owner->VerP + Ver->NextVer;};
    inline void operator ++() {operator ++(0);};
    inline void operator ++() {operator ++(0);};
-   inline bool end() const {return Owner == NULL || (Ver == Owner->VerP?true:false);};
+   inline bool end() const {return Owner == 0 || (Ver == Owner->VerP?true:false);};
    inline void operator =(const VerIterator &B) {Ver = B.Ver; Owner = B.Owner;};
    inline void operator =(const VerIterator &B) {Ver = B.Ver; Owner = B.Owner;};
    
    
    // Comparison
    // Comparison
@@ -169,7 +169,7 @@ class pkgCache::DescIterator
    // Iteration
    // Iteration
    void operator ++(int) {if (Desc != Owner->DescP) Desc = Owner->DescP + Desc->NextDesc;};
    void operator ++(int) {if (Desc != Owner->DescP) Desc = Owner->DescP + Desc->NextDesc;};
    inline void operator ++() {operator ++(0);};
    inline void operator ++() {operator ++(0);};
-   inline bool end() const {return Desc == Owner->DescP?true:false;};
+   inline bool end() const {return Owner == 0 || Desc == Owner->DescP?true:false;};
    inline void operator =(const DescIterator &B) {Desc = B.Desc; Owner = B.Owner;};
    inline void operator =(const DescIterator &B) {Desc = B.Desc; Owner = B.Owner;};
    
    
    // Comparison
    // Comparison
@@ -323,7 +323,7 @@ class pkgCache::PkgFileIterator
    // Iteration
    // Iteration
    void operator ++(int) {if (File!= Owner->PkgFileP) File = Owner->PkgFileP + File->NextFile;};
    void operator ++(int) {if (File!= Owner->PkgFileP) File = Owner->PkgFileP + File->NextFile;};
    inline void operator ++() {operator ++(0);};
    inline void operator ++() {operator ++(0);};
-   inline bool end() const {return File == Owner->PkgFileP?true:false;};
+   inline bool end() const {return Owner == 0 || File == Owner->PkgFileP?true:false;};
 
 
    // Comparison
    // Comparison
    inline bool operator ==(const PkgFileIterator &B) const {return File == B.File;};
    inline bool operator ==(const PkgFileIterator &B) const {return File == B.File;};
@@ -370,7 +370,7 @@ class pkgCache::VerFileIterator
    // Iteration
    // Iteration
    void operator ++(int) {if (FileP != Owner->VerFileP) FileP = Owner->VerFileP + FileP->NextFile;};
    void operator ++(int) {if (FileP != Owner->VerFileP) FileP = Owner->VerFileP + FileP->NextFile;};
    inline void operator ++() {operator ++(0);};
    inline void operator ++() {operator ++(0);};
-   inline bool end() const {return FileP == Owner->VerFileP?true:false;};
+   inline bool end() const {return Owner == 0 || FileP == Owner->VerFileP?true:false;};
 
 
    // Comparison
    // Comparison
    inline bool operator ==(const VerFileIterator &B) const {return FileP == B.FileP;};
    inline bool operator ==(const VerFileIterator &B) const {return FileP == B.FileP;};
@@ -402,7 +402,7 @@ class pkgCache::DescFileIterator
    // Iteration
    // Iteration
    void operator ++(int) {if (FileP != Owner->DescFileP) FileP = Owner->DescFileP + FileP->NextFile;};
    void operator ++(int) {if (FileP != Owner->DescFileP) FileP = Owner->DescFileP + FileP->NextFile;};
    inline void operator ++() {operator ++(0);};
    inline void operator ++() {operator ++(0);};
-   inline bool end() const {return FileP == Owner->DescFileP?true:false;};
+   inline bool end() const {return Owner == 0 ||  FileP == Owner->DescFileP?true:false;};
 
 
    // Comparison
    // Comparison
    inline bool operator ==(const DescFileIterator &B) const {return FileP == B.FileP;};
    inline bool operator ==(const DescFileIterator &B) const {return FileP == B.FileP;};

+ 1 - 1
apt-pkg/cdrom.cc

@@ -686,7 +686,7 @@ bool pkgCdrom::Add(pkgCdromStatus *log)
    {
    {
       if (_config->FindB("APT::CDROM::NoMount",false) == false) 
       if (_config->FindB("APT::CDROM::NoMount",false) == false) 
 	 UnmountCdrom(CDROM);
 	 UnmountCdrom(CDROM);
-      return _error->Error("Unable to locate any package files, perhaps this is not a Debian Disc");
+      return _error->Error(_("Unable to locate any package files, perhaps this is not a Debian Disc or the wrong architecture?"));
    }
    }
 
 
    // Check if the CD is in the database
    // Check if the CD is in the database

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

@@ -450,8 +450,11 @@ bool ExecWait(pid_t Pid,const char *Name,bool Reap)
    {
    {
       if (Reap == true)
       if (Reap == true)
 	 return false;
 	 return false;
-      if (WIFSIGNALED(Status) != 0 && WTERMSIG(Status) == SIGSEGV)
-	 return _error->Error(_("Sub-process %s received a segmentation fault."),Name);
+      if (WIFSIGNALED(Status) != 0)
+	 if( WTERMSIG(Status) == SIGSEGV)
+	    return _error->Error(_("Sub-process %s received a segmentation fault."),Name);
+	 else 
+	    return _error->Error(_("Sub-process %s received signal %u."),Name, WTERMSIG(Status));
 
 
       if (WIFEXITED(Status) != 0)
       if (WIFEXITED(Status) != 0)
 	 return _error->Error(_("Sub-process %s returned an error code (%u)"),Name,WEXITSTATUS(Status));
 	 return _error->Error(_("Sub-process %s returned an error code (%u)"),Name,WEXITSTATUS(Status));

+ 1 - 0
apt-pkg/contrib/sha256.h

@@ -17,6 +17,7 @@
 #include <string>
 #include <string>
 #include <cstring>
 #include <cstring>
 #include <algorithm>
 #include <algorithm>
+#include <stdint.h>
 
 
 using std::string;
 using std::string;
 using std::min;
 using std::min;

+ 27 - 1
apt-pkg/contrib/strutl.cc

@@ -1042,11 +1042,26 @@ void ioprintf(ostream &out,const char *format,...)
    va_start(args,format);
    va_start(args,format);
    
    
    // sprintf the description
    // sprintf the description
-   char S[400];
+   char S[4096];
    vsnprintf(S,sizeof(S),format,args);
    vsnprintf(S,sizeof(S),format,args);
    out << S;
    out << S;
 }
 }
 									/*}}}*/
 									/*}}}*/
+// strprintf - C format string outputter to C++ strings 		/*{{{*/
+// ---------------------------------------------------------------------
+/* This is used to make the internationalization strings easier to translate
+   and to allow reordering of parameters */
+void strprintf(string &out,const char *format,...) 
+{
+   va_list args;
+   va_start(args,format);
+   
+   // sprintf the description
+   char S[4096];
+   vsnprintf(S,sizeof(S),format,args);
+   out = string(S);
+}
+									/*}}}*/
 // safe_snprintf - Safer snprintf					/*{{{*/
 // safe_snprintf - Safer snprintf					/*{{{*/
 // ---------------------------------------------------------------------
 // ---------------------------------------------------------------------
 /* This is a snprintf that will never (ever) go past 'End' and returns a
 /* This is a snprintf that will never (ever) go past 'End' and returns a
@@ -1070,6 +1085,17 @@ char *safe_snprintf(char *Buffer,char *End,const char *Format,...)
 }
 }
 									/*}}}*/
 									/*}}}*/
 
 
+// tolower_ascii - tolower() function that ignores the locale		/*{{{*/
+// ---------------------------------------------------------------------
+/* */
+int tolower_ascii(int c)
+{
+   if (c >= 'A' and c <= 'Z')
+      return c + 32;
+   return c;
+}
+									/*}}}*/
+
 // CheckDomainList - See if Host is in a , seperate list		/*{{{*/
 // CheckDomainList - See if Host is in a , seperate list		/*{{{*/
 // ---------------------------------------------------------------------
 // ---------------------------------------------------------------------
 /* The domain list is a comma seperate list of domains that are suffix
 /* The domain list is a comma seperate list of domains that are suffix

+ 2 - 0
apt-pkg/contrib/strutl.h

@@ -60,8 +60,10 @@ bool Hex2Num(const string &Str,unsigned char *Num,unsigned int Length);
 bool TokSplitString(char Tok,char *Input,char **List,
 bool TokSplitString(char Tok,char *Input,char **List,
 		    unsigned long ListMax);
 		    unsigned long ListMax);
 void ioprintf(ostream &out,const char *format,...) APT_FORMAT2;
 void ioprintf(ostream &out,const char *format,...) APT_FORMAT2;
+void strprintf(string &out,const char *format,...) APT_FORMAT2;
 char *safe_snprintf(char *Buffer,char *End,const char *Format,...) APT_FORMAT3;
 char *safe_snprintf(char *Buffer,char *End,const char *Format,...) APT_FORMAT3;
 bool CheckDomainList(const string &Host, const string &List);
 bool CheckDomainList(const string &Host, const string &List);
+int tolower_ascii(int c);
 
 
 #define APT_MKSTRCMP(name,func) \
 #define APT_MKSTRCMP(name,func) \
 inline int name(const char *A,const char *AEnd,const char *B) {return func(A,AEnd,B,B+strlen(B));}; \
 inline int name(const char *A,const char *AEnd,const char *B) {return func(A,AEnd,B,B+strlen(B));}; \

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

@@ -215,7 +215,7 @@ unsigned short debListParser::VersionHash()
       for (; Start != End; Start++)
       for (; Start != End; Start++)
       {
       {
 	 if (isspace(*Start) == 0)
 	 if (isspace(*Start) == 0)
-	    *I++ = tolower(*Start);
+	    *I++ = tolower_ascii(*Start);
 	 if (*Start == '<' && Start[1] != '<' && Start[1] != '=')
 	 if (*Start == '<' && Start[1] != '<' && Start[1] != '=')
 	    *I++ = '=';
 	    *I++ = '=';
 	 if (*Start == '>' && Start[1] != '>' && Start[1] != '=')
 	 if (*Start == '>' && Start[1] != '>' && Start[1] != '=')

+ 6 - 6
apt-pkg/deb/debsystem.cc

@@ -67,11 +67,11 @@ bool debSystem::Lock()
    if (LockFD == -1)
    if (LockFD == -1)
    {
    {
       if (errno == EACCES || errno == EAGAIN)
       if (errno == EACCES || errno == EAGAIN)
-	 return _error->Error("Unable to lock the administration directory (%s), "
-			      "is another process using it?",AdminDir.c_str());
+	 return _error->Error(_("Unable to lock the administration directory (%s), "
+	                        "is another process using it?"),AdminDir.c_str());
       else
       else
-	 return _error->Error("Unable to lock the administration directory (%s), "
-			      "are you root?",AdminDir.c_str());
+	 return _error->Error(_("Unable to lock the administration directory (%s), "
+	                        "are you root?"),AdminDir.c_str());
    }
    }
    
    
    // See if we need to abort with a dirty journal
    // See if we need to abort with a dirty journal
@@ -79,8 +79,8 @@ bool debSystem::Lock()
    {
    {
       close(LockFD);
       close(LockFD);
       LockFD = -1;
       LockFD = -1;
-      return _error->Error("dpkg was interrupted, you must manually "
-			   "run 'dpkg --configure -a' to correct the problem. ");
+      return _error->Error(_("dpkg was interrupted, you must manually "
+                             "run 'dpkg --configure -a' to correct the problem. "));
    }
    }
 
 
 	 LockCount++;
 	 LockCount++;

+ 69 - 14
apt-pkg/deb/dpkgpm.cc

@@ -74,6 +74,31 @@ namespace
   };
   };
 }
 }
 
 
+/* helper function to ionice the given PID 
+
+ there is no C header for ionice yet - just the syscall interface
+ so we use the binary from util-linux
+*/
+static bool
+ionice(int PID)
+{
+   if (!FileExists("/usr/bin/ionice"))
+      return false;
+   pid_t Process = ExecFork();      
+   if (Process == 0)
+   {
+      char buf[32];
+      snprintf(buf, sizeof(buf), "-p%d", PID);
+      const char *Args[4];
+      Args[0] = "/usr/bin/ionice";
+      Args[1] = "-c3";
+      Args[2] = buf;
+      Args[3] = 0;
+      execv(Args[0], (char **)Args);
+   }
+   return ExecWait(Process, "ionice");
+}
+
 // DPkgPM::pkgDPkgPM - Constructor					/*{{{*/
 // DPkgPM::pkgDPkgPM - Constructor					/*{{{*/
 // ---------------------------------------------------------------------
 // ---------------------------------------------------------------------
 /* */
 /* */
@@ -587,6 +612,11 @@ static int racy_pselect(int nfds, fd_set *readfds, fd_set *writefds,
 */
 */
 bool pkgDPkgPM::Go(int OutStatusFd)
 bool pkgDPkgPM::Go(int OutStatusFd)
 {
 {
+   fd_set rfds;
+   struct timespec tv;
+   sigset_t sigmask;
+   sigset_t original_sigmask;
+
    unsigned int MaxArgs = _config->FindI("Dpkg::MaxArgs",8*1024);   
    unsigned int MaxArgs = _config->FindI("Dpkg::MaxArgs",8*1024);   
    unsigned int MaxArgBytes = _config->FindI("Dpkg::MaxArgBytes",32*1024);
    unsigned int MaxArgBytes = _config->FindI("Dpkg::MaxArgBytes",32*1024);
    bool NoTriggers = _config->FindB("DPkg::NoTriggers",false);
    bool NoTriggers = _config->FindB("DPkg::NoTriggers",false);
@@ -610,20 +640,12 @@ bool pkgDPkgPM::Go(int OutStatusFd)
       { 
       { 
 	 {"unpacked",N_("Preparing to configure %s") },
 	 {"unpacked",N_("Preparing to configure %s") },
 	 {"half-configured", N_("Configuring %s") },
 	 {"half-configured", N_("Configuring %s") },
-#if 0
-	 {"triggers-awaited", N_("Processing triggers for %s") },
-	 {"triggers-pending", N_("Processing triggers for %s") },
-#endif
 	 { "installed", N_("Installed %s")},
 	 { "installed", N_("Installed %s")},
 	 {NULL, NULL}
 	 {NULL, NULL}
       },
       },
       // Remove operation
       // Remove operation
       { 
       { 
 	 {"half-configured", N_("Preparing for removal of %s")},
 	 {"half-configured", N_("Preparing for removal of %s")},
-#if 0
-	 {"triggers-awaited", N_("Preparing for removal of %s")},
-	 {"triggers-pending", N_("Preparing for removal of %s")},
-#endif
 	 {"half-installed", N_("Removing %s")},
 	 {"half-installed", N_("Removing %s")},
 	 {"config-files",  N_("Removed %s")},
 	 {"config-files",  N_("Removed %s")},
 	 {NULL, NULL}
 	 {NULL, NULL}
@@ -660,10 +682,19 @@ bool pkgDPkgPM::Go(int OutStatusFd)
    for (vector<Item>::iterator I = List.begin(); I != List.end();)
    for (vector<Item>::iterator I = List.begin(); I != List.end();)
    {
    {
       vector<Item>::iterator J = I;
       vector<Item>::iterator J = I;
-      for (; J != List.end() && J->Op == I->Op; J++);
+      for (; J != List.end() && J->Op == I->Op; J++)
+	 /* nothing */;
 
 
       // Generate the argument list
       // Generate the argument list
       const char *Args[MaxArgs + 50];
       const char *Args[MaxArgs + 50];
+      
+      // Now check if we are within the MaxArgs limit
+      //
+      // this code below is problematic, because it may happen that
+      // the argument list is split in a way that A depends on B
+      // and they are in the same "--configure A B" run
+      // - with the split they may now be configured in different
+      //   runs 
       if (J - I > (signed)MaxArgs)
       if (J - I > (signed)MaxArgs)
 	 J = I + MaxArgs;
 	 J = I + MaxArgs;
       
       
@@ -796,12 +827,28 @@ bool pkgDPkgPM::Go(int OutStatusFd)
 	 rtt = tt;
 	 rtt = tt;
 	 cfmakeraw(&rtt);
 	 cfmakeraw(&rtt);
 	 rtt.c_lflag &= ~ECHO;
 	 rtt.c_lflag &= ~ECHO;
+	 // block SIGTTOU during tcsetattr to prevent a hang if
+	 // the process is a member of the background process group
+	 // http://www.opengroup.org/onlinepubs/000095399/functions/tcsetattr.html
+	 sigemptyset(&sigmask);
+	 sigaddset(&sigmask, SIGTTOU);
+	 sigprocmask(SIG_BLOCK,&sigmask, &original_sigmask);
 	 tcsetattr(0, TCSAFLUSH, &rtt);
 	 tcsetattr(0, TCSAFLUSH, &rtt);
+	 sigprocmask(SIG_SETMASK, &original_sigmask, 0);
       }
       }
 
 
        // Fork dpkg
        // Fork dpkg
       pid_t Child;
       pid_t Child;
       _config->Set("APT::Keep-Fds::",fd[1]);
       _config->Set("APT::Keep-Fds::",fd[1]);
+      // send status information that we are about to fork dpkg
+      if(OutStatusFd > 0) {
+	 ostringstream status;
+	 status << "pmstatus:dpkg-exec:" 
+		<< (PackagesDone/float(PackagesTotal)*100.0) 
+		<< ":" << _("Running dpkg")
+		<< endl;
+	 write(OutStatusFd, status.str().c_str(), status.str().size());
+      }
       Child = ExecFork();
       Child = ExecFork();
             
             
       // This is the child
       // This is the child
@@ -819,6 +866,15 @@ bool pkgDPkgPM::Go(int OutStatusFd)
 	 }
 	 }
 	 close(fd[0]); // close the read end of the pipe
 	 close(fd[0]); // close the read end of the pipe
 
 
+	 if (_config->FindDir("DPkg::Chroot-Directory","/") != "/") 
+	 {
+	    std::cerr << "Chrooting into " 
+		      << _config->FindDir("DPkg::Chroot-Directory") 
+		      << std::endl;
+	    if (chroot(_config->FindDir("DPkg::Chroot-Directory","/").c_str()) != 0)
+	       _exit(100);
+	 }
+
 	 if (chdir(_config->FindDir("DPkg::Run-Directory","/").c_str()) != 0)
 	 if (chdir(_config->FindDir("DPkg::Run-Directory","/").c_str()) != 0)
 	    _exit(100);
 	    _exit(100);
 	 
 	 
@@ -838,7 +894,6 @@ bool pkgDPkgPM::Go(int OutStatusFd)
 	       _exit(100);
 	       _exit(100);
 	 }
 	 }
 
 
-
 	 /* No Job Control Stop Env is a magic dpkg var that prevents it
 	 /* No Job Control Stop Env is a magic dpkg var that prevents it
 	    from using sigstop */
 	    from using sigstop */
 	 putenv((char *)"DPKG_NO_TSTP=yes");
 	 putenv((char *)"DPKG_NO_TSTP=yes");
@@ -847,6 +902,10 @@ bool pkgDPkgPM::Go(int OutStatusFd)
 	 _exit(100);
 	 _exit(100);
       }      
       }      
 
 
+      // apply ionice
+      if (_config->FindB("DPkg::UseIoNice", false) == true)
+	 ionice(Child);
+
       // clear the Keep-Fd again
       // clear the Keep-Fd again
       _config->Clear("APT::Keep-Fds",fd[1]);
       _config->Clear("APT::Keep-Fds",fd[1]);
 
 
@@ -863,10 +922,6 @@ bool pkgDPkgPM::Go(int OutStatusFd)
 	 close(slave);
 	 close(slave);
 
 
       // setups fds
       // setups fds
-      fd_set rfds;
-      struct timespec tv;
-      sigset_t sigmask;
-      sigset_t original_sigmask;
       sigemptyset(&sigmask);
       sigemptyset(&sigmask);
       sigprocmask(SIG_BLOCK,&sigmask,&original_sigmask);
       sigprocmask(SIG_BLOCK,&sigmask,&original_sigmask);
 
 

+ 10 - 0
apt-pkg/indexcopy.cc

@@ -522,6 +522,15 @@ bool SigVerify::Verify(string prefix, string file, indexRecords *MetaIndex)
 {
 {
    const indexRecords::checkSum *Record = MetaIndex->Lookup(file);
    const indexRecords::checkSum *Record = MetaIndex->Lookup(file);
 
 
+   // we skip non-existing files in the verifcation to support a cdrom
+   // with no Packages file (just a Package.gz), see LP: #255545
+   // (non-existing files are not considered a error)
+   if(!FileExists(prefix+file))
+   {
+      _error->Warning("Skipping non-exisiting file %s", string(prefix+file).c_str());
+      return true;
+   }
+
    if (!Record) 
    if (!Record) 
    {
    {
       _error->Warning("Can't find authentication record for: %s",file.c_str());
       _error->Warning("Can't find authentication record for: %s",file.c_str());
@@ -651,6 +660,7 @@ bool SigVerify::CopyAndVerify(string CDROM,string Name,vector<string> &SigList,
 	 if(!Verify(prefix,*I, MetaIndex)) {
 	 if(!Verify(prefix,*I, MetaIndex)) {
 	    // something went wrong, don't copy the Release.gpg
 	    // something went wrong, don't copy the Release.gpg
 	    // FIXME: delete any existing gpg file?
 	    // FIXME: delete any existing gpg file?
+	    _error->Discard();
 	    continue;	 
 	    continue;	 
 	 }
 	 }
       }
       }

+ 3 - 3
apt-pkg/indexrecords.cc

@@ -37,14 +37,14 @@ bool indexRecords::Load(const string Filename)
    pkgTagFile TagFile(&Fd, Fd.Size() + 256); // XXX
    pkgTagFile TagFile(&Fd, Fd.Size() + 256); // XXX
    if (_error->PendingError() == true)
    if (_error->PendingError() == true)
    {
    {
-      ErrorText = _(("Unable to parse Release file " + Filename).c_str());
+      strprintf(ErrorText, _("Unable to parse Release file %s"),Filename.c_str());
       return false;
       return false;
    }
    }
 
 
    pkgTagSection Section;
    pkgTagSection Section;
    if (TagFile.Step(Section) == false)
    if (TagFile.Step(Section) == false)
    {
    {
-      ErrorText = _(("No sections in Release file " + Filename).c_str());
+      strprintf(ErrorText, _("No sections in Release file %s"), Filename.c_str());
       return false;
       return false;
    }
    }
 
 
@@ -78,7 +78,7 @@ bool indexRecords::Load(const string Filename)
 
 
    if(HashString::SupportedHashes()[i] == NULL)
    if(HashString::SupportedHashes()[i] == NULL)
    {
    {
-      ErrorText = _(("No Hash entry in Release file " + Filename).c_str());
+      strprintf(ErrorText, _("No Hash entry in Release file %s"), Filename.c_str());
       return false;
       return false;
    }  
    }  
 
 

+ 2 - 2
apt-pkg/pkgcache.cc

@@ -164,7 +164,7 @@ unsigned long pkgCache::sHash(const string &Str) const
 {
 {
    unsigned long Hash = 0;
    unsigned long Hash = 0;
    for (string::const_iterator I = Str.begin(); I != Str.end(); I++)
    for (string::const_iterator I = Str.begin(); I != Str.end(); I++)
-      Hash = 5*Hash + tolower(*I);
+      Hash = 5*Hash + tolower_ascii(*I);
    return Hash % _count(HeaderP->HashTable);
    return Hash % _count(HeaderP->HashTable);
 }
 }
 
 
@@ -172,7 +172,7 @@ unsigned long pkgCache::sHash(const char *Str) const
 {
 {
    unsigned long Hash = 0;
    unsigned long Hash = 0;
    for (const char *I = Str; *I != 0; I++)
    for (const char *I = Str; *I != 0; I++)
-      Hash = 5*Hash + tolower(*I);
+      Hash = 5*Hash + tolower_ascii(*I);
    return Hash % _count(HeaderP->HashTable);
    return Hash % _count(HeaderP->HashTable);
 }
 }
 
 

+ 11 - 6
cmdline/apt-cache.cc

@@ -102,15 +102,13 @@ bool UnMet(CommandLine &CmdL)
 	    if (End->Type != pkgCache::Dep::PreDepends &&
 	    if (End->Type != pkgCache::Dep::PreDepends &&
 		End->Type != pkgCache::Dep::Depends && 
 		End->Type != pkgCache::Dep::Depends && 
 		End->Type != pkgCache::Dep::Suggests &&
 		End->Type != pkgCache::Dep::Suggests &&
-		End->Type != pkgCache::Dep::Recommends &&
-		End->Type != pkgCache::Dep::DpkgBreaks)
+	        End->Type != pkgCache::Dep::Recommends)
 	       continue;
 	       continue;
 
 
 	    // Important deps only
 	    // Important deps only
 	    if (Important == true)
 	    if (Important == true)
 	       if (End->Type != pkgCache::Dep::PreDepends &&
 	       if (End->Type != pkgCache::Dep::PreDepends &&
-		   End->Type != pkgCache::Dep::Depends &&
-		   End->Type != pkgCache::Dep::DpkgBreaks)
+	           End->Type != pkgCache::Dep::Depends)
 		  continue;
 		  continue;
 	    
 	    
 	    // Verify the or group
 	    // Verify the or group
@@ -557,6 +555,7 @@ bool Depends(CommandLine &CmdL)
    
    
    bool Recurse = _config->FindB("APT::Cache::RecurseDepends",false);
    bool Recurse = _config->FindB("APT::Cache::RecurseDepends",false);
    bool Installed = _config->FindB("APT::Cache::Installed",false);
    bool Installed = _config->FindB("APT::Cache::Installed",false);
+   bool Important = _config->FindB("APT::Cache::Important",false);
    bool DidSomething;
    bool DidSomething;
    do
    do
    {
    {
@@ -579,7 +578,12 @@ bool Depends(CommandLine &CmdL)
 	 
 	 
 	 for (pkgCache::DepIterator D = Ver.DependsList(); D.end() == false; D++)
 	 for (pkgCache::DepIterator D = Ver.DependsList(); D.end() == false; D++)
 	 {
 	 {
-
+	    // Important deps only
+	    if (Important == true)
+	       if (D->Type != pkgCache::Dep::PreDepends &&
+		   D->Type != pkgCache::Dep::Depends)
+		  continue;
+		  
 	    pkgCache::PkgIterator Trg = D.TargetPkg();
 	    pkgCache::PkgIterator Trg = D.TargetPkg();
 
 
 	    if((Installed && Trg->CurrentVer != 0) || !Installed)
 	    if((Installed && Trg->CurrentVer != 0) || !Installed)
@@ -1529,7 +1533,8 @@ bool Policy(CommandLine &CmdL)
 	 if (SrcList->FindIndex(F,Indx) == false &&
 	 if (SrcList->FindIndex(F,Indx) == false &&
 	     _system->FindIndex(F,Indx) == false)
 	     _system->FindIndex(F,Indx) == false)
 	    return _error->Error(_("Cache is out of sync, can't x-ref a package file"));
 	    return _error->Error(_("Cache is out of sync, can't x-ref a package file"));
-	 printf(_("%4i %s\n"),
+	 
+	 printf("%4i %s\n",
 		Plcy.GetPriority(F),Indx->Describe(true).c_str());
 		Plcy.GetPriority(F),Indx->Describe(true).c_str());
 	 
 	 
 	 // Print the reference information for the package
 	 // Print the reference information for the package

+ 45 - 27
cmdline/apt-mark

@@ -14,34 +14,21 @@ actions = { "markauto" : 1,
             "unmarkauto": 0
             "unmarkauto": 0
           }
           }
 
 
-if __name__ == "__main__":
-    apt_pkg.init()
-
-    # option parsing
-    parser = OptionParser()
-    parser.usage = "%prog [options] {markauto|unmarkauto} packages..."
-    parser.add_option("-f", "--file", action="store", type="string",
-                      dest="filename",
-                      help="read/write a different file")
-    parser.add_option("-v", "--verbose",
-                      action="store_true", dest="verbose", default=False,
-                      help="print verbose status messages to stdout")
-    (options, args) = parser.parse_args()
-    if len(args) < 2:
-        parser.error("not enough argument")
-
-    # get pkgs to change
-    if args[0] not in actions.keys():
-        parser.error("first argument must be 'markauto' or 'unmarkauto'")
-    pkgs = args[1:]
-    action = actions[args[0]]
-
-    # get the state-file
-    if not options.filename:
-        STATE_FILE = apt_pkg.Config.FindDir("Dir::State") + "extended_states"
-    else:
-        STATE_FILE=options.filename
+def show_automatic(filename):
+    if not os.path.exists(STATE_FILE):
+        return
+    auto = set()
+    tagfile = apt_pkg.ParseTagFile(open(STATE_FILE))
+    while tagfile.Step():
+        pkgname = tagfile.Section.get("Package")
+        autoInst = tagfile.Section.get("Auto-Installed")
+        if int(autoInst):
+            auto.add(pkgname)
+    print "\n".join(sorted(auto))
+    
 
 
+def mark_unmark_automatic(filename, action, pkgs):
+    " mark or unmark automatic flag"
     # open the statefile
     # open the statefile
     if os.path.exists(STATE_FILE):
     if os.path.exists(STATE_FILE):
         tagfile = apt_pkg.ParseTagFile(open(STATE_FILE))
         tagfile = apt_pkg.ParseTagFile(open(STATE_FILE))
@@ -63,3 +50,34 @@ if __name__ == "__main__":
         os.chmod(outfile.name, 0644)
         os.chmod(outfile.name, 0644)
         os.rename(outfile.name, STATE_FILE)
         os.rename(outfile.name, STATE_FILE)
         os.chmod(STATE_FILE, 0644)
         os.chmod(STATE_FILE, 0644)
+
+
+if __name__ == "__main__":
+    apt_pkg.init()
+
+    # option parsing
+    parser = OptionParser()
+    parser.usage = "%prog [options] {markauto|unmarkauto} packages..."
+    parser.add_option("-f", "--file", action="store", type="string",
+                      dest="filename",
+                      help="read/write a different file")
+    parser.add_option("-v", "--verbose",
+                      action="store_true", dest="verbose", default=False,
+                      help="print verbose status messages to stdout")
+    (options, args) = parser.parse_args()
+
+    # get the state-file
+    if not options.filename:
+        STATE_FILE = apt_pkg.Config.FindDir("Dir::State") + "extended_states"
+    else:
+        STATE_FILE=options.filename
+
+    if args[0] == "showauto":
+        show_automatic(STATE_FILE)
+    else:
+        # get pkgs to change
+        if args[0] not in actions.keys():
+            parser.error("first argument must be 'markauto', 'unmarkauto' or 'showauto'")
+        pkgs = args[1:]
+        action = actions[args[0]]
+        mark_unmark_automatic(STATE_FILE, action, pkgs)

+ 306 - 74
debian/apt.cron.daily

@@ -1,40 +1,67 @@
 #!/bin/sh
 #!/bin/sh
-#
-
 #set -e
 #set -e
 #
 #
 # This file understands the following apt configuration variables:
 # This file understands the following apt configuration variables:
+# Values here are the default.
+# Create /etc/apt/apt.conf.d/02periodic file to set your preference.
 #
 #
-#  "APT::Periodic::Update-Package-Lists=1"
-#  - Do "apt-get update" automatically every n-days (0=disable)
-#    
-#  "APT::Periodic::Download-Upgradeable-Packages=0",
-#  - Do "apt-get upgrade --download-only" every n-days (0=disable)
-# 
-#  "APT::Periodic::AutocleanInterval"
-#  - Do "apt-get autoclean" every n-days (0=disable)
+#  Dir "/";
+#  - RootDir for all configuration files
 #
 #
-#  "APT::Periodic::Unattended-Upgrade"
-#  - Run the "unattended-upgrade" security upgrade script 
-#    every n-days (0=disabled)
-#    Requires the package "unattended-upgrades" and will write
-#    a log in /var/log/unattended-upgrades
-# 
-#  "APT::Archives::MaxAge",
+#  Dir::Cache "var/apt/cache/";
+#  - Set apt package cache directory
+#
+#  Dir::Cache::Archive "archives/";
+#  - Set package archive directory
+#
+#  APT::Periodic::BackupArchiveInterval "0";
+#  - Backup after n-days if archive contents changed.(0=disable)
+#
+#  APT::Periodic::BackupLevel "3";
+#  - Backup level.(0=disable), 1 is invalid.
+#
+#  Dir::Cache::Backup "backup/";
+#  - Set periodic package backup directory
+#
+#  APT::Archives::MaxAge "0"; (old, deprecated)
+#  APT::Periodic::MaxAge "0"; (new)
 #  - Set maximum allowed age of a cache package file. If a cache 
 #  - Set maximum allowed age of a cache package file. If a cache 
 #    package file is older it is deleted (0=disable)
 #    package file is older it is deleted (0=disable)
 #
 #
-#  "APT::Archives::MaxSize",
+#  APT::Archives::MinAge "2"; (old, deprecated)
+#  APT::Periodic::MinAge "2"; (new)
+#  - Set minimum age of a package file. If a file is younger it
+#    will not be deleted (0=disable). Usefull to prevent races 
+#    and to keep backups of the packages for emergency.
+#
+#  APT::Archives::MaxSize "0"; (old, deprecated)
+#  APT::Periodic::MaxSize "0"; (new)
 #  - Set maximum size of the cache in MB (0=disable). If the cache
 #  - Set maximum size of the cache in MB (0=disable). If the cache
 #    is bigger, cached package files are deleted until the size
 #    is bigger, cached package files are deleted until the size
 #    requirement is met (the biggest packages will be deleted 
 #    requirement is met (the biggest packages will be deleted 
 #    first).
 #    first).
 #
 #
-#  "APT::Archives::MinAge"
-#  - Set minimum age of a package file. If a file is younger it
-#    will not be deleted (0=disable). Usefull to prevent races 
-#    and to keep backups of the packages for emergency.
+#  APT::Periodic::Update-Package-Lists "0";
+#  - Do "apt-get update" automatically every n-days (0=disable)
+#    
+#  APT::Periodic::Download-Upgradeable-Packages "0";
+#  - Do "apt-get upgrade --download-only" every n-days (0=disable)
 # 
 # 
+#  APT::Periodic::Unattended-Upgrade "0";
+#  - Run the "unattended-upgrade" security upgrade script 
+#    every n-days (0=disabled)
+#    Requires the package "unattended-upgrades" and will write
+#    a log in /var/log/unattended-upgrades
+# 
+#  APT::Periodic::AutocleanInterval "0";
+#  - Do "apt-get autoclean" every n-days (0=disable)
+#
+#  APT::Periodic::Verbose "0";
+#  - Send report mail to root
+#      0:  no report             (or null string)
+#      1:  progress report       (actually any string)
+#      2:  + command outputs     (remove -qq, remove 2>/dev/null, add -d)
+#      3:  + trace on            
 
 
 check_stamp()
 check_stamp()
 {
 {
@@ -42,10 +69,15 @@ check_stamp()
     interval="$2"
     interval="$2"
 
 
     if [ $interval -eq 0 ]; then
     if [ $interval -eq 0 ]; then
+	debug_echo "check_stamp: interval=0"
+	# treat as no time has passed
         return 1
         return 1
     fi
     fi
 
 
     if [ ! -f $stamp ]; then
     if [ ! -f $stamp ]; then
+    	update_stamp $stamp
+	debug_echo "check_stamp: missing time stamp file: $stamp"
+	# treat as enough time has passed
         return 0
         return 0
     fi
     fi
 
 
@@ -71,10 +103,9 @@ check_stamp()
 
 
     delta=$(($now-$stamp))
     delta=$(($now-$stamp))
 
 
-    # intervall is in days,
+    # intervall is in days, convert to sec.
     interval=$(($interval*60*60*24))
     interval=$(($interval*60*60*24))
-    #echo "stampfile: $1"
-    #echo "interval=$interval, now=$now, stamp=$stamp, delta=$delta"
+    debug_echo "check_stamp: interval=$interval, now=$now, stamp=$stamp, delta=$delta (sec)"
 
 
     # remove timestamps a day (or more) in the future and force re-check
     # remove timestamps a day (or more) in the future and force re-check
     if [ $stamp -gt $(($now+86400)) ]; then
     if [ $stamp -gt $(($now+86400)) ]; then
@@ -93,12 +124,9 @@ check_stamp()
 update_stamp()
 update_stamp()
 {
 {
     stamp="$1"
     stamp="$1"
-
     touch $stamp
     touch $stamp
 }
 }
 
 
-
-
 # we check here if autoclean was enough sizewise
 # we check here if autoclean was enough sizewise
 check_size_constraints()
 check_size_constraints()
 {
 {
@@ -188,83 +216,287 @@ random_sleep()
     sleep $TIME
     sleep $TIME
 }
 }
 
 
-# main
 
 
-if ! which apt-config >/dev/null; then
+debug_echo()
+{
+    # Display message if $VERBOSE >= 1
+    if [ "$VERBOSE" -ge 1 ]; then
+	echo $1 1>&2
+    fi
+}
+
+
+# ----------------- main ----------------
+
+# check apt-config exstance
+if ! which apt-config >/dev/null ; then
 	exit 0
 	exit 0
 fi
 fi
 
 
+# Set VERBOSE mode from  apt-config (or inherit from environment)
+eval $(apt-config shell VERBOSE APT::Periodic::Verbose)
+if [ -z "$VERBOSE" ]; then
+    VERBOSE="0"
+fi
+if [ "$VERBOSE" -le 2 ]; then
+    # quiet for 0,1,2
+    XSTDOUT=">/dev/null"
+    XSTDERR="2>/dev/null"
+    XAPTOPT="-qq"
+    XUUPOPT=""
+else
+    XSTDOUT=""
+    XSTDERR=""
+    XAPTOPT=""
+    XUUPOPT="-d"
+fi
+if [ "$VERBOSE" -ge 3 ]; then
+    # trace output
+    set -x
+fi
+
+# laptop check, on_ac_power returns:
+#       0 (true)    System is on main power
+#       1 (false)   System is not on main power
+#       255 (false) Power status could not be determined
+# Desktop systems always return 255 it seems
+if which on_ac_power >/dev/null; then
+    on_ac_power
+    POWER=$?
+    if [ $POWER -eq 1 ]; then
+	debug_echo "exit: system NOT on main power."
+	exit 0
+    elif [ $POWER -ne 0 ]; then
+	debug_echo "power status ($POWER) undetermined."
+    fi
+    debug_echo "system is on main power."
+fi
+
+# check if we can lock the cache and if the cache is clean
+if which apt-get >/dev/null && ! apt-get check $XAPTOPT $XSTDERR ; then
+    debug_echo "error encountered in cron job with \"apt-get check\"."
+    exit 0
+fi
+# No need to check for apt-get below
+
+# Global current time in seconds since 1970-01-01 00:00:00 UTC
+now=$(date +%s)
+
+# Set default values and normalize
+Dir="/"
+eval $(apt-config shell Dir Dir)
+Dir=${Dir%/}
+
+CacheDir="var/cache/apt/"
+eval $(apt-config shell CacheDir Dir::Cache)
+CacheDir=${CacheDir%/}
+if [ -z "$CacheDir" ]; then
+    debug_echo "practically empty Dir::Cache, exiting"
+    exit 0
+fi
+
+CacheArchive="archives/"
+eval $(apt-config shell CacheArchive Dir::Cache::Archives)
+CacheArchive=${CacheArchive%/}
+if [ -z "$CacheArchive" ]; then
+    debug_echo "practically empty Dir::Cache::archives, exiting"
+    exit 0
+fi
+
+BackupArchiveInterval=0
+eval $(apt-config shell BackupArchiveInterval APT::Periodic::BackupArchiveInterval)
+
+BackupLevel=3
+eval $(apt-config shell BackupLevel APT::Periodic::BackupLevel)
+if [ $BackupLevel -le 1 ]; then 
+    BackupLevel=2 ; 
+fi
+
+CacheBackup="backup/"
+eval $(apt-config shell CacheBackup Dir::Cache::Backup)
+CacheBackup=${CacheBackup%/}
+if [ -z "$CacheBackup" ]; then
+    echo "empty Dir::Cache::Backup, using default" 1>&2
+    CacheBackup="backup/"
+fi
+
+# Support old Archive for compatibility.
+# Document only Periodic for all controling parameters of this script.
+MaxAge=0
+eval $(apt-config shell MaxAge APT::Archives::MaxAge)
+eval $(apt-config shell MaxAge APT::Periodic::MaxAge)
+
+MinAge=2
+eval $(apt-config shell MinAge APT::Archives::MinAge)
+eval $(apt-config shell MinAge APT::Periodic::MinAge)
+
+MaxSize=0
+eval $(apt-config shell MaxSize APT::Archives::MaxSize)
+eval $(apt-config shell MaxSize APT::Periodic::MaxSize)
+
 UpdateInterval=0
 UpdateInterval=0
+eval $(apt-config shell UpdateInterval APT::Periodic::Update-Package-Lists)
+
 DownloadUpgradeableInterval=0
 DownloadUpgradeableInterval=0
-eval $(apt-config shell UpdateInterval APT::Periodic::Update-Package-Lists DownloadUpgradeableInterval APT::Periodic::Download-Upgradeable-Packages)
-AutocleanInterval=$DownloadUpgradeableInterval
-eval $(apt-config shell AutocleanInterval APT::Periodic::AutocleanInterval)
+eval $(apt-config shell DownloadUpgradeableInterval APT::Periodic::Download-Upgradeable-Packages)
+
 UnattendedUpgradeInterval=0
 UnattendedUpgradeInterval=0
 eval $(apt-config shell UnattendedUpgradeInterval APT::Periodic::Unattended-Upgrade)
 eval $(apt-config shell UnattendedUpgradeInterval APT::Periodic::Unattended-Upgrade)
 
 
+AutocleanInterval=0
+eval $(apt-config shell AutocleanInterval APT::Periodic::AutocleanInterval)
+
+Cache="${Dir}/${CacheDir}/${CacheArchive}/"
+Back="${Dir}/${CacheDir}/${CacheBackup}/"
+BackX="${Back}${CacheArchive}/"
+for x in $(seq 0 1 $((${BackupLevel}-1))); do 
+    eval "Back${x}=${Back}${x}/"
+done
+
 # check if we actually have to do anything
 # check if we actually have to do anything
 if [ $UpdateInterval -eq 0 ] &&
 if [ $UpdateInterval -eq 0 ] &&
    [ $DownloadUpgradeableInterval -eq 0 ] &&
    [ $DownloadUpgradeableInterval -eq 0 ] &&
    [ $UnattendedUpgradeInterval -eq 0 ] &&
    [ $UnattendedUpgradeInterval -eq 0 ] &&
+   [ $BackupArchiveInterval -eq 0 ] &&
    [ $AutocleanInterval -eq 0 ]; then
    [ $AutocleanInterval -eq 0 ]; then
     exit 0
     exit 0
 fi
 fi
 
 
-# laptop check, on_ac_power returns:
-#       0 (true)    System is on mains power
-#       1 (false)   System is not on mains power
-#       255 (false) Power status could not be determined
-# Desktop systems always return 255 it seems
-if which on_ac_power >/dev/null; then
-    on_ac_power
-    if [ $? -eq 1 ]; then
-	exit 0
-    fi
-fi
-
 # sleep random amount of time to avoid hitting the 
 # sleep random amount of time to avoid hitting the 
 # mirrors at the same time
 # mirrors at the same time
 random_sleep
 random_sleep
 
 
-# check if we can access the cache
-if ! apt-get check -q -q 2>/dev/null; then
-    # wait random amount of time before retrying
-    random_sleep
-    # check again
-    if ! apt-get check -q -q 2>/dev/null; then
-	echo "$0: could not lock the APT cache while performing daily cron job. "
-	echo "Is another package manager working?"
-	exit 1
+# backup after n-days if archive contents changed.
+# (This uses hardlink to save disk space)
+BACKUP_ARCHIVE_STAMP=/var/lib/apt/periodic/backup-archive-stamp
+if check_stamp $BACKUP_ARCHIVE_STAMP $BackupArchiveInterval; then
+    if [ $({(cd $Cache 2>/dev/null; find . -name "*.deb"); (cd $Back0 2>/dev/null;find . -name "*.deb") ;}| sort|uniq -u|wc -l) -ne 0 ]; then
+	mkdir -p $Back
+	rm -rf $Back$((${BackupLevel}-1))
+	for y in $(seq $((${BackupLevel}-1)) -1 1); do 
+	    eval BackY=${Back}$y
+	    eval BackZ=${Back}$(($y-1))
+	    if [ -e $BackZ ]; then mv -f $BackZ $BackY ; fi
+	done
+	cp -la $Cache $Back ; mv -f $BackX $Back0
+	update_stamp $BACKUP_ARCHIVE_STAMP
+	debug_echo "backup with hardlinks. (success)"
+    else
+
+	debug_echo "skip backup since same content."
     fi
     fi
+else
+	debug_echo "skip backup since too new."
 fi
 fi
 
 
-UPDATE_STAMP=/var/lib/apt/periodic/update-stamp
-if check_stamp $UPDATE_STAMP $UpdateInterval; then
-    if apt-get -qq update 2>/dev/null; then
-        if which dbus-send >/dev/null && pidof dbus-daemon >/dev/null; then
-            dbus-send --system / app.apt.dbus.updated boolean:true
-        fi
-        update_stamp $UPDATE_STAMP
-    fi
+# package archive contnts removal by package age
+if [ $MaxAge -ne 0 ] && [ $MinAge -ne 0 ]; then
+    find $Cache -name "*.deb"  \( -mtime +$MaxAge -and -ctime +$MaxAge \) -and -not \( -mtime -$MinAge -or -ctime -$MinAge \) -print0 | xargs -r -0 rm -f
+    debug_echo "aged: ctime <$MaxAge and mtime <$MaxAge and ctime>$MinAge and mtime>$MinAge"
+elif [ $MaxAge -ne 0 ]; then
+    find $Cache -name "*.deb"  -ctime +$MaxAge -and -mtime +$MaxAge -print0 | xargs -r -0 rm -f
+    debug_echo "aged: ctime <$MaxAge and mtime <$MaxAge only"
+else
+    debug_echo "skip aging since MaxAge is 0"
 fi
 fi
+    
+# package archive contnts removal down to $MaxSize
+if [ $MaxSize -ne 0 ]; then
+
+    MinAgeSec=$(($MinAge*24*60*60))
+
+    # reverse-sort by mtime
+    for file in $(ls -rt $Cache/*.deb 2>/dev/null); do 
+	du=$(du -m -s $Cache)
+	size=${du%%/*}
+	# check if the cache is small enough
+	if [ $size -lt $MaxSize ]; then
+	    debug_echo "end remove by archive size:  size=$size < $MaxSize"
+	    break
+	fi
+
+	# check for MinAge in second of the file
+	if [ $MinAgeSec -ne 0 ]; then 
+	    # check both ctime and mtime 
+	    mtime=$(stat -c %Y $file)
+	    ctime=$(stat -c %Z $file)
+	    if [ $mtime -gt $ctime ]; then
+		delta=$(($now-$mtime))
+	    else
+		delta=$(($now-$ctime))
+	    fi
+	    if [ $delta -le $MinAgeSec ]; then
+		debug_echo "skip remove by archive size:  $file, delta=$delta < $MinAgeSec"
+	    else
+		# delete oldest file
+		debug_echo "remove by archive size: $file, delta=$delta >= $MinAgeSec (sec), size=$size >= $MaxSize"
+		rm -f $file
+	    fi
+	fi
 
 
-DOWNLOAD_UPGRADEABLE_STAMP=/var/lib/apt/periodic/download-upgradeable-stamp
-if check_stamp $DOWNLOAD_UPGRADEABLE_STAMP $DownloadUpgradeableInterval; then
-    apt-get -qq -d dist-upgrade 2>/dev/null
-    update_stamp $DOWNLOAD_UPGRADEABLE_STAMP
+    done
 fi
 fi
 
 
-UPGRADE_STAMP=/var/lib/apt/periodic/upgrade-stamp
-if check_stamp $UPGRADE_STAMP $UnattendedUpgradeInterval; then
-    unattended-upgrade
-    update_stamp $UPGRADE_STAMP
+# update package lists
+UPDATE_STAMP=/var/lib/apt/periodic/update-stamp
+if check_stamp $UPDATE_STAMP $UpdateInterval; then
+    if eval apt-get $XAPTOPT -y update $XSTDERR; then
+	debug_echo "download updated metadata (success)."
+	if which dbus-send >/dev/null && pidof dbus-daemon >/dev/null; then
+	    if dbus-send --system / app.apt.dbus.updated boolean:true ; then
+		debug_echo "send dbus signal (success)"
+	    else
+		debug_echo "send dbus signal (error)"
+	    fi
+	else
+	    debug_echo "dbus signal not send (command not available)"
+	fi
+	update_stamp $UPDATE_STAMP
+	# download all upgradeable packages if it is requested
+	DOWNLOAD_UPGRADEABLE_STAMP=/var/lib/apt/periodic/download-upgradeable-stamp
+	if check_stamp $DOWNLOAD_UPGRADEABLE_STAMP $DownloadUpgradeableInterval; then
+	    if eval apt-get $XAPTOPT -y -d dist-upgrade $XSTDERR; then
+		update_stamp $DOWNLOAD_UPGRADEABLE_STAMP
+		debug_echo "download upgradable (success)."
+		# auto upgrade all upgradeable packages
+		UPGRADE_STAMP=/var/lib/apt/periodic/upgrade-stamp
+		if which unattended-upgrade >/dev/null && check_stamp $UPGRADE_STAMP $UnattendedUpgradeInterval; then
+		    if unattended-upgrade $XUUPOPT; then
+			update_stamp $UPGRADE_STAMP
+			debug_echo "unattended-upgrade (success)."
+		    else
+			debug_echo "unattended-upgrade (error)."
+		    fi
+		else
+		    debug_echo "unattended-upgrade (not run)."
+		fi
+	    else
+		debug_echo "download upgradable (error)."
+	    fi
+	else
+	    debug_echo "download upgradable (not run)."
+	fi
+    else
+	debug_echo "download updated metadata (error)."
+    fi
+else
+    debug_echo "download updated metadata (not run)."
 fi
 fi
 
 
+# autoclean package archive
 AUTOCLEAN_STAMP=/var/lib/apt/periodic/autoclean-stamp
 AUTOCLEAN_STAMP=/var/lib/apt/periodic/autoclean-stamp
 if check_stamp $AUTOCLEAN_STAMP $AutocleanInterval; then
 if check_stamp $AUTOCLEAN_STAMP $AutocleanInterval; then
-    apt-get -qq autoclean
-    update_stamp $AUTOCLEAN_STAMP
+    if apt-get $XAPTOPT -y autoclean $XSTDERR; then
+	debug_echo "autoclean (success)."
+	update_stamp $AUTOCLEAN_STAMP
+    else
+	debug_echo "autoclean (error)."
+    fi
+else
+    debug_echo "autoclean (not run)."
 fi
 fi
 
 
-# check cache size 
-check_size_constraints
+#
+#     vim: set sts=4 ai :
+#
+

+ 57 - 0
debian/changelog

@@ -41,6 +41,48 @@ apt (0.7.22) UNRELEASED; urgency=low
   * honor the dpkg hold state in AutoInstOk (closes: #64141)
   * honor the dpkg hold state in AutoInstOk (closes: #64141)
   * debian/apt.cron.daily:
   * debian/apt.cron.daily:
     - if the timestamp is too far in the future, delete it
     - if the timestamp is too far in the future, delete it
+  * apt-pkg/acquire.cc:
+    - make the max pipeline depth of the acquire queue configurable
+      via Acquire::Max-Pipeline-Depth
+  * apt-pkg/deb/dpkgpm.cc:
+    - add Dpkg::UseIoNice boolean option to run dpkg with ionice -c3
+      (off by default)
+    - send "dpkg-exec" message on the status fd when dpkg is run
+    - provide DPkg::Chroot-Directory config option (useful for testing)
+    - fix potential hang when in a backgroud process group
+  * apt-pkg/algorithms.cc:
+    - consider recommends when making the scores for the problem 
+      resolver
+  * apt-pkg/acquire-worker.cc:
+    - show error details of failed methods
+  * apt-pkg/contrib/fileutl.cc:
+    - if a process aborts with signal, show signal number
+  * methods/http.cc:
+    - ignore SIGPIPE, we deal with EPIPE from write in 
+      HttpMethod::ServerDie() (LP: #385144)
+  * apt-pkg/indexcopy.cc:
+    - support having CDs with no Packages file (just a Packages.gz)
+      by not forcing a verification on non-existing files
+     (LP: #255545)
+    - remove the gettext from a string that consists entirely 
+      of variables (LP: #56792)
+  * apt-pkg/cacheiterators.h:
+    - add missing checks for Owner == 0 in end()
+  * apt-pkg/indexrecords.cc:
+    - fix some i18n issues
+  * apt-pkg/contrib/strutl.h:
+    - add new strprintf() function to make i18n strings easier
+    - fix compiler warning
+  * apt-pkg/deb/debsystem.cc:
+    - make strings i18n able 
+  * fix problematic use of tolower() when calculating the version 
+    hash by using locale independant tolower_ascii() function. 
+    Thanks to M. Vefa Bicakci (LP: #80248)
+  * build fixes for g++-4.4
+  * cmdline/apt-mark:
+    - add "showauto" option to show automatically installed packages
+  * document --install-recommends and --no-install-recommends
+    (thanks to Dereck Wonnacott, LP: #126180)
   
   
   [ Julian Andres Klode ]
   [ Julian Andres Klode ]
   * apt-pkg/contrib/configuration.cc: Fix a small memory leak in
   * apt-pkg/contrib/configuration.cc: Fix a small memory leak in
@@ -54,6 +96,21 @@ apt (0.7.22) UNRELEASED; urgency=low
     - Support reading until EOF if Size=0 to match behaviour of
     - Support reading until EOF if Size=0 to match behaviour of
       SHA1Summation and SHA256Summation
       SHA1Summation and SHA256Summation
 
 
+  [ Osamu Aoki ]
+  * Updated cron script to support backups by hardlinks and 
+    verbose levels.  All features turned off by default. 
+  * Added more error handlings.  Closes: #438803, #462734, #454989, 
+  * Refactored condition structure to make download and upgrade performed 
+    if only previous steps succeeded. Closes: #341970
+  * Documented all cron script related configuration items in 
+    configure-index.
+
+  [ Dereck Wonnacott ]
+  * apt-ftparchive might write corrupt Release files (LP: #46439)
+  * Apply --important option to apt-cache depends (LP: #16947) 
+
+
+
  -- Julian Andres Klode <jak@debian.org>  Fri, 03 Jul 2009 08:27:35 +0200
  -- Julian Andres Klode <jak@debian.org>  Fri, 03 Jul 2009 08:27:35 +0200
 
 
 apt (0.7.21) unstable; urgency=low
 apt (0.7.21) unstable; urgency=low

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

@@ -300,7 +300,7 @@ Reverse Provides:
      </varlistentry>
      </varlistentry>
 
 
      <varlistentry><term><option>-i</option></term><term><option>--important</option></term>
      <varlistentry><term><option>-i</option></term><term><option>--important</option></term>
-     <listitem><para>Print only important dependencies; for use with unmet. Causes only Depends and 
+     <listitem><para>Print only important dependencies; for use with unmet and depends. Causes only Depends and 
      Pre-Depends relations to be printed.
      Pre-Depends relations to be printed.
      Configuration Item: <literal>APT::Cache::Important</literal>.</para></listitem>
      Configuration Item: <literal>APT::Cache::Important</literal>.</para></listitem>
      </varlistentry>
      </varlistentry>

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

@@ -401,6 +401,14 @@
      Configuration Item: <literal>APT::Get::Compile</literal>.</para></listitem>
      Configuration Item: <literal>APT::Get::Compile</literal>.</para></listitem>
      </varlistentry>
      </varlistentry>
 
 
+     <varlistentry><term><option>--install-recommends</option></term>
+     <listitem><para>Also install recommended packages.</para></listitem>
+     </varlistentry>
+
+     <varlistentry><term><option>--no-install-recommends</option></term>
+     <listitem><para>Do not install recommended packages.</para></listitem>
+     </varlistentry>
+
      <varlistentry><term><option>--ignore-hold</option></term>
      <varlistentry><term><option>--ignore-hold</option></term>
      <listitem><para>Ignore package Holds; This causes <command>apt-get</command> to ignore a hold 
      <listitem><para>Ignore package Holds; This causes <command>apt-get</command> to ignore a hold 
      placed on a package. This may be useful in conjunction with 
      placed on a package. This may be useful in conjunction with 

+ 52 - 0
doc/examples/configure-index

@@ -115,6 +115,56 @@ APT
   // Keep the list of FDs open (normally apt closes all fds when it
   // Keep the list of FDs open (normally apt closes all fds when it
   // does a ExecFork)
   // does a ExecFork)
   Keep-Fds {};
   Keep-Fds {};
+
+  // control parameters for cron jobs by /etc/cron.daily/apt
+  Periodic
+  {
+  BackupArchiveInterval "0";
+  // - Backup after n-days if archive contents changed.(0=disable)
+
+  BackupLevel "3";
+  // - Backup level.(0=disable), 1 is invalid.
+
+  // APT::Archives::MaxAge "0"; (old, deprecated)
+  MaxAge "0"; // (new)
+  // - Set maximum allowed age of a cache package file. If a cache 
+  //   package file is older it is deleted (0=disable)
+
+  // APT::Archives::MinAge "2"; (old, deprecated)
+  MinAge "2"; // (new)
+  // - Set minimum age of a package file. If a file is younger it
+  //   will not be deleted (0=disable). Usefull to prevent races 
+  //   and to keep backups of the packages for emergency.
+
+  // APT::Archives::MaxSize "0"; (old, deprecated)
+  MaxSize "0"; // (new)
+  // - Set maximum size of the cache in MB (0=disable). If the cache
+  //   is bigger, cached package files are deleted until the size
+  //   requirement is met (the biggest packages will be deleted 
+  //   first).
+
+  Update-Package-Lists "0";
+  // - Do "apt-get update" automatically every n-days (0=disable)
+  //   
+  Download-Upgradeable-Packages "0";
+  // - Do "apt-get upgrade --download-only" every n-days (0=disable)
+  //
+  Unattended-Upgrade "0";
+  // - Run the "unattended-upgrade" security upgrade script 
+  //   every n-days (0=disabled)
+  //   Requires the package "unattended-upgrades" and will write
+  //   a log in /var/log/unattended-upgrades
+  //
+  AutocleanInterval "0";
+  // - Do "apt-get autoclean" every n-days (0=disable)
+
+  Verbose "0";
+  // - Send report mail to root
+  //   0:  no report             (or null string)
+  //   1:  progress report       (actually any string)
+  //   2:  + command outputs     (remove -qq, remove 2>/dev/null, add -d)
+  //   3:  + trace on            
+  };
 };
 };
 
 
 // Options for the downloading routines
 // Options for the downloading routines
@@ -213,6 +263,8 @@ Dir "/"
   // Location of the cache dir
   // Location of the cache dir
   Cache "var/cache/apt/" {
   Cache "var/cache/apt/" {
      Archives "archives/";
      Archives "archives/";
+     // backup directory created by /etc/cron.daily/apt
+     Backup "backup/"; 
      srcpkgcache "srcpkgcache.bin";
      srcpkgcache "srcpkgcache.bin";
      pkgcache "pkgcache.bin";     
      pkgcache "pkgcache.bin";     
   };
   };

+ 1 - 1
ftparchive/writer.h

@@ -52,7 +52,7 @@ class FTWScanner
    {
    {
       if (ErrorPrinted == false && Quiet <= Priority)
       if (ErrorPrinted == false && Quiet <= Priority)
       {
       {
-	 cout << endl;
+	 c1out << endl;
 	 ErrorPrinted = true;
 	 ErrorPrinted = true;
       }	 
       }	 
    }
    }

+ 1 - 1
methods/gpgv.cc

@@ -292,7 +292,7 @@ bool GPGVMethod::Fetch(FetchItem *Itm)
       // least one bad signature. good signatures and NoPubKey signatures
       // least one bad signature. good signatures and NoPubKey signatures
       // happen easily when a file is signed with multiple signatures
       // happen easily when a file is signed with multiple signatures
       if(GoodSigners.empty() or !BadSigners.empty())
       if(GoodSigners.empty() or !BadSigners.empty())
-      	 return _error->Error(errmsg.c_str());
+      	 return _error->Error("%s", errmsg.c_str());
    }
    }
       
       
    // Just pass the raw output up, because passing it as a real data
    // Just pass the raw output up, because passing it as a real data

+ 3 - 1
methods/http.cc

@@ -1316,9 +1316,11 @@ int HttpMethod::Loop()
 int main()
 int main()
 {
 {
    setlocale(LC_ALL, "");
    setlocale(LC_ALL, "");
+   // ignore SIGPIPE, this can happen on write() if the socket
+   // closes the connection (this is dealt with via ServerDie())
+   signal(SIGPIPE, SIG_IGN);
 
 
    HttpMethod Mth;
    HttpMethod Mth;
-   
    return Mth.Loop();
    return Mth.Loop();
 }
 }
 
 

+ 127 - 89
po/apt-all.pot

@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-06-30 14:09+0200\n"
+"POT-Creation-Date: 2009-07-21 15:49+0200\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"
@@ -15,153 +15,148 @@ msgstr ""
 "Content-Type: text/plain; charset=CHARSET\n"
 "Content-Type: text/plain; charset=CHARSET\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Content-Transfer-Encoding: 8bit\n"
 
 
-#: cmdline/apt-cache.cc:143
+#: cmdline/apt-cache.cc:141
 #, c-format
 #, c-format
 msgid "Package %s version %s has an unmet dep:\n"
 msgid "Package %s version %s has an unmet dep:\n"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-cache.cc:183 cmdline/apt-cache.cc:552 cmdline/apt-cache.cc:640
-#: cmdline/apt-cache.cc:796 cmdline/apt-cache.cc:1018
-#: cmdline/apt-cache.cc:1419 cmdline/apt-cache.cc:1570
+#: cmdline/apt-cache.cc:181 cmdline/apt-cache.cc:550 cmdline/apt-cache.cc:644
+#: cmdline/apt-cache.cc:800 cmdline/apt-cache.cc:1022
+#: cmdline/apt-cache.cc:1423 cmdline/apt-cache.cc:1575
 #, c-format
 #, c-format
 msgid "Unable to locate package %s"
 msgid "Unable to locate package %s"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-cache.cc:247
+#: cmdline/apt-cache.cc:245
 msgid "Total package names: "
 msgid "Total package names: "
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-cache.cc:287
+#: cmdline/apt-cache.cc:285
 msgid "  Normal packages: "
 msgid "  Normal packages: "
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-cache.cc:288
+#: cmdline/apt-cache.cc:286
 msgid "  Pure virtual packages: "
 msgid "  Pure virtual packages: "
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-cache.cc:289
+#: cmdline/apt-cache.cc:287
 msgid "  Single virtual packages: "
 msgid "  Single virtual packages: "
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-cache.cc:290
+#: cmdline/apt-cache.cc:288
 msgid "  Mixed virtual packages: "
 msgid "  Mixed virtual packages: "
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-cache.cc:291
+#: cmdline/apt-cache.cc:289
 msgid "  Missing: "
 msgid "  Missing: "
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-cache.cc:293
+#: cmdline/apt-cache.cc:291
 msgid "Total distinct versions: "
 msgid "Total distinct versions: "
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-cache.cc:295
+#: cmdline/apt-cache.cc:293
 msgid "Total distinct descriptions: "
 msgid "Total distinct descriptions: "
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-cache.cc:297
+#: cmdline/apt-cache.cc:295
 msgid "Total dependencies: "
 msgid "Total dependencies: "
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-cache.cc:300
+#: cmdline/apt-cache.cc:298
 msgid "Total ver/file relations: "
 msgid "Total ver/file relations: "
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-cache.cc:302
+#: cmdline/apt-cache.cc:300
 msgid "Total Desc/File relations: "
 msgid "Total Desc/File relations: "
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-cache.cc:304
+#: cmdline/apt-cache.cc:302
 msgid "Total Provides mappings: "
 msgid "Total Provides mappings: "
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-cache.cc:316
+#: cmdline/apt-cache.cc:314
 msgid "Total globbed strings: "
 msgid "Total globbed strings: "
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-cache.cc:330
+#: cmdline/apt-cache.cc:328
 msgid "Total dependency version space: "
 msgid "Total dependency version space: "
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-cache.cc:335
+#: cmdline/apt-cache.cc:333
 msgid "Total slack space: "
 msgid "Total slack space: "
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-cache.cc:343
+#: cmdline/apt-cache.cc:341
 msgid "Total space accounted for: "
 msgid "Total space accounted for: "
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-cache.cc:471 cmdline/apt-cache.cc:1218
+#: cmdline/apt-cache.cc:469 cmdline/apt-cache.cc:1222
 #, c-format
 #, c-format
 msgid "Package file %s is out of sync."
 msgid "Package file %s is out of sync."
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-cache.cc:1293
+#: cmdline/apt-cache.cc:1297
 msgid "You must give exactly one pattern"
 msgid "You must give exactly one pattern"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-cache.cc:1447
+#: cmdline/apt-cache.cc:1451
 msgid "No packages found"
 msgid "No packages found"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-cache.cc:1524
+#: cmdline/apt-cache.cc:1528
 msgid "Package files:"
 msgid "Package files:"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-cache.cc:1531 cmdline/apt-cache.cc:1617
+#: cmdline/apt-cache.cc:1535 cmdline/apt-cache.cc:1622
 msgid "Cache is out of sync, can't x-ref a package file"
 msgid "Cache is out of sync, can't x-ref a package file"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-cache.cc:1532
-#, c-format
-msgid "%4i %s\n"
-msgstr ""
-
 #. Show any packages have explicit pins
 #. Show any packages have explicit pins
-#: cmdline/apt-cache.cc:1544
+#: cmdline/apt-cache.cc:1549
 msgid "Pinned packages:"
 msgid "Pinned packages:"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-cache.cc:1556 cmdline/apt-cache.cc:1597
+#: cmdline/apt-cache.cc:1561 cmdline/apt-cache.cc:1602
 msgid "(not found)"
 msgid "(not found)"
 msgstr ""
 msgstr ""
 
 
 #. Installed version
 #. Installed version
-#: cmdline/apt-cache.cc:1577
+#: cmdline/apt-cache.cc:1582
 msgid "  Installed: "
 msgid "  Installed: "
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-cache.cc:1579 cmdline/apt-cache.cc:1587
+#: cmdline/apt-cache.cc:1584 cmdline/apt-cache.cc:1592
 msgid "(none)"
 msgid "(none)"
 msgstr ""
 msgstr ""
 
 
 #. Candidate Version
 #. Candidate Version
-#: cmdline/apt-cache.cc:1584
+#: cmdline/apt-cache.cc:1589
 msgid "  Candidate: "
 msgid "  Candidate: "
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-cache.cc:1594
+#: cmdline/apt-cache.cc:1599
 msgid "  Package pin: "
 msgid "  Package pin: "
 msgstr ""
 msgstr ""
 
 
 #. Show the priority tables
 #. Show the priority tables
-#: cmdline/apt-cache.cc:1603
+#: cmdline/apt-cache.cc:1608
 msgid "  Version table:"
 msgid "  Version table:"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-cache.cc:1618
+#: cmdline/apt-cache.cc:1623
 #, c-format
 #, c-format
 msgid "       %4i %s\n"
 msgid "       %4i %s\n"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-cache.cc:1714 cmdline/apt-cdrom.cc:138 cmdline/apt-config.cc:70
+#: cmdline/apt-cache.cc:1719 cmdline/apt-cdrom.cc:138 cmdline/apt-config.cc:70
 #: cmdline/apt-extracttemplates.cc:225 ftparchive/apt-ftparchive.cc:547
 #: cmdline/apt-extracttemplates.cc:225 ftparchive/apt-ftparchive.cc:547
 #: cmdline/apt-get.cc:2586 cmdline/apt-sortpkgs.cc:144
 #: cmdline/apt-get.cc:2586 cmdline/apt-sortpkgs.cc:144
 #, c-format
 #, c-format
 msgid "%s %s for %s compiled on %s %s\n"
 msgid "%s %s for %s compiled on %s %s\n"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-cache.cc:1721
+#: cmdline/apt-cache.cc:1726
 msgid ""
 msgid ""
 "Usage: apt-cache [options] command\n"
 "Usage: apt-cache [options] command\n"
 "       apt-cache [options] add file1 [file2 ...]\n"
 "       apt-cache [options] add file1 [file2 ...]\n"
@@ -780,7 +775,7 @@ msgstr ""
 msgid "Do you want to continue [Y/n]? "
 msgid "Do you want to continue [Y/n]? "
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:987 cmdline/apt-get.cc:2227 apt-pkg/algorithms.cc:1400
+#: cmdline/apt-get.cc:987 cmdline/apt-get.cc:2227 apt-pkg/algorithms.cc:1407
 #, c-format
 #, c-format
 msgid "Failed to fetch %s  %s\n"
 msgid "Failed to fetch %s  %s\n"
 msgstr ""
 msgstr ""
@@ -1388,7 +1383,7 @@ msgstr ""
 
 
 #: apt-inst/extract.cc:464 apt-pkg/contrib/configuration.cc:822
 #: apt-inst/extract.cc:464 apt-pkg/contrib/configuration.cc:822
 #: apt-pkg/contrib/cdromutl.cc:150 apt-pkg/sourcelist.cc:320
 #: apt-pkg/contrib/cdromutl.cc:150 apt-pkg/sourcelist.cc:320
-#: apt-pkg/acquire.cc:418 apt-pkg/clean.cc:34
+#: apt-pkg/acquire.cc:419 apt-pkg/clean.cc:34 apt-pkg/policy.cc:268
 #, c-format
 #, c-format
 msgid "Unable to read %s"
 msgid "Unable to read %s"
 msgstr ""
 msgstr ""
@@ -1613,7 +1608,7 @@ msgstr ""
 msgid "Server closed the connection"
 msgid "Server closed the connection"
 msgstr ""
 msgstr ""
 
 
-#: methods/ftp.cc:338 apt-pkg/contrib/fileutl.cc:538 methods/rsh.cc:190
+#: methods/ftp.cc:338 apt-pkg/contrib/fileutl.cc:541 methods/rsh.cc:190
 msgid "Read error"
 msgid "Read error"
 msgstr ""
 msgstr ""
 
 
@@ -1625,7 +1620,7 @@ msgstr ""
 msgid "Protocol corruption"
 msgid "Protocol corruption"
 msgstr ""
 msgstr ""
 
 
-#: methods/ftp.cc:446 apt-pkg/contrib/fileutl.cc:577 methods/rsh.cc:232
+#: methods/ftp.cc:446 apt-pkg/contrib/fileutl.cc:580 methods/rsh.cc:232
 msgid "Write error"
 msgid "Write error"
 msgstr ""
 msgstr ""
 
 
@@ -2044,7 +2039,7 @@ msgid "Unable to stat the mount point %s"
 msgstr ""
 msgstr ""
 
 
 #: apt-pkg/contrib/cdromutl.cc:146 apt-pkg/contrib/cdromutl.cc:180
 #: apt-pkg/contrib/cdromutl.cc:146 apt-pkg/contrib/cdromutl.cc:180
-#: apt-pkg/acquire.cc:424 apt-pkg/acquire.cc:449 apt-pkg/clean.cc:40
+#: apt-pkg/acquire.cc:425 apt-pkg/acquire.cc:450 apt-pkg/clean.cc:40
 #, c-format
 #, c-format
 msgid "Unable to change to %s"
 msgid "Unable to change to %s"
 msgstr ""
 msgstr ""
@@ -2078,45 +2073,50 @@ msgstr ""
 msgid "Waited for %s but it wasn't there"
 msgid "Waited for %s but it wasn't there"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/contrib/fileutl.cc:454
+#: apt-pkg/contrib/fileutl.cc:455
 #, c-format
 #, c-format
 msgid "Sub-process %s received a segmentation fault."
 msgid "Sub-process %s received a segmentation fault."
 msgstr ""
 msgstr ""
 
 
 #: apt-pkg/contrib/fileutl.cc:457
 #: apt-pkg/contrib/fileutl.cc:457
 #, c-format
 #, c-format
+msgid "Sub-process %s received signal %u."
+msgstr ""
+
+#: apt-pkg/contrib/fileutl.cc:460
+#, c-format
 msgid "Sub-process %s returned an error code (%u)"
 msgid "Sub-process %s returned an error code (%u)"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/contrib/fileutl.cc:459
+#: apt-pkg/contrib/fileutl.cc:462
 #, c-format
 #, c-format
 msgid "Sub-process %s exited unexpectedly"
 msgid "Sub-process %s exited unexpectedly"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/contrib/fileutl.cc:503
+#: apt-pkg/contrib/fileutl.cc:506
 #, c-format
 #, c-format
 msgid "Could not open file %s"
 msgid "Could not open file %s"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/contrib/fileutl.cc:559
+#: apt-pkg/contrib/fileutl.cc:562
 #, c-format
 #, c-format
 msgid "read, still have %lu to read but none left"
 msgid "read, still have %lu to read but none left"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/contrib/fileutl.cc:589
+#: apt-pkg/contrib/fileutl.cc:592
 #, c-format
 #, c-format
 msgid "write, still have %lu to write but couldn't"
 msgid "write, still have %lu to write but couldn't"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/contrib/fileutl.cc:664
+#: apt-pkg/contrib/fileutl.cc:667
 msgid "Problem closing the file"
 msgid "Problem closing the file"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/contrib/fileutl.cc:670
+#: apt-pkg/contrib/fileutl.cc:673
 msgid "Problem unlinking the file"
 msgid "Problem unlinking the file"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/contrib/fileutl.cc:681
+#: apt-pkg/contrib/fileutl.cc:684
 msgid "Problem syncing the file"
 msgid "Problem syncing the file"
 msgstr ""
 msgstr ""
 
 
@@ -2302,40 +2302,40 @@ msgid ""
 "The package %s needs to be reinstalled, but I can't find an archive for it."
 "The package %s needs to be reinstalled, but I can't find an archive for it."
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/algorithms.cc:1147
+#: apt-pkg/algorithms.cc:1154
 msgid ""
 msgid ""
 "Error, pkgProblemResolver::Resolve generated breaks, this may be caused by "
 "Error, pkgProblemResolver::Resolve generated breaks, this may be caused by "
 "held packages."
 "held packages."
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/algorithms.cc:1149
+#: apt-pkg/algorithms.cc:1156
 msgid "Unable to correct problems, you have held broken packages."
 msgid "Unable to correct problems, you have held broken packages."
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/algorithms.cc:1426 apt-pkg/algorithms.cc:1428
+#: apt-pkg/algorithms.cc:1433 apt-pkg/algorithms.cc:1435
 msgid ""
 msgid ""
 "Some index files failed to download, they have been ignored, or old ones "
 "Some index files failed to download, they have been ignored, or old ones "
 "used instead."
 "used instead."
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/acquire.cc:59
+#: apt-pkg/acquire.cc:60
 #, c-format
 #, c-format
 msgid "Lists directory %spartial is missing."
 msgid "Lists directory %spartial is missing."
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/acquire.cc:63
+#: apt-pkg/acquire.cc:64
 #, c-format
 #, c-format
 msgid "Archive directory %spartial is missing."
 msgid "Archive directory %spartial is missing."
 msgstr ""
 msgstr ""
 
 
 #. only show the ETA if it makes sense
 #. only show the ETA if it makes sense
 #. two days
 #. two days
-#: apt-pkg/acquire.cc:828
+#: apt-pkg/acquire.cc:829
 #, c-format
 #, c-format
 msgid "Retrieving file %li of %li (%s remaining)"
 msgid "Retrieving file %li of %li (%s remaining)"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/acquire.cc:830
+#: apt-pkg/acquire.cc:831
 #, c-format
 #, c-format
 msgid "Retrieving file %li of %li"
 msgid "Retrieving file %li of %li"
 msgstr ""
 msgstr ""
@@ -2355,12 +2355,12 @@ msgstr ""
 msgid "Please insert the disc labeled: '%s' in the drive '%s' and press enter."
 msgid "Please insert the disc labeled: '%s' in the drive '%s' and press enter."
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/init.cc:124
+#: apt-pkg/init.cc:125
 #, c-format
 #, c-format
 msgid "Packaging system '%s' is not supported"
 msgid "Packaging system '%s' is not supported"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/init.cc:140
+#: apt-pkg/init.cc:141
 msgid "Unable to determine a suitable packaging system type"
 msgid "Unable to determine a suitable packaging system type"
 msgstr ""
 msgstr ""
 
 
@@ -2381,16 +2381,17 @@ msgstr ""
 msgid "You may want to run apt-get update to correct these problems"
 msgid "You may want to run apt-get update to correct these problems"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/policy.cc:281
-msgid "Invalid record in the preferences file, no Package header"
+#: apt-pkg/policy.cc:329
+#, c-format
+msgid "Invalid record in the preferences file %s, no Package header"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/policy.cc:303
+#: apt-pkg/policy.cc:351
 #, c-format
 #, c-format
 msgid "Did not understand pin type %s"
 msgid "Did not understand pin type %s"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/policy.cc:311
+#: apt-pkg/policy.cc:359
 msgid "No priority (or zero) specified for pin"
 msgid "No priority (or zero) specified for pin"
 msgstr ""
 msgstr ""
 
 
@@ -2528,6 +2529,21 @@ msgstr ""
 msgid "Size mismatch"
 msgid "Size mismatch"
 msgstr ""
 msgstr ""
 
 
+#: apt-pkg/indexrecords.cc:40
+#, c-format
+msgid "Unable to parse Release file %s"
+msgstr ""
+
+#: apt-pkg/indexrecords.cc:47
+#, c-format
+msgid "No sections in Release file %s"
+msgstr ""
+
+#: apt-pkg/indexrecords.cc:81
+#, c-format
+msgid "No Hash entry in Release file %s"
+msgstr ""
+
 #: apt-pkg/vendorlist.cc:66
 #: apt-pkg/vendorlist.cc:66
 #, c-format
 #, c-format
 msgid "Vendor block %s contains no fingerprint"
 msgid "Vendor block %s contains no fingerprint"
@@ -2582,6 +2598,12 @@ msgid ""
 "zu signatures\n"
 "zu signatures\n"
 msgstr ""
 msgstr ""
 
 
+#: apt-pkg/cdrom.cc:689
+msgid ""
+"Unable to locate any package files, perhaps this is not a Debian Disc or the "
+"wrong architecture?"
+msgstr ""
+
 #: apt-pkg/cdrom.cc:715
 #: apt-pkg/cdrom.cc:715
 #, c-format
 #, c-format
 msgid "Found label '%s'\n"
 msgid "Found label '%s'\n"
@@ -2610,22 +2632,22 @@ msgstr ""
 msgid "Source list entries for this disc are:\n"
 msgid "Source list entries for this disc are:\n"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/indexcopy.cc:263 apt-pkg/indexcopy.cc:823
+#: apt-pkg/indexcopy.cc:263 apt-pkg/indexcopy.cc:833
 #, c-format
 #, c-format
 msgid "Wrote %i records.\n"
 msgid "Wrote %i records.\n"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/indexcopy.cc:265 apt-pkg/indexcopy.cc:825
+#: apt-pkg/indexcopy.cc:265 apt-pkg/indexcopy.cc:835
 #, c-format
 #, c-format
 msgid "Wrote %i records with %i missing files.\n"
 msgid "Wrote %i records with %i missing files.\n"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/indexcopy.cc:268 apt-pkg/indexcopy.cc:828
+#: apt-pkg/indexcopy.cc:268 apt-pkg/indexcopy.cc:838
 #, c-format
 #, c-format
 msgid "Wrote %i records with %i mismatched files\n"
 msgid "Wrote %i records with %i mismatched files\n"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/indexcopy.cc:271 apt-pkg/indexcopy.cc:831
+#: apt-pkg/indexcopy.cc:271 apt-pkg/indexcopy.cc:841
 #, c-format
 #, c-format
 msgid "Wrote %i records with %i missing files and %i mismatched files\n"
 msgid "Wrote %i records with %i missing files and %i mismatched files\n"
 msgstr ""
 msgstr ""
@@ -2635,12 +2657,12 @@ msgstr ""
 msgid "Installing %s"
 msgid "Installing %s"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/deb/dpkgpm.cc:50 apt-pkg/deb/dpkgpm.cc:612
+#: apt-pkg/deb/dpkgpm.cc:50 apt-pkg/deb/dpkgpm.cc:642
 #, c-format
 #, c-format
 msgid "Configuring %s"
 msgid "Configuring %s"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/deb/dpkgpm.cc:51 apt-pkg/deb/dpkgpm.cc:627
+#: apt-pkg/deb/dpkgpm.cc:51 apt-pkg/deb/dpkgpm.cc:649
 #, c-format
 #, c-format
 msgid "Removing %s"
 msgid "Removing %s"
 msgstr ""
 msgstr ""
@@ -2650,61 +2672,77 @@ msgstr ""
 msgid "Running post-installation trigger %s"
 msgid "Running post-installation trigger %s"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/deb/dpkgpm.cc:521
+#: apt-pkg/deb/dpkgpm.cc:546
 #, c-format
 #, c-format
 msgid "Directory '%s' missing"
 msgid "Directory '%s' missing"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/deb/dpkgpm.cc:605
+#: apt-pkg/deb/dpkgpm.cc:635
 #, c-format
 #, c-format
 msgid "Preparing %s"
 msgid "Preparing %s"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/deb/dpkgpm.cc:606
+#: apt-pkg/deb/dpkgpm.cc:636
 #, c-format
 #, c-format
 msgid "Unpacking %s"
 msgid "Unpacking %s"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/deb/dpkgpm.cc:611
+#: apt-pkg/deb/dpkgpm.cc:641
 #, c-format
 #, c-format
 msgid "Preparing to configure %s"
 msgid "Preparing to configure %s"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/deb/dpkgpm.cc:614 apt-pkg/deb/dpkgpm.cc:615
-#, c-format
-msgid "Processing triggers for %s"
-msgstr ""
-
-#: apt-pkg/deb/dpkgpm.cc:617
+#: apt-pkg/deb/dpkgpm.cc:643
 #, c-format
 #, c-format
 msgid "Installed %s"
 msgid "Installed %s"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/deb/dpkgpm.cc:622 apt-pkg/deb/dpkgpm.cc:624
-#: apt-pkg/deb/dpkgpm.cc:625
+#: apt-pkg/deb/dpkgpm.cc:648
 #, c-format
 #, c-format
 msgid "Preparing for removal of %s"
 msgid "Preparing for removal of %s"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/deb/dpkgpm.cc:628
+#: apt-pkg/deb/dpkgpm.cc:650
 #, c-format
 #, c-format
 msgid "Removed %s"
 msgid "Removed %s"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/deb/dpkgpm.cc:633
+#: apt-pkg/deb/dpkgpm.cc:655
 #, c-format
 #, c-format
 msgid "Preparing to completely remove %s"
 msgid "Preparing to completely remove %s"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/deb/dpkgpm.cc:634
+#: apt-pkg/deb/dpkgpm.cc:656
 #, c-format
 #, c-format
 msgid "Completely removed %s"
 msgid "Completely removed %s"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/deb/dpkgpm.cc:789
+#: apt-pkg/deb/dpkgpm.cc:820
 msgid "Can not write log, openpty() failed (/dev/pts not mounted?)\n"
 msgid "Can not write log, openpty() failed (/dev/pts not mounted?)\n"
 msgstr ""
 msgstr ""
 
 
+#: apt-pkg/deb/dpkgpm.cc:848
+msgid "Running dpkg"
+msgstr ""
+
+#: apt-pkg/deb/debsystem.cc:70
+#, c-format
+msgid ""
+"Unable to lock the administration directory (%s), is another process using "
+"it?"
+msgstr ""
+
+#: apt-pkg/deb/debsystem.cc:73
+#, c-format
+msgid "Unable to lock the administration directory (%s), are you root?"
+msgstr ""
+
+#: apt-pkg/deb/debsystem.cc:82
+msgid ""
+"dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct "
+"the problem. "
+msgstr ""
+
 #: apt-pkg/deb/debsystem.cc:100
 #: apt-pkg/deb/debsystem.cc:100
 msgid "Not locked"
 msgid "Not locked"
 msgstr ""
 msgstr ""