summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2009-07-21 16:05:52 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2009-07-21 16:05:52 +0200
commit53391d0fc55f118194467b3d436f91fbc1097c31 (patch)
treedcadedb5ec9469af96312c263955b4d11b6ce861
parent7b139dabdcdff68a2854405e55924559591df8d0 (diff)
parent4b7cfe96d621ab8fc0cec1334f0cd5f9ea87bf6d (diff)
* 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)
-rw-r--r--README.arch2
-rw-r--r--apt-pkg/acquire-worker.cc7
-rw-r--r--apt-pkg/acquire.cc5
-rw-r--r--apt-pkg/algorithms.cc13
-rw-r--r--apt-pkg/cacheiterators.h10
-rw-r--r--apt-pkg/cdrom.cc2
-rw-r--r--apt-pkg/contrib/fileutl.cc7
-rw-r--r--apt-pkg/contrib/sha256.h1
-rw-r--r--apt-pkg/contrib/strutl.cc28
-rw-r--r--apt-pkg/contrib/strutl.h2
-rw-r--r--apt-pkg/deb/deblistparser.cc2
-rw-r--r--apt-pkg/deb/debsystem.cc12
-rw-r--r--apt-pkg/deb/dpkgpm.cc83
-rw-r--r--apt-pkg/indexcopy.cc10
-rw-r--r--apt-pkg/indexrecords.cc6
-rw-r--r--apt-pkg/pkgcache.cc4
-rw-r--r--cmdline/apt-cache.cc17
-rwxr-xr-xcmdline/apt-mark72
-rw-r--r--debian/apt.cron.daily380
-rw-r--r--debian/changelog57
-rw-r--r--doc/apt-cache.8.xml2
-rw-r--r--doc/apt-get.8.xml8
-rw-r--r--doc/examples/configure-index52
-rw-r--r--ftparchive/writer.h2
-rw-r--r--methods/gpgv.cc2
-rw-r--r--methods/http.cc4
-rw-r--r--po/apt-all.pot216
27 files changed, 760 insertions, 246 deletions
diff --git a/README.arch b/README.arch
index 364e940a4..58c40a497 100644
--- a/README.arch
+++ b/README.arch
@@ -1,7 +1,7 @@
You can build apt from arch, but this needs the following additional
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:
diff --git a/apt-pkg/acquire-worker.cc b/apt-pkg/acquire-worker.cc
index 78c68737c..4f0b52af9 100644
--- a/apt-pkg/acquire-worker.cc
+++ b/apt-pkg/acquire-worker.cc
@@ -527,10 +527,6 @@ bool pkgAcquire::Worker::OutFdReady()
if (Res <= 0)
return MethodFailure();
-
- // Hmm.. this should never happen.
- if (Res < 0)
- return true;
OutQueue.erase(0,Res);
if (OutQueue.empty() == true)
@@ -558,7 +554,8 @@ bool pkgAcquire::Worker::MethodFailure()
{
_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;
close(InFd);
close(OutFd);
diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc
index daea234d3..c1f6581e2 100644
--- a/apt-pkg/acquire.cc
+++ b/apt-pkg/acquire.cc
@@ -24,7 +24,8 @@
#include <iostream>
#include <sstream>
-
+#include <stdio.h>
+
#include <dirent.h>
#include <sys/time.h>
#include <errno.h>
@@ -620,7 +621,7 @@ bool pkgAcquire::Queue::Startup()
added other source retry to have cycle maintain a pipeline depth
on its own. */
if (Cnf->Pipeline == true)
- MaxPipeDepth = 1000;
+ MaxPipeDepth = _config->FindI("Acquire::Max-Pipeline-Depth",10);
else
MaxPipeDepth = 1;
}
diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc
index 2ad064319..1fd3d39a4 100644
--- a/apt-pkg/algorithms.cc
+++ b/apt-pkg/algorithms.cc
@@ -501,6 +501,7 @@ void pkgProblemResolver::MakeScores()
signed short PrioEssentials = _config->FindI("pkgProblemResolver::Scores::Essentials",100);
signed short PrioInstalledAndNotObsolete = _config->FindI("pkgProblemResolver::Scores::NotObsolete",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 AddEssential = _config->FindI("pkgProblemResolver::Scores::AddEssential",5000);
@@ -514,6 +515,7 @@ void pkgProblemResolver::MakeScores()
<< " Essentials => " << PrioEssentials << endl
<< " InstalledAndNotObsolete => " << PrioInstalledAndNotObsolete << endl
<< " Depends => " << PrioDepends << endl
+ << " Recommends => " << PrioRecommends << endl
<< " AddProtected => " << AddProtected << endl
<< " AddEssential => " << AddEssential << endl;
@@ -552,8 +554,11 @@ void pkgProblemResolver::MakeScores()
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
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;
Scores[I->ID] += abs(OldScores[D.ParentPkg()->ID]);
diff --git a/apt-pkg/cacheiterators.h b/apt-pkg/cacheiterators.h
index cf79b3a6b..af21681ed 100644
--- a/apt-pkg/cacheiterators.h
+++ b/apt-pkg/cacheiterators.h
@@ -110,7 +110,7 @@ class pkgCache::VerIterator
// Iteration
void operator ++(int) {if (Ver != Owner->VerP) Ver = Owner->VerP + Ver->NextVer;};
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;};
// Comparison
@@ -169,7 +169,7 @@ class pkgCache::DescIterator
// Iteration
void operator ++(int) {if (Desc != Owner->DescP) Desc = Owner->DescP + Desc->NextDesc;};
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;};
// Comparison
@@ -323,7 +323,7 @@ class pkgCache::PkgFileIterator
// Iteration
void operator ++(int) {if (File!= Owner->PkgFileP) File = Owner->PkgFileP + File->NextFile;};
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
inline bool operator ==(const PkgFileIterator &B) const {return File == B.File;};
@@ -370,7 +370,7 @@ class pkgCache::VerFileIterator
// Iteration
void operator ++(int) {if (FileP != Owner->VerFileP) FileP = Owner->VerFileP + FileP->NextFile;};
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
inline bool operator ==(const VerFileIterator &B) const {return FileP == B.FileP;};
@@ -402,7 +402,7 @@ class pkgCache::DescFileIterator
// Iteration
void operator ++(int) {if (FileP != Owner->DescFileP) FileP = Owner->DescFileP + FileP->NextFile;};
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
inline bool operator ==(const DescFileIterator &B) const {return FileP == B.FileP;};
diff --git a/apt-pkg/cdrom.cc b/apt-pkg/cdrom.cc
index 370687f24..a31602dfa 100644
--- a/apt-pkg/cdrom.cc
+++ b/apt-pkg/cdrom.cc
@@ -686,7 +686,7 @@ bool pkgCdrom::Add(pkgCdromStatus *log)
{
if (_config->FindB("APT::CDROM::NoMount",false) == false)
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
diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc
index a5976cf3a..a7de09c44 100644
--- a/apt-pkg/contrib/fileutl.cc
+++ b/apt-pkg/contrib/fileutl.cc
@@ -450,8 +450,11 @@ bool ExecWait(pid_t Pid,const char *Name,bool Reap)
{
if (Reap == true)
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)
return _error->Error(_("Sub-process %s returned an error code (%u)"),Name,WEXITSTATUS(Status));
diff --git a/apt-pkg/contrib/sha256.h b/apt-pkg/contrib/sha256.h
index 1951f053b..5934b5641 100644
--- a/apt-pkg/contrib/sha256.h
+++ b/apt-pkg/contrib/sha256.h
@@ -17,6 +17,7 @@
#include <string>
#include <cstring>
#include <algorithm>
+#include <stdint.h>
using std::string;
using std::min;
diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc
index 61c582b85..a991b8988 100644
--- a/apt-pkg/contrib/strutl.cc
+++ b/apt-pkg/contrib/strutl.cc
@@ -1042,11 +1042,26 @@ void ioprintf(ostream &out,const char *format,...)
va_start(args,format);
// sprintf the description
- char S[400];
+ char S[4096];
vsnprintf(S,sizeof(S),format,args);
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 /*{{{*/
// ---------------------------------------------------------------------
/* 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 /*{{{*/
// ---------------------------------------------------------------------
/* The domain list is a comma seperate list of domains that are suffix
diff --git a/apt-pkg/contrib/strutl.h b/apt-pkg/contrib/strutl.h
index 2450bd421..e1f9e3a1f 100644
--- a/apt-pkg/contrib/strutl.h
+++ b/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,
unsigned long ListMax);
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;
bool CheckDomainList(const string &Host, const string &List);
+int tolower_ascii(int c);
#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));}; \
diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc
index b2b8b8fb6..517b771a5 100644
--- a/apt-pkg/deb/deblistparser.cc
+++ b/apt-pkg/deb/deblistparser.cc
@@ -215,7 +215,7 @@ unsigned short debListParser::VersionHash()
for (; Start != End; Start++)
{
if (isspace(*Start) == 0)
- *I++ = tolower(*Start);
+ *I++ = tolower_ascii(*Start);
if (*Start == '<' && Start[1] != '<' && Start[1] != '=')
*I++ = '=';
if (*Start == '>' && Start[1] != '>' && Start[1] != '=')
diff --git a/apt-pkg/deb/debsystem.cc b/apt-pkg/deb/debsystem.cc
index ccd45d51b..59f826d96 100644
--- a/apt-pkg/deb/debsystem.cc
+++ b/apt-pkg/deb/debsystem.cc
@@ -67,11 +67,11 @@ bool debSystem::Lock()
if (LockFD == -1)
{
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
- 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
@@ -79,8 +79,8 @@ bool debSystem::Lock()
{
close(LockFD);
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++;
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc
index 85e54988e..f787f365e 100644
--- a/apt-pkg/deb/dpkgpm.cc
+++ b/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 /*{{{*/
// ---------------------------------------------------------------------
/* */
@@ -587,6 +612,11 @@ static int racy_pselect(int nfds, fd_set *readfds, fd_set *writefds,
*/
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 MaxArgBytes = _config->FindI("Dpkg::MaxArgBytes",32*1024);
bool NoTriggers = _config->FindB("DPkg::NoTriggers",false);
@@ -610,20 +640,12 @@ bool pkgDPkgPM::Go(int OutStatusFd)
{
{"unpacked",N_("Preparing to configure %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")},
{NULL, NULL}
},
// Remove operation
{
{"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")},
{"config-files", N_("Removed %s")},
{NULL, NULL}
@@ -660,10 +682,19 @@ bool pkgDPkgPM::Go(int OutStatusFd)
for (vector<Item>::iterator I = List.begin(); I != List.end();)
{
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
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)
J = I + MaxArgs;
@@ -796,12 +827,28 @@ bool pkgDPkgPM::Go(int OutStatusFd)
rtt = tt;
cfmakeraw(&rtt);
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);
+ sigprocmask(SIG_SETMASK, &original_sigmask, 0);
}
// Fork dpkg
pid_t Child;
_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();
// This is the child
@@ -819,6 +866,15 @@ bool pkgDPkgPM::Go(int OutStatusFd)
}
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)
_exit(100);
@@ -838,7 +894,6 @@ bool pkgDPkgPM::Go(int OutStatusFd)
_exit(100);
}
-
/* No Job Control Stop Env is a magic dpkg var that prevents it
from using sigstop */
putenv((char *)"DPKG_NO_TSTP=yes");
@@ -847,6 +902,10 @@ bool pkgDPkgPM::Go(int OutStatusFd)
_exit(100);
}
+ // apply ionice
+ if (_config->FindB("DPkg::UseIoNice", false) == true)
+ ionice(Child);
+
// clear the Keep-Fd again
_config->Clear("APT::Keep-Fds",fd[1]);
@@ -863,10 +922,6 @@ bool pkgDPkgPM::Go(int OutStatusFd)
close(slave);
// setups fds
- fd_set rfds;
- struct timespec tv;
- sigset_t sigmask;
- sigset_t original_sigmask;
sigemptyset(&sigmask);
sigprocmask(SIG_BLOCK,&sigmask,&original_sigmask);
diff --git a/apt-pkg/indexcopy.cc b/apt-pkg/indexcopy.cc
index 9e5c03e0b..5a92c79b7 100644
--- a/apt-pkg/indexcopy.cc
+++ b/apt-pkg/indexcopy.cc
@@ -522,6 +522,15 @@ bool SigVerify::Verify(string prefix, string file, indexRecords *MetaIndex)
{
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)
{
_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)) {
// something went wrong, don't copy the Release.gpg
// FIXME: delete any existing gpg file?
+ _error->Discard();
continue;
}
}
diff --git a/apt-pkg/indexrecords.cc b/apt-pkg/indexrecords.cc
index 502f454a8..ab208e246 100644
--- a/apt-pkg/indexrecords.cc
+++ b/apt-pkg/indexrecords.cc
@@ -37,14 +37,14 @@ bool indexRecords::Load(const string Filename)
pkgTagFile TagFile(&Fd, Fd.Size() + 256); // XXX
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;
}
pkgTagSection Section;
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;
}
@@ -78,7 +78,7 @@ bool indexRecords::Load(const string Filename)
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;
}
diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc
index 4e10093a8..2a9756c45 100644
--- a/apt-pkg/pkgcache.cc
+++ b/apt-pkg/pkgcache.cc
@@ -164,7 +164,7 @@ unsigned long pkgCache::sHash(const string &Str) const
{
unsigned long Hash = 0;
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);
}
@@ -172,7 +172,7 @@ unsigned long pkgCache::sHash(const char *Str) const
{
unsigned long Hash = 0;
for (const char *I = Str; *I != 0; I++)
- Hash = 5*Hash + tolower(*I);
+ Hash = 5*Hash + tolower_ascii(*I);
return Hash % _count(HeaderP->HashTable);
}
diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc
index acef8dc5e..c30e22b76 100644
--- a/cmdline/apt-cache.cc
+++ b/cmdline/apt-cache.cc
@@ -102,15 +102,13 @@ bool UnMet(CommandLine &CmdL)
if (End->Type != pkgCache::Dep::PreDepends &&
End->Type != pkgCache::Dep::Depends &&
End->Type != pkgCache::Dep::Suggests &&
- End->Type != pkgCache::Dep::Recommends &&
- End->Type != pkgCache::Dep::DpkgBreaks)
+ End->Type != pkgCache::Dep::Recommends)
continue;
// Important deps only
if (Important == true)
if (End->Type != pkgCache::Dep::PreDepends &&
- End->Type != pkgCache::Dep::Depends &&
- End->Type != pkgCache::Dep::DpkgBreaks)
+ End->Type != pkgCache::Dep::Depends)
continue;
// Verify the or group
@@ -557,6 +555,7 @@ bool Depends(CommandLine &CmdL)
bool Recurse = _config->FindB("APT::Cache::RecurseDepends",false);
bool Installed = _config->FindB("APT::Cache::Installed",false);
+ bool Important = _config->FindB("APT::Cache::Important",false);
bool DidSomething;
do
{
@@ -579,7 +578,12 @@ bool Depends(CommandLine &CmdL)
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();
if((Installed && Trg->CurrentVer != 0) || !Installed)
@@ -1529,7 +1533,8 @@ bool Policy(CommandLine &CmdL)
if (SrcList->FindIndex(F,Indx) == false &&
_system->FindIndex(F,Indx) == false)
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());
// Print the reference information for the package
diff --git a/cmdline/apt-mark b/cmdline/apt-mark
index f6e749eb5..226d2079b 100755
--- a/cmdline/apt-mark
+++ b/cmdline/apt-mark
@@ -14,34 +14,21 @@ actions = { "markauto" : 1,
"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
if os.path.exists(STATE_FILE):
tagfile = apt_pkg.ParseTagFile(open(STATE_FILE))
@@ -63,3 +50,34 @@ if __name__ == "__main__":
os.chmod(outfile.name, 0644)
os.rename(outfile.name, STATE_FILE)
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)
diff --git a/debian/apt.cron.daily b/debian/apt.cron.daily
index b40bb2c30..7e4214775 100644
--- a/debian/apt.cron.daily
+++ b/debian/apt.cron.daily
@@ -1,40 +1,67 @@
#!/bin/sh
-#
-
#set -e
#
# 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
# 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
# is bigger, cached package files are deleted until the size
# requirement is met (the biggest packages will be deleted
# 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()
{
@@ -42,10 +69,15 @@ check_stamp()
interval="$2"
if [ $interval -eq 0 ]; then
+ debug_echo "check_stamp: interval=0"
+ # treat as no time has passed
return 1
fi
if [ ! -f $stamp ]; then
+ update_stamp $stamp
+ debug_echo "check_stamp: missing time stamp file: $stamp"
+ # treat as enough time has passed
return 0
fi
@@ -71,10 +103,9 @@ check_stamp()
delta=$(($now-$stamp))
- # intervall is in days,
+ # intervall is in days, convert to sec.
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
if [ $stamp -gt $(($now+86400)) ]; then
@@ -93,12 +124,9 @@ check_stamp()
update_stamp()
{
stamp="$1"
-
touch $stamp
}
-
-
# we check here if autoclean was enough sizewise
check_size_constraints()
{
@@ -188,83 +216,287 @@ random_sleep()
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
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
+eval $(apt-config shell UpdateInterval APT::Periodic::Update-Package-Lists)
+
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
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
if [ $UpdateInterval -eq 0 ] &&
[ $DownloadUpgradeableInterval -eq 0 ] &&
[ $UnattendedUpgradeInterval -eq 0 ] &&
+ [ $BackupArchiveInterval -eq 0 ] &&
[ $AutocleanInterval -eq 0 ]; then
exit 0
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
# mirrors at the same time
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
+else
+ debug_echo "skip backup since too new."
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
+
+# 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
-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
+# autoclean package archive
AUTOCLEAN_STAMP=/var/lib/apt/periodic/autoclean-stamp
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
-# check cache size
-check_size_constraints
+#
+# vim: set sts=4 ai :
+#
+
diff --git a/debian/changelog b/debian/changelog
index 6ce3b7c7d..6e03bbbd4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -41,6 +41,48 @@ apt (0.7.22) UNRELEASED; urgency=low
* honor the dpkg hold state in AutoInstOk (closes: #64141)
* debian/apt.cron.daily:
- 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 ]
* 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
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
apt (0.7.21) unstable; urgency=low
diff --git a/doc/apt-cache.8.xml b/doc/apt-cache.8.xml
index 21605ff0e..6c8938d8c 100644
--- a/doc/apt-cache.8.xml
+++ b/doc/apt-cache.8.xml
@@ -300,7 +300,7 @@ Reverse Provides:
</varlistentry>
<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.
Configuration Item: <literal>APT::Cache::Important</literal>.</para></listitem>
</varlistentry>
diff --git a/doc/apt-get.8.xml b/doc/apt-get.8.xml
index e7f6d7094..609674d75 100644
--- a/doc/apt-get.8.xml
+++ b/doc/apt-get.8.xml
@@ -401,6 +401,14 @@
Configuration Item: <literal>APT::Get::Compile</literal>.</para></listitem>
</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>
<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
diff --git a/doc/examples/configure-index b/doc/examples/configure-index
index c2b1bb272..ada6b12ce 100644
--- a/doc/examples/configure-index
+++ b/doc/examples/configure-index
@@ -115,6 +115,56 @@ APT
// Keep the list of FDs open (normally apt closes all fds when it
// does a ExecFork)
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
@@ -213,6 +263,8 @@ Dir "/"
// Location of the cache dir
Cache "var/cache/apt/" {
Archives "archives/";
+ // backup directory created by /etc/cron.daily/apt
+ Backup "backup/";
srcpkgcache "srcpkgcache.bin";
pkgcache "pkgcache.bin";
};
diff --git a/ftparchive/writer.h b/ftparchive/writer.h
index a4e4356f9..6e161c752 100644
--- a/ftparchive/writer.h
+++ b/ftparchive/writer.h
@@ -52,7 +52,7 @@ class FTWScanner
{
if (ErrorPrinted == false && Quiet <= Priority)
{
- cout << endl;
+ c1out << endl;
ErrorPrinted = true;
}
}
diff --git a/methods/gpgv.cc b/methods/gpgv.cc
index 470b47fd4..150c1d315 100644
--- a/methods/gpgv.cc
+++ b/methods/gpgv.cc
@@ -292,7 +292,7 @@ bool GPGVMethod::Fetch(FetchItem *Itm)
// least one bad signature. good signatures and NoPubKey signatures
// happen easily when a file is signed with multiple signatures
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
diff --git a/methods/http.cc b/methods/http.cc
index 1bf798da4..006e89394 100644
--- a/methods/http.cc
+++ b/methods/http.cc
@@ -1316,9 +1316,11 @@ int HttpMethod::Loop()
int main()
{
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;
-
return Mth.Loop();
}
diff --git a/po/apt-all.pot b/po/apt-all.pot
index d1b705837..b8305c25c 100644
--- a/po/apt-all.pot
+++ b/po/apt-all.pot
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\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"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -15,153 +15,148 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
-#: cmdline/apt-cache.cc:143
+#: cmdline/apt-cache.cc:141
#, c-format
msgid "Package %s version %s has an unmet dep:\n"
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
msgid "Unable to locate package %s"
msgstr ""
-#: cmdline/apt-cache.cc:247
+#: cmdline/apt-cache.cc:245
msgid "Total package names: "
msgstr ""
-#: cmdline/apt-cache.cc:287
+#: cmdline/apt-cache.cc:285
msgid " Normal packages: "
msgstr ""
-#: cmdline/apt-cache.cc:288
+#: cmdline/apt-cache.cc:286
msgid " Pure virtual packages: "
msgstr ""
-#: cmdline/apt-cache.cc:289
+#: cmdline/apt-cache.cc:287
msgid " Single virtual packages: "
msgstr ""
-#: cmdline/apt-cache.cc:290
+#: cmdline/apt-cache.cc:288
msgid " Mixed virtual packages: "
msgstr ""
-#: cmdline/apt-cache.cc:291
+#: cmdline/apt-cache.cc:289
msgid " Missing: "
msgstr ""
-#: cmdline/apt-cache.cc:293
+#: cmdline/apt-cache.cc:291
msgid "Total distinct versions: "
msgstr ""
-#: cmdline/apt-cache.cc:295
+#: cmdline/apt-cache.cc:293
msgid "Total distinct descriptions: "
msgstr ""
-#: cmdline/apt-cache.cc:297
+#: cmdline/apt-cache.cc:295
msgid "Total dependencies: "
msgstr ""
-#: cmdline/apt-cache.cc:300
+#: cmdline/apt-cache.cc:298
msgid "Total ver/file relations: "
msgstr ""
-#: cmdline/apt-cache.cc:302
+#: cmdline/apt-cache.cc:300
msgid "Total Desc/File relations: "
msgstr ""
-#: cmdline/apt-cache.cc:304
+#: cmdline/apt-cache.cc:302
msgid "Total Provides mappings: "
msgstr ""
-#: cmdline/apt-cache.cc:316
+#: cmdline/apt-cache.cc:314
msgid "Total globbed strings: "
msgstr ""
-#: cmdline/apt-cache.cc:330
+#: cmdline/apt-cache.cc:328
msgid "Total dependency version space: "
msgstr ""
-#: cmdline/apt-cache.cc:335
+#: cmdline/apt-cache.cc:333
msgid "Total slack space: "
msgstr ""
-#: cmdline/apt-cache.cc:343
+#: cmdline/apt-cache.cc:341
msgid "Total space accounted for: "
msgstr ""
-#: cmdline/apt-cache.cc:471 cmdline/apt-cache.cc:1218
+#: cmdline/apt-cache.cc:469 cmdline/apt-cache.cc:1222
#, c-format
msgid "Package file %s is out of sync."
msgstr ""
-#: cmdline/apt-cache.cc:1293
+#: cmdline/apt-cache.cc:1297
msgid "You must give exactly one pattern"
msgstr ""
-#: cmdline/apt-cache.cc:1447
+#: cmdline/apt-cache.cc:1451
msgid "No packages found"
msgstr ""
-#: cmdline/apt-cache.cc:1524
+#: cmdline/apt-cache.cc:1528
msgid "Package files:"
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"
msgstr ""
-#: cmdline/apt-cache.cc:1532
-#, c-format
-msgid "%4i %s\n"
-msgstr ""
-
#. Show any packages have explicit pins
-#: cmdline/apt-cache.cc:1544
+#: cmdline/apt-cache.cc:1549
msgid "Pinned packages:"
msgstr ""
-#: cmdline/apt-cache.cc:1556 cmdline/apt-cache.cc:1597
+#: cmdline/apt-cache.cc:1561 cmdline/apt-cache.cc:1602
msgid "(not found)"
msgstr ""
#. Installed version
-#: cmdline/apt-cache.cc:1577
+#: cmdline/apt-cache.cc:1582
msgid " Installed: "
msgstr ""
-#: cmdline/apt-cache.cc:1579 cmdline/apt-cache.cc:1587
+#: cmdline/apt-cache.cc:1584 cmdline/apt-cache.cc:1592
msgid "(none)"
msgstr ""
#. Candidate Version
-#: cmdline/apt-cache.cc:1584
+#: cmdline/apt-cache.cc:1589
msgid " Candidate: "
msgstr ""
-#: cmdline/apt-cache.cc:1594
+#: cmdline/apt-cache.cc:1599
msgid " Package pin: "
msgstr ""
#. Show the priority tables
-#: cmdline/apt-cache.cc:1603
+#: cmdline/apt-cache.cc:1608
msgid " Version table:"
msgstr ""
-#: cmdline/apt-cache.cc:1618
+#: cmdline/apt-cache.cc:1623
#, c-format
msgid " %4i %s\n"
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-get.cc:2586 cmdline/apt-sortpkgs.cc:144
#, c-format
msgid "%s %s for %s compiled on %s %s\n"
msgstr ""
-#: cmdline/apt-cache.cc:1721
+#: cmdline/apt-cache.cc:1726
msgid ""
"Usage: apt-cache [options] command\n"
" apt-cache [options] add file1 [file2 ...]\n"
@@ -780,7 +775,7 @@ msgstr ""
msgid "Do you want to continue [Y/n]? "
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
msgid "Failed to fetch %s %s\n"
msgstr ""
@@ -1388,7 +1383,7 @@ msgstr ""
#: apt-inst/extract.cc:464 apt-pkg/contrib/configuration.cc:822
#: 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
msgid "Unable to read %s"
msgstr ""
@@ -1613,7 +1608,7 @@ msgstr ""
msgid "Server closed the connection"
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"
msgstr ""
@@ -1625,7 +1620,7 @@ msgstr ""
msgid "Protocol corruption"
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"
msgstr ""
@@ -2044,7 +2039,7 @@ msgid "Unable to stat the mount point %s"
msgstr ""
#: 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
msgid "Unable to change to %s"
msgstr ""
@@ -2078,45 +2073,50 @@ msgstr ""
msgid "Waited for %s but it wasn't there"
msgstr ""
-#: apt-pkg/contrib/fileutl.cc:454
+#: apt-pkg/contrib/fileutl.cc:455
#, c-format
msgid "Sub-process %s received a segmentation fault."
msgstr ""
#: apt-pkg/contrib/fileutl.cc:457
#, 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)"
msgstr ""
-#: apt-pkg/contrib/fileutl.cc:459
+#: apt-pkg/contrib/fileutl.cc:462
#, c-format
msgid "Sub-process %s exited unexpectedly"
msgstr ""
-#: apt-pkg/contrib/fileutl.cc:503
+#: apt-pkg/contrib/fileutl.cc:506
#, c-format
msgid "Could not open file %s"
msgstr ""
-#: apt-pkg/contrib/fileutl.cc:559
+#: apt-pkg/contrib/fileutl.cc:562
#, c-format
msgid "read, still have %lu to read but none left"
msgstr ""
-#: apt-pkg/contrib/fileutl.cc:589
+#: apt-pkg/contrib/fileutl.cc:592
#, c-format
msgid "write, still have %lu to write but couldn't"
msgstr ""
-#: apt-pkg/contrib/fileutl.cc:664
+#: apt-pkg/contrib/fileutl.cc:667
msgid "Problem closing the file"
msgstr ""
-#: apt-pkg/contrib/fileutl.cc:670
+#: apt-pkg/contrib/fileutl.cc:673
msgid "Problem unlinking the file"
msgstr ""
-#: apt-pkg/contrib/fileutl.cc:681
+#: apt-pkg/contrib/fileutl.cc:684
msgid "Problem syncing the file"
msgstr ""
@@ -2302,40 +2302,40 @@ msgid ""
"The package %s needs to be reinstalled, but I can't find an archive for it."
msgstr ""
-#: apt-pkg/algorithms.cc:1147
+#: apt-pkg/algorithms.cc:1154
msgid ""
"Error, pkgProblemResolver::Resolve generated breaks, this may be caused by "
"held packages."
msgstr ""
-#: apt-pkg/algorithms.cc:1149
+#: apt-pkg/algorithms.cc:1156
msgid "Unable to correct problems, you have held broken packages."
msgstr ""
-#: apt-pkg/algorithms.cc:1426 apt-pkg/algorithms.cc:1428
+#: apt-pkg/algorithms.cc:1433 apt-pkg/algorithms.cc:1435
msgid ""
"Some index files failed to download, they have been ignored, or old ones "
"used instead."
msgstr ""
-#: apt-pkg/acquire.cc:59
+#: apt-pkg/acquire.cc:60
#, c-format
msgid "Lists directory %spartial is missing."
msgstr ""
-#: apt-pkg/acquire.cc:63
+#: apt-pkg/acquire.cc:64
#, c-format
msgid "Archive directory %spartial is missing."
msgstr ""
#. only show the ETA if it makes sense
#. two days
-#: apt-pkg/acquire.cc:828
+#: apt-pkg/acquire.cc:829
#, c-format
msgid "Retrieving file %li of %li (%s remaining)"
msgstr ""
-#: apt-pkg/acquire.cc:830
+#: apt-pkg/acquire.cc:831
#, c-format
msgid "Retrieving file %li of %li"
msgstr ""
@@ -2355,12 +2355,12 @@ msgstr ""
msgid "Please insert the disc labeled: '%s' in the drive '%s' and press enter."
msgstr ""
-#: apt-pkg/init.cc:124
+#: apt-pkg/init.cc:125
#, c-format
msgid "Packaging system '%s' is not supported"
msgstr ""
-#: apt-pkg/init.cc:140
+#: apt-pkg/init.cc:141
msgid "Unable to determine a suitable packaging system type"
msgstr ""
@@ -2381,16 +2381,17 @@ msgstr ""
msgid "You may want to run apt-get update to correct these problems"
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 ""
-#: apt-pkg/policy.cc:303
+#: apt-pkg/policy.cc:351
#, c-format
msgid "Did not understand pin type %s"
msgstr ""
-#: apt-pkg/policy.cc:311
+#: apt-pkg/policy.cc:359
msgid "No priority (or zero) specified for pin"
msgstr ""
@@ -2528,6 +2529,21 @@ msgstr ""
msgid "Size mismatch"
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
#, c-format
msgid "Vendor block %s contains no fingerprint"
@@ -2582,6 +2598,12 @@ msgid ""
"zu signatures\n"
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
#, c-format
msgid "Found label '%s'\n"
@@ -2610,22 +2632,22 @@ msgstr ""
msgid "Source list entries for this disc are:\n"
msgstr ""
-#: apt-pkg/indexcopy.cc:263 apt-pkg/indexcopy.cc:823
+#: apt-pkg/indexcopy.cc:263 apt-pkg/indexcopy.cc:833
#, c-format
msgid "Wrote %i records.\n"
msgstr ""
-#: apt-pkg/indexcopy.cc:265 apt-pkg/indexcopy.cc:825
+#: apt-pkg/indexcopy.cc:265 apt-pkg/indexcopy.cc:835
#, c-format
msgid "Wrote %i records with %i missing files.\n"
msgstr ""
-#: apt-pkg/indexcopy.cc:268 apt-pkg/indexcopy.cc:828
+#: apt-pkg/indexcopy.cc:268 apt-pkg/indexcopy.cc:838
#, c-format
msgid "Wrote %i records with %i mismatched files\n"
msgstr ""
-#: apt-pkg/indexcopy.cc:271 apt-pkg/indexcopy.cc:831
+#: apt-pkg/indexcopy.cc:271 apt-pkg/indexcopy.cc:841
#, c-format
msgid "Wrote %i records with %i missing files and %i mismatched files\n"
msgstr ""
@@ -2635,12 +2657,12 @@ msgstr ""
msgid "Installing %s"
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
msgid "Configuring %s"
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
msgid "Removing %s"
msgstr ""
@@ -2650,61 +2672,77 @@ msgstr ""
msgid "Running post-installation trigger %s"
msgstr ""
-#: apt-pkg/deb/dpkgpm.cc:521
+#: apt-pkg/deb/dpkgpm.cc:546
#, c-format
msgid "Directory '%s' missing"
msgstr ""
-#: apt-pkg/deb/dpkgpm.cc:605
+#: apt-pkg/deb/dpkgpm.cc:635
#, c-format
msgid "Preparing %s"
msgstr ""
-#: apt-pkg/deb/dpkgpm.cc:606
+#: apt-pkg/deb/dpkgpm.cc:636
#, c-format
msgid "Unpacking %s"
msgstr ""
-#: apt-pkg/deb/dpkgpm.cc:611
+#: apt-pkg/deb/dpkgpm.cc:641
#, c-format
msgid "Preparing to configure %s"
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
msgid "Installed %s"
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
msgid "Preparing for removal of %s"
msgstr ""
-#: apt-pkg/deb/dpkgpm.cc:628
+#: apt-pkg/deb/dpkgpm.cc:650
#, c-format
msgid "Removed %s"
msgstr ""
-#: apt-pkg/deb/dpkgpm.cc:633
+#: apt-pkg/deb/dpkgpm.cc:655
#, c-format
msgid "Preparing to completely remove %s"
msgstr ""
-#: apt-pkg/deb/dpkgpm.cc:634
+#: apt-pkg/deb/dpkgpm.cc:656
#, c-format
msgid "Completely removed %s"
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"
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
msgid "Not locked"
msgstr ""