From e01c08b0206b54c2d977a360beab2d72cf079f0c Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 25 Jul 2008 20:21:53 +0200 Subject: * improve apt progress reporting, display trigger actions --- apt-pkg/deb/dpkgpm.cc | 42 +++++++++++++++++++++++++++++++++++++++++- apt-pkg/deb/dpkgpm.h | 2 ++ 2 files changed, 43 insertions(+), 1 deletion(-) (limited to 'apt-pkg/deb') diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index bc15b8819..77143e671 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -333,6 +333,12 @@ void pkgDPkgPM::ProcessDpkgStatusLine(int OutStatusFd, char *line) 'status: /var/cache/apt/archives/krecipes_0.8.1-0ubuntu1_i386.deb : error : trying to overwrite `/usr/share/doc/kde/HTML/en/krecipes/krectip.png', which is also in package krecipes-data and conffile-prompt like this 'status: conffile-prompt: conffile : 'current-conffile' 'new-conffile' useredited distedited + + Newer versions of dpkg sent also: + 'processing: install: pkg' + 'processing: configure: pkg' + 'processing: remove: pkg' + 'processing: trigproc: trigger' */ char* list[5]; @@ -351,6 +357,34 @@ void pkgDPkgPM::ProcessDpkgStatusLine(int OutStatusFd, char *line) char *pkg = list[1]; char *action = _strstrip(list[2]); + // 'processing' from dpkg looks like + // 'processing: action: pkg' + if(strncmp(list[0], "processing", strlen("processing")) == 0) + { + char s[200]; + map::iterator iter; + char *pkg_or_trigger = _strstrip(list[2]); + action =_strstrip( list[1]); + iter = PackageProcessingOps.find(action); + if(iter == PackageProcessingOps.end()) + { + if (_config->FindB("Debug::pkgDPkgProgressReporting",false) == true) + std::clog << "ignoring unknwon action: " << action << std::endl; + return; + } + snprintf(s, sizeof(s), _(iter->second.c_str()), pkg_or_trigger); + + status << "pmstatus:" << pkg_or_trigger + << ":" << (PackagesDone/float(PackagesTotal)*100.0) + << ":" << s + << endl; + if(OutStatusFd > 0) + write(OutStatusFd, status.str().c_str(), status.str().size()); + if (_config->FindB("Debug::pkgDPkgProgressReporting",false) == true) + std::clog << "send: '" << status.str() << "'" << endl; + return; + } + if(strncmp(action,"error",strlen("error")) == 0) { status << "pmerror:" << list[1] @@ -526,7 +560,7 @@ bool pkgDPkgPM::Go(int OutStatusFd) if (RunScriptsWithPkgs("DPkg::Pre-Install-Pkgs") == false) return false; - + // map the dpkg states to the operations that are performed // (this is sorted in the same way as Item::Ops) static const struct DpkgState DpkgStatesOpMap[][7] = { @@ -566,6 +600,12 @@ bool pkgDPkgPM::Go(int OutStatusFd) }, }; + // populate the "processing" map + PackageProcessingOps.insert( make_pair("install",N_("Installing %s")) ); + PackageProcessingOps.insert( make_pair("configure",N_("Configuring %s")) ); + PackageProcessingOps.insert( make_pair("remove",N_("Removing %s")) ); + PackageProcessingOps.insert( make_pair("trigproc",N_("Running post-installation trigger %s")) ); + // init the PackageOps map, go over the list of packages that // that will be [installed|configured|removed|purged] and add // them to the PackageOps map (the dpkg states it goes through) diff --git a/apt-pkg/deb/dpkgpm.h b/apt-pkg/deb/dpkgpm.h index ebc7e32bf..449469126 100644 --- a/apt-pkg/deb/dpkgpm.h +++ b/apt-pkg/deb/dpkgpm.h @@ -47,6 +47,8 @@ class pkgDPkgPM : public pkgPackageManager // the int is the state that is already done (e.g. a package that is // going to be install is already in state "half-installed") map PackageOpsDone; + // map the dpkg "processing" info to human readable names + map PackageProcessingOps; // progress reporting unsigned int PackagesDone; unsigned int PackagesTotal; -- cgit v1.2.3-70-g09d2 From e2c79929482ba04ed1a576e4bc837d434c71756e Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 25 Jul 2008 20:33:10 +0200 Subject: * add DPkg::NoTriggers option so that applications that call apt/aptitude (like the installer) defer trigger processing (thanks to Joey Hess) --- apt-pkg/deb/dpkgpm.cc | 3 +++ debian/changelog | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'apt-pkg/deb') diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index 77143e671..0071c151e 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -554,6 +554,7 @@ bool pkgDPkgPM::Go(int OutStatusFd) { 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); if (RunScripts("DPkg::Pre-Invoke") == false) return false; @@ -689,6 +690,8 @@ bool pkgDPkgPM::Go(int OutStatusFd) case Item::Configure: Args[n++] = "--configure"; + if (NoTriggers) + Args[n++] = "--no-triggers"; Size += strlen(Args[n-1]); break; diff --git a/debian/changelog b/debian/changelog index 35b447dd4..1600fed98 100644 --- a/debian/changelog +++ b/debian/changelog @@ -19,9 +19,11 @@ apt (0.7.15) UNRELEASED; urgency=low - when checking for new important deps, skip critical ones (closes: #485943) * improve apt progress reporting, display trigger actions + * add DPkg::NoTriggers option so that applications that call + apt/aptitude (like the installer) defer trigger processing + (thanks to Joey Hess) - - -- Christian Perrier Sat, 14 Jun 2008 07:39:06 +0200 + -- Michael Vogt Fri, 25 Jul 2008 20:31:05 +0200 apt (0.7.14) unstable; urgency=low -- cgit v1.2.3-70-g09d2 From f7dec19f5ce3b876c5d2eaeb2d26cf513780c935 Mon Sep 17 00:00:00 2001 From: Daniel Burrows Date: Thu, 25 Sep 2008 18:24:09 -0700 Subject: Restore the apt ABI. The problem was that the size of pkgDpkgPM and its member offsets changed because a map giving the names of the trigger states was inserted into the middle of the structure. I fixed it by using a statically allocated array instead. This changes the procedure for looking up a string to a linear search, which should be fine (or even faster than before) since there are only 4 state strings. If it becomes a problem, sorting the array by key will allow us to use std::equal_range(), but I would advise against this unless it's really necessary, since sooner or later someone will forget to maintain the sort order. --- apt-pkg/deb/dpkgpm.cc | 51 ++++++++++++++++++++++++++++++++++++++++----------- apt-pkg/deb/dpkgpm.h | 2 -- debian/changelog | 12 ++++++++++++ 3 files changed, 52 insertions(+), 13 deletions(-) (limited to 'apt-pkg/deb') diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index 0071c151e..70dd09bc6 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -25,6 +25,8 @@ #include #include #include +#include +#include #include #include @@ -39,7 +41,38 @@ using namespace std; - +namespace +{ + // Maps the dpkg "processing" info to human readable names. Entry 0 + // of each array is the key, entry 1 is the value. + const std::pair PackageProcessingOps[] = { + std::make_pair("install", N_("Installing %s")), + std::make_pair("configure", N_("Configuring %s")), + std::make_pair("remove", N_("Removing %s")), + std::make_pair("trigproc", N_("Running post-installation trigger %s")) + }; + + const std::pair * const PackageProcessingOpsBegin = PackageProcessingOps; + const std::pair * const PackageProcessingOpsEnd = PackageProcessingOps + sizeof(PackageProcessingOps) / sizeof(PackageProcessingOps[0]); + + // Predicate to test whether an entry in the PackageProcessingOps + // array matches a string. + class MatchProcessingOp + { + const char *target; + + public: + MatchProcessingOp(const char *the_target) + : target(the_target) + { + } + + bool operator()(const std::pair &pair) const + { + return strcmp(pair.first, target) == 0; + } + }; +} // DPkgPM::pkgDPkgPM - Constructor /*{{{*/ // --------------------------------------------------------------------- @@ -362,17 +395,19 @@ void pkgDPkgPM::ProcessDpkgStatusLine(int OutStatusFd, char *line) if(strncmp(list[0], "processing", strlen("processing")) == 0) { char s[200]; - map::iterator iter; char *pkg_or_trigger = _strstrip(list[2]); action =_strstrip( list[1]); - iter = PackageProcessingOps.find(action); - if(iter == PackageProcessingOps.end()) + const std::pair * const iter = + std::find_if(PackageProcessingOpsBegin, + PackageProcessingOpsEnd, + MatchProcessingOp(action)); + if(iter == PackageProcessingOpsEnd) { if (_config->FindB("Debug::pkgDPkgProgressReporting",false) == true) std::clog << "ignoring unknwon action: " << action << std::endl; return; } - snprintf(s, sizeof(s), _(iter->second.c_str()), pkg_or_trigger); + snprintf(s, sizeof(s), _(iter->second), pkg_or_trigger); status << "pmstatus:" << pkg_or_trigger << ":" << (PackagesDone/float(PackagesTotal)*100.0) @@ -601,12 +636,6 @@ bool pkgDPkgPM::Go(int OutStatusFd) }, }; - // populate the "processing" map - PackageProcessingOps.insert( make_pair("install",N_("Installing %s")) ); - PackageProcessingOps.insert( make_pair("configure",N_("Configuring %s")) ); - PackageProcessingOps.insert( make_pair("remove",N_("Removing %s")) ); - PackageProcessingOps.insert( make_pair("trigproc",N_("Running post-installation trigger %s")) ); - // init the PackageOps map, go over the list of packages that // that will be [installed|configured|removed|purged] and add // them to the PackageOps map (the dpkg states it goes through) diff --git a/apt-pkg/deb/dpkgpm.h b/apt-pkg/deb/dpkgpm.h index 449469126..ebc7e32bf 100644 --- a/apt-pkg/deb/dpkgpm.h +++ b/apt-pkg/deb/dpkgpm.h @@ -47,8 +47,6 @@ class pkgDPkgPM : public pkgPackageManager // the int is the state that is already done (e.g. a package that is // going to be install is already in state "half-installed") map PackageOpsDone; - // map the dpkg "processing" info to human readable names - map PackageProcessingOps; // progress reporting unsigned int PackagesDone; unsigned int PackagesTotal; diff --git a/debian/changelog b/debian/changelog index 5c381ab27..8913ef4bf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,15 @@ +apt (UNRELEASED) experimental; urgency=low + + [Daniel Burrows] + * apt-pkg/deb/dpkgpm.cc: + - Store the trigger state descriptions in a way that does not break + the ABI. The approach taken makes the search for a string O(n) rather + than O(lg(n)), but since n == 4, I do not consider this a major + concern. If it becomes a concern, we can sort the static array and + use std::equal_range(). (Closes: #499322) + + -- + apt (0.7.15~exp2) experimental; urgency=low [ Michael Vogt ] -- cgit v1.2.3-70-g09d2 From 496d5c709d9811f03b70ef0eaf6733c13d2564d2 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 1 Oct 2008 18:35:23 +0200 Subject: * apt-pkg/packagemanager.cc, apt-pkg/deb/dpkgpm.cc: - move the state file writting into the Go() implementation of dpkgpm (closes: #498799) * apt-pkg/algorithms.cc: - fix simulation performance drop (thanks to Ferenc Wagner for reporting the issue) --- apt-pkg/algorithms.cc | 3 ++- apt-pkg/algorithms.h | 1 + apt-pkg/deb/dpkgpm.cc | 2 ++ apt-pkg/packagemanager.cc | 4 ---- debian/changelog | 12 ++++++++++-- 5 files changed, 15 insertions(+), 7 deletions(-) (limited to 'apt-pkg/deb') diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc index eaab4c0ea..59f994cd7 100644 --- a/apt-pkg/algorithms.cc +++ b/apt-pkg/algorithms.cc @@ -37,7 +37,8 @@ pkgProblemResolver *pkgProblemResolver::This = 0; this is not necessary since the pkgCaches are fully shared now. */ pkgSimulate::pkgSimulate(pkgDepCache *Cache) : pkgPackageManager(Cache), iPolicy(Cache), - Sim(&Cache->GetCache(),&iPolicy) + Sim(&Cache->GetCache(),&iPolicy), + group(Sim) { Sim.Init(0); Flags = new unsigned char[Cache->Head().PackageCount]; diff --git a/apt-pkg/algorithms.h b/apt-pkg/algorithms.h index defaed57d..d183cd213 100644 --- a/apt-pkg/algorithms.h +++ b/apt-pkg/algorithms.h @@ -60,6 +60,7 @@ class pkgSimulate : public pkgPackageManager Policy iPolicy; pkgDepCache Sim; + pkgDepCache::ActionGroup group; // The Actuall installation implementation virtual bool Install(PkgIterator Pkg,string File); diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index 70dd09bc6..4fad0fd52 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -956,6 +956,8 @@ bool pkgDPkgPM::Go(int OutStatusFd) if (RunScripts("DPkg::Post-Invoke") == false) return false; + + Cache.writeStateFile(NULL); return true; } /*}}}*/ diff --git a/apt-pkg/packagemanager.cc b/apt-pkg/packagemanager.cc index c391a6036..304d1c653 100644 --- a/apt-pkg/packagemanager.cc +++ b/apt-pkg/packagemanager.cc @@ -666,10 +666,6 @@ pkgPackageManager::DoInstallPostFork(int statusFd) if(goResult == false) return Failed; - // if all was fine update the state file - if(Res == Completed) { - Cache.writeStateFile(NULL); - } return Res; }; diff --git a/debian/changelog b/debian/changelog index 8913ef4bf..796c5cff0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -apt (UNRELEASED) experimental; urgency=low +apt (0.7.15~exp3) UNRELEASED; urgency=low [Daniel Burrows] * apt-pkg/deb/dpkgpm.cc: @@ -8,7 +8,15 @@ apt (UNRELEASED) experimental; urgency=low concern. If it becomes a concern, we can sort the static array and use std::equal_range(). (Closes: #499322) - -- + [ Michael Vogt ] + * apt-pkg/packagemanager.cc, apt-pkg/deb/dpkgpm.cc: + - move the state file writting into the Go() implementation + of dpkgpm (closes: #498799) + * apt-pkg/algorithms.cc: + - fix simulation performance drop (thanks to Ferenc Wagner + for reporting the issue) + + -- Michael Vogt Wed, 01 Oct 2008 18:09:49 +0200 apt (0.7.15~exp2) experimental; urgency=low -- cgit v1.2.3-70-g09d2 From 3c8cda8b05d6eeaef76c7ccc673fe378b0c74f37 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 28 Oct 2008 18:14:29 +0100 Subject: fix various -Wall warnings --- apt-inst/contrib/extracttar.cc | 4 ++-- apt-pkg/acquire.cc | 3 ++- apt-pkg/contrib/cdromutl.cc | 3 ++- apt-pkg/contrib/mmap.cc | 5 +++-- apt-pkg/deb/dpkgpm.cc | 4 ++-- apt-pkg/depcache.cc | 2 +- apt-pkg/indexcopy.cc | 2 +- cmdline/apt-cache.cc | 2 +- debian/changelog | 5 ++++- methods/http.cc | 3 ++- methods/https.cc | 2 +- po/apt-all.pot | 27 ++++++++++++++++++--------- 12 files changed, 39 insertions(+), 23 deletions(-) (limited to 'apt-pkg/deb') diff --git a/apt-inst/contrib/extracttar.cc b/apt-inst/contrib/extracttar.cc index 68c871a5d..8338fd89d 100644 --- a/apt-inst/contrib/extracttar.cc +++ b/apt-inst/contrib/extracttar.cc @@ -208,14 +208,14 @@ bool ExtractTar::Go(pkgDirStream &Stream) Itm.Name = (char *)LastLongName.c_str(); else { - Tar->Name[sizeof(Tar->Name)] = 0; + Tar->Name[sizeof(Tar->Name)-1] = 0; Itm.Name = Tar->Name; } if (Itm.Name[0] == '.' && Itm.Name[1] == '/' && Itm.Name[2] != 0) Itm.Name += 2; // Grab the link target - Tar->Name[sizeof(Tar->LinkName)] = 0; + Tar->Name[sizeof(Tar->LinkName)-1] = 0; Itm.LinkTarget = Tar->LinkName; if (LastLongLink.empty() == false) diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc index 80c2fee0f..38944bbac 100644 --- a/apt-pkg/acquire.cc +++ b/apt-pkg/acquire.cc @@ -444,8 +444,9 @@ bool pkgAcquire::Clean(string Dir) unlink(Dir->d_name); }; - chdir(StartDir.c_str()); closedir(D); + if (chdir(StartDir.c_str()) != 0) + return _error->Errno("chdir",_("Unable to change to %s"),StartDir.c_str()); return true; } /*}}}*/ diff --git a/apt-pkg/contrib/cdromutl.cc b/apt-pkg/contrib/cdromutl.cc index 6f00e1451..b6524a178 100644 --- a/apt-pkg/contrib/cdromutl.cc +++ b/apt-pkg/contrib/cdromutl.cc @@ -176,7 +176,8 @@ bool IdentCdrom(string CD,string &Res,unsigned int Version) Hash.Add(Dir->d_name); }; - chdir(StartDir.c_str()); + if (chdir(StartDir.c_str()) != 0) + return _error->Errno("chdir",_("Unable to change to %s"),StartDir.c_str()); closedir(D); // Some stats from the fsys diff --git a/apt-pkg/contrib/mmap.cc b/apt-pkg/contrib/mmap.cc index abcae46fe..eed438250 100644 --- a/apt-pkg/contrib/mmap.cc +++ b/apt-pkg/contrib/mmap.cc @@ -192,7 +192,8 @@ DynamicMMap::~DynamicMMap() unsigned long EndOfFile = iSize; iSize = WorkSpace; Close(false); - ftruncate(Fd->Fd(),EndOfFile); + if(ftruncate(Fd->Fd(),EndOfFile) < 0) + _error->Errno("ftruncate", _("Failed to truncate file")); } /*}}}*/ // DynamicMMap::RawAllocate - Allocate a raw chunk of unaligned space /*{{{*/ @@ -209,7 +210,7 @@ unsigned long DynamicMMap::RawAllocate(unsigned long Size,unsigned long Aln) // Just in case error check if (Result + Size > WorkSpace) { - _error->Error("Dynamic MMap ran out of room"); + _error->Error(_("Dynamic MMap ran out of room")); return 0; } diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index 4fad0fd52..85cf4e119 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -531,7 +531,7 @@ bool pkgDPkgPM::OpenLog() struct tm *tmp = localtime(&t); strftime(outstr, sizeof(outstr), "%F %T", tmp); fprintf(term_out, "\nLog started: "); - fprintf(term_out, outstr); + fprintf(term_out, "%s", outstr); fprintf(term_out, "\n"); } return true; @@ -546,7 +546,7 @@ bool pkgDPkgPM::CloseLog() struct tm *tmp = localtime(&t); strftime(outstr, sizeof(outstr), "%F %T", tmp); fprintf(term_out, "Log ended: "); - fprintf(term_out, outstr); + fprintf(term_out, "%s", outstr); fprintf(term_out, "\n"); fclose(term_out); } diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index 859e64ea1..2411bfe89 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -269,7 +269,7 @@ bool pkgDepCache::writeStateFile(OpProgress *prog, bool InstalledOnly) ostr.str(string("")); ostr << "Package: " << pkg.Name() << "\nAuto-Installed: 1\n\n"; - fprintf(OutFile,ostr.str().c_str()); + fprintf(OutFile,"%s",ostr.str().c_str()); fprintf(OutFile,"\n"); } } diff --git a/apt-pkg/indexcopy.cc b/apt-pkg/indexcopy.cc index b30777d8d..9e5c03e0b 100644 --- a/apt-pkg/indexcopy.cc +++ b/apt-pkg/indexcopy.cc @@ -639,7 +639,7 @@ bool SigVerify::CopyAndVerify(string CDROM,string Name,vector &SigList, // Open the Release file and add it to the MetaIndex if(!MetaIndex->Load(*I+"Release")) { - _error->Error(MetaIndex->ErrorText.c_str()); + _error->Error("%s",MetaIndex->ErrorText.c_str()); return false; } diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc index f10ea48be..5513fcc90 100644 --- a/cmdline/apt-cache.cc +++ b/cmdline/apt-cache.cc @@ -1272,7 +1272,7 @@ bool DisplayRecord(pkgCache::VerIterator V) /*}}}*/ // Search - Perform a search /*{{{*/ // --------------------------------------------------------------------- -/* This searches the package names and pacakge descriptions for a pattern */ +/* This searches the package names and package descriptions for a pattern */ struct ExDescFile { pkgCache::DescFile *Df; diff --git a/debian/changelog b/debian/changelog index 5b5657731..0347e83ff 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,9 +7,12 @@ apt (0.7.17~exp2) experimental; urgency=low * apt-pkg/algorithm.cc: - Strip username and password from source URL in error message. (Closes: #425150) + + [ Michael Vogt ] + * fix various -Wall warnings - -- Eugene V. Lyubimkin Fri, 24 Oct 2008 23:45:17 +0300 + -- Michael Vogt Tue, 28 Oct 2008 18:06:38 +0100 apt (0.7.17~exp1) experimental; urgency=low diff --git a/methods/http.cc b/methods/http.cc index 26d435dea..b3c791fa0 100644 --- a/methods/http.cc +++ b/methods/http.cc @@ -941,7 +941,8 @@ int HttpMethod::DealWithHeaders(FetchResult &Res,ServerState *Srv) if (Srv->StartPos >= 0) { Res.ResumePoint = Srv->StartPos; - ftruncate(File->Fd(),Srv->StartPos); + if (ftruncate(File->Fd(),Srv->StartPos) < 0) + _error->Errno("ftruncate", _("Failed to truncate file")); } // Set the start point diff --git a/methods/https.cc b/methods/https.cc index e53ba1a11..98dfeefa1 100644 --- a/methods/https.cc +++ b/methods/https.cc @@ -249,7 +249,7 @@ bool HttpsMethod::Fetch(FetchItem *Itm) if(success != 0) { unlink(File->Name().c_str()); - _error->Error(curl_errorstr); + _error->Error("%s", curl_errorstr); Fail(); return true; } diff --git a/po/apt-all.pot b/po/apt-all.pot index 922b9af1e..19e57536a 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: 2008-10-28 16:44+0100\n" +"POT-Creation-Date: 2008-10-28 18:12+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -1663,7 +1663,7 @@ msgstr "" msgid "Unable to accept connection" msgstr "" -#: methods/ftp.cc:864 methods/http.cc:959 methods/rsh.cc:303 +#: methods/ftp.cc:864 methods/http.cc:960 methods/rsh.cc:303 msgid "Problem hashing file" msgstr "" @@ -1855,15 +1855,19 @@ msgstr "" msgid "Error reading from server" msgstr "" -#: methods/http.cc:1104 +#: methods/http.cc:945 apt-pkg/contrib/mmap.cc:196 +msgid "Failed to truncate file" +msgstr "" + +#: methods/http.cc:1105 msgid "Bad header data" msgstr "" -#: methods/http.cc:1121 methods/http.cc:1176 +#: methods/http.cc:1122 methods/http.cc:1177 msgid "Connection failed" msgstr "" -#: methods/http.cc:1228 +#: methods/http.cc:1229 msgid "Internal error" msgstr "" @@ -1876,6 +1880,10 @@ msgstr "" msgid "Couldn't make mmap of %lu bytes" msgstr "" +#: apt-pkg/contrib/mmap.cc:213 +msgid "Dynamic MMap ran out of room" +msgstr "" + #: apt-pkg/contrib/strutl.cc:1014 #, c-format msgid "Selection %s not found" @@ -1992,12 +2000,13 @@ msgstr "" msgid "Unable to stat the mount point %s" msgstr "" -#: apt-pkg/contrib/cdromutl.cc:146 apt-pkg/acquire.cc:424 apt-pkg/clean.cc:40 +#: 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 #, c-format msgid "Unable to change to %s" msgstr "" -#: apt-pkg/contrib/cdromutl.cc:187 +#: apt-pkg/contrib/cdromutl.cc:188 msgid "Failed to stat the cdrom" msgstr "" @@ -2274,12 +2283,12 @@ msgstr "" #. only show the ETA if it makes sense #. two days -#: apt-pkg/acquire.cc:827 +#: apt-pkg/acquire.cc:828 #, c-format msgid "Retrieving file %li of %li (%s remaining)" msgstr "" -#: apt-pkg/acquire.cc:829 +#: apt-pkg/acquire.cc:830 #, c-format msgid "Retrieving file %li of %li" msgstr "" -- cgit v1.2.3-70-g09d2 From 6e7f872dfdf7de0108b07e3c8f1ccda57734e6f8 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 12 Nov 2008 16:24:26 +0100 Subject: fix SIGHUP handling (closes: #463030) --- apt-pkg/deb/dpkgpm.cc | 5 +++++ debian/changelog | 3 +++ 2 files changed, 8 insertions(+) (limited to 'apt-pkg/deb') diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index 85cf4e119..5359f81ef 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -773,6 +773,9 @@ bool pkgDPkgPM::Go(int OutStatusFd) sighandler_t old_SIGQUIT = signal(SIGQUIT,SIG_IGN); sighandler_t old_SIGINT = signal(SIGINT,SIG_IGN); + // ignore SIGHUP as well (debian #463030) + sighandler_t old_SIGHUP = signal(SIGHUP,SIG_IGN); + struct termios tt; struct termios tt_out; struct winsize win; @@ -881,6 +884,7 @@ bool pkgDPkgPM::Go(int OutStatusFd) // Restore sig int/quit signal(SIGQUIT,old_SIGQUIT); signal(SIGINT,old_SIGINT); + signal(SIGINT,old_SIGHUP); return _error->Errno("waitpid","Couldn't wait for subprocess"); } @@ -920,6 +924,7 @@ bool pkgDPkgPM::Go(int OutStatusFd) // Restore sig int/quit signal(SIGQUIT,old_SIGQUIT); signal(SIGINT,old_SIGINT); + signal(SIGINT,old_SIGHUP); if(master >= 0) { diff --git a/debian/changelog b/debian/changelog index e7309d577..27f78e958 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,6 +13,9 @@ apt (0.7.19) unstable; urgency=low is a request to install only one package and it is not installable. (Closes: #419521) + [ Michael Vogt ] + - fix SIGHUP handling (closes: #463030) + -- Eugene V. Lyubimkin Sat, 08 Nov 2008 12:40:19 +0200 apt (0.7.18) unstable; urgency=low -- cgit v1.2.3-70-g09d2 From 4e648e0bc72d2513965dc17ee7980754036305bb Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 12 Nov 2008 20:36:41 +0100 Subject: apt-pkg/deb/dpkgpm.cc: fix typo (thanks to jackyf) --- apt-pkg/deb/dpkgpm.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apt-pkg/deb') diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index 5359f81ef..9ad367e67 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -924,7 +924,7 @@ bool pkgDPkgPM::Go(int OutStatusFd) // Restore sig int/quit signal(SIGQUIT,old_SIGQUIT); signal(SIGINT,old_SIGINT); - signal(SIGINT,old_SIGHUP); + signal(SIGHUP,old_SIGHUP); if(master >= 0) { -- cgit v1.2.3-70-g09d2 From 1a853738a54dbab6e82a23a8cc6c6d6f3aeeae12 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 12 Nov 2008 21:18:34 +0100 Subject: merge from the mvo branch --- apt-pkg/deb/dpkgpm.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apt-pkg/deb') diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index 9ad367e67..40aafafa4 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -884,7 +884,7 @@ bool pkgDPkgPM::Go(int OutStatusFd) // Restore sig int/quit signal(SIGQUIT,old_SIGQUIT); signal(SIGINT,old_SIGINT); - signal(SIGINT,old_SIGHUP); + signal(SIGHUP,old_SIGHUP); return _error->Errno("waitpid","Couldn't wait for subprocess"); } -- cgit v1.2.3-70-g09d2