From bb8cbb9a85441f4c303456adedf6b72dbb67b617 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 27 Aug 2007 14:28:27 +0200 Subject: * apt-pkg/deb/dpkgpm.cc: - on error in select() continue --- apt-pkg/deb/dpkgpm.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'apt-pkg') diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index 68f0a339f..343e3d82f 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -813,9 +813,10 @@ bool pkgDPkgPM::Go(int OutStatusFd) tv.tv_sec = 1; tv.tv_usec = 0; select_ret = select(max(master, _dpkgin)+1, &rfds, NULL, NULL, &tv); - if (select_ret < 0) + if (select_ret < 0) { std::cerr << "Error in select()" << std::endl; - else if (select_ret == 0) + continue; + } else if (select_ret == 0) continue; if(master >= 0 && FD_ISSET(master, &rfds)) -- cgit v1.2.3-70-g09d2 From 7a59dff6570e7fa4681470a5d4c7ec93fc26a45f Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 28 Aug 2007 10:17:07 +0200 Subject: * apt-pkg/acquire.cc: - increase MaxPipeDepth for the internal worker<->method communication to 1000 for the debtorrent backend --- apt-pkg/acquire.cc | 2 +- debian/changelog | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'apt-pkg') diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc index cbd67055d..6840ae120 100644 --- a/apt-pkg/acquire.cc +++ b/apt-pkg/acquire.cc @@ -619,7 +619,7 @@ bool pkgAcquire::Queue::Startup() added other source retry to have cycle maintain a pipeline depth on its own. */ if (Cnf->Pipeline == true) - MaxPipeDepth = 10; + MaxPipeDepth = 1000; else MaxPipeDepth = 1; } diff --git a/debian/changelog b/debian/changelog index 24663ffa9..e1d9a2477 100644 --- a/debian/changelog +++ b/debian/changelog @@ -20,6 +20,9 @@ apt (0.7.7) UNRELEASED; urgency=low - increase default mmap size * tests/local-repo: - added local repository testcase + * apt-pkg/acquire.cc: + - increase MaxPipeDepth for the internal worker<->method + communication to 1000 for the debtorrent backend -- Michael Vogt Thu, 02 Aug 2007 11:55:54 +0200 -- cgit v1.2.3-70-g09d2 From 9d06bc808c5ad28087821c3ecf725304adc81950 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 6 Sep 2007 15:38:32 +0200 Subject: * dpkg-triggers: Deal properly with new package states. --- apt-pkg/algorithms.cc | 2 ++ apt-pkg/deb/deblistparser.cc | 2 ++ apt-pkg/deb/dpkgpm.cc | 7 ++++++- apt-pkg/pkgcache.cc | 6 ++++-- apt-pkg/pkgcache.h | 3 ++- debian/changelog | 4 ++++ doc/cache.sgml | 2 ++ 7 files changed, 22 insertions(+), 4 deletions(-) (limited to 'apt-pkg') diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc index b21fcbb2f..62727a852 100644 --- a/apt-pkg/algorithms.cc +++ b/apt-pkg/algorithms.cc @@ -257,6 +257,8 @@ bool pkgApplyStatus(pkgDepCache &Cache) re-unpacked (probably) */ case pkgCache::State::UnPacked: case pkgCache::State::HalfConfigured: + case pkgCache::State::TriggersAwaited: + case pkgCache::State::TriggersPending: if ((I->CurrentVer != 0 && I.CurrentVer().Downloadable() == true) || I.State() != pkgCache::PkgIterator::NeedsUnpack) Cache.MarkKeep(I, false, false); diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc index 074abea6d..896d4d6d8 100644 --- a/apt-pkg/deb/deblistparser.cc +++ b/apt-pkg/deb/deblistparser.cc @@ -293,6 +293,8 @@ bool debListParser::ParseStatus(pkgCache::PkgIterator Pkg, {"installed",pkgCache::State::Installed}, {"half-installed",pkgCache::State::HalfInstalled}, {"config-files",pkgCache::State::ConfigFiles}, + {"triggers-awaited",pkgCache::State::TriggersAwaited}, + {"triggers-pending",pkgCache::State::TriggersPending}, {"post-inst-failed",pkgCache::State::HalfConfigured}, {"removal-failed",pkgCache::State::HalfInstalled}, {}}; diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index bb7e4b40a..c62fb62d9 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -518,7 +518,7 @@ bool pkgDPkgPM::Go(int OutStatusFd) // 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[][5] = { + static const struct DpkgState DpkgStatesOpMap[][7] = { // Install operation { {"half-installed", N_("Preparing %s")}, @@ -529,12 +529,17 @@ bool pkgDPkgPM::Go(int OutStatusFd) { {"unpacked",N_("Preparing to configure %s") }, {"half-configured", N_("Configuring %s") }, + {"triggers-awaited", N_("Processing triggers for %s") }, + {"triggers-pending", N_("Processing triggers for %s") }, + {"half-configured", N_("Configuring %s") }, { "installed", N_("Installed %s")}, {NULL, NULL} }, // Remove operation { {"half-configured", N_("Preparing for removal of %s")}, + {"triggers-awaited", N_("Preparing for removal of %s")}, + {"triggers-pending", N_("Preparing for removal of %s")}, {"half-installed", N_("Removing %s")}, {"config-files", N_("Removed %s")}, {NULL, NULL} diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc index 7e3b9d78c..133899a27 100644 --- a/apt-pkg/pkgcache.cc +++ b/apt-pkg/pkgcache.cc @@ -49,7 +49,7 @@ pkgCache::Header::Header() /* Whenever the structures change the major version should be bumped, whenever the generator changes the minor version should be bumped. */ - MajorVersion = 6; + MajorVersion = 7; MinorVersion = 0; Dirty = false; @@ -274,7 +274,9 @@ pkgCache::PkgIterator::OkState pkgCache::PkgIterator::State() const return NeedsUnpack; if (Pkg->CurrentState == pkgCache::State::UnPacked || - Pkg->CurrentState == pkgCache::State::HalfConfigured) + Pkg->CurrentState == pkgCache::State::HalfConfigured || + Pkg->CurrentState == pkgCache::State::TriggersPending || + Pkg->CurrentState == pkgCache::State::TriggersAwaited) return NeedsConfigure; if (Pkg->CurrentState == pkgCache::State::HalfInstalled || diff --git a/apt-pkg/pkgcache.h b/apt-pkg/pkgcache.h index 83b7548a3..59d5003bb 100644 --- a/apt-pkg/pkgcache.h +++ b/apt-pkg/pkgcache.h @@ -81,7 +81,8 @@ class pkgCache enum PkgSelectedState {Unknown=0,Install=1,Hold=2,DeInstall=3,Purge=4}; enum PkgInstState {Ok=0,ReInstReq=1,HoldInst=2,HoldReInstReq=3}; enum PkgCurrentState {NotInstalled=0,UnPacked=1,HalfConfigured=2, - HalfInstalled=4,ConfigFiles=5,Installed=6}; + HalfInstalled=4,ConfigFiles=5,Installed=6, + TriggersAwaited=7,TriggersPending=8}; }; struct Flag diff --git a/debian/changelog b/debian/changelog index e1d9a2477..e2c0e5303 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,6 @@ apt (0.7.7) UNRELEASED; urgency=low + [ Michael Vogt ] * apt-inst/contrib/extracttar.cc: - fix fd leak for zero size files (thanks to Bill Broadley for reporting this bug) @@ -24,6 +25,9 @@ apt (0.7.7) UNRELEASED; urgency=low - increase MaxPipeDepth for the internal worker<->method communication to 1000 for the debtorrent backend + [ Ian Jackson ] + * dpkg-triggers: Deal properly with new package states. + -- Michael Vogt Thu, 02 Aug 2007 11:55:54 +0200 apt (0.7.6) unstable; urgency=low diff --git a/doc/cache.sgml b/doc/cache.sgml index e257dcd81..aea5a45c3 100644 --- a/doc/cache.sgml +++ b/doc/cache.sgml @@ -721,6 +721,8 @@ or'd with the current package. #define pkgSTATE_HalfInstalled 4 #define pkgSTATE_ConfigFiles 5 #define pkgSTATE_Installed 6 +#define pkgSTATE_TriggersAwaited 7 +#define pkgSTATE_TriggersPending 8 -- cgit v1.2.3-70-g09d2 From 646501c8fd4c747b8162b87ecaa8406b1509be84 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 10 Sep 2007 14:56:53 +0200 Subject: apt-pkg/deb/dpkgpm.cc: - comment out dpkg trigger messages, those seem to be not generated by dpkg over the status fd --- apt-pkg/deb/dpkgpm.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'apt-pkg') diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index c62fb62d9..36086d72e 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -529,17 +529,20 @@ 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") }, - {"half-configured", N_("Configuring %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} -- cgit v1.2.3-70-g09d2 From 4f333a8bea2c8431df2ec92001981355623818e8 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 10 Sep 2007 16:03:07 +0200 Subject: * make apt build with g++ 4.3 --- apt-inst/filelist.h | 2 +- apt-pkg/contrib/error.cc | 4 +++- apt-pkg/contrib/fileutl.cc | 2 ++ apt-pkg/contrib/md5.cc | 1 + apt-pkg/contrib/md5.h | 1 + apt-pkg/contrib/mmap.cc | 2 ++ apt-pkg/contrib/progress.cc | 1 + apt-pkg/contrib/sha1.h | 1 + apt-pkg/contrib/sha256.h | 1 + apt-pkg/indexfile.cc | 1 + apt-pkg/pkgsystem.cc | 1 + debian/changelog | 1 + ftparchive/writer.cc | 1 + 13 files changed, 17 insertions(+), 2 deletions(-) (limited to 'apt-pkg') diff --git a/apt-inst/filelist.h b/apt-inst/filelist.h index 86766254f..c74a310e4 100644 --- a/apt-inst/filelist.h +++ b/apt-inst/filelist.h @@ -29,7 +29,7 @@ #define PKGLIB_FILELIST_H - +#include #include class pkgFLCache diff --git a/apt-pkg/contrib/error.cc b/apt-pkg/contrib/error.cc index 8c2d6cb19..db8c53c36 100644 --- a/apt-pkg/contrib/error.cc +++ b/apt-pkg/contrib/error.cc @@ -19,10 +19,12 @@ #include #include #include -#include #include #include +#include +#include + #include "config.h" /*}}}*/ diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc index d19a92e62..9e13b4f60 100644 --- a/apt-pkg/contrib/fileutl.cc +++ b/apt-pkg/contrib/fileutl.cc @@ -22,6 +22,8 @@ #include #include +#include + #include #include #include diff --git a/apt-pkg/contrib/md5.cc b/apt-pkg/contrib/md5.cc index 44242371a..a095f8f0f 100644 --- a/apt-pkg/contrib/md5.cc +++ b/apt-pkg/contrib/md5.cc @@ -44,6 +44,7 @@ #include #include #include + /*}}}*/ // byteSwap - Swap bytes in a buffer /*{{{*/ diff --git a/apt-pkg/contrib/md5.h b/apt-pkg/contrib/md5.h index 247b3fab9..96c8975b4 100644 --- a/apt-pkg/contrib/md5.h +++ b/apt-pkg/contrib/md5.h @@ -25,6 +25,7 @@ #include +#include #include #include diff --git a/apt-pkg/contrib/mmap.cc b/apt-pkg/contrib/mmap.cc index 88e71e8e3..7f814c2d2 100644 --- a/apt-pkg/contrib/mmap.cc +++ b/apt-pkg/contrib/mmap.cc @@ -31,6 +31,8 @@ #include #include #include + +#include /*}}}*/ // MMap::MMap - Constructor /*{{{*/ diff --git a/apt-pkg/contrib/progress.cc b/apt-pkg/contrib/progress.cc index 6ce6e950a..cffdddc4f 100644 --- a/apt-pkg/contrib/progress.cc +++ b/apt-pkg/contrib/progress.cc @@ -16,6 +16,7 @@ #include #include +#include /*}}}*/ using namespace std; diff --git a/apt-pkg/contrib/sha1.h b/apt-pkg/contrib/sha1.h index 010ef802e..8ddd889f1 100644 --- a/apt-pkg/contrib/sha1.h +++ b/apt-pkg/contrib/sha1.h @@ -15,6 +15,7 @@ #define APTPKG_SHA1_H #include +#include #include using std::string; diff --git a/apt-pkg/contrib/sha256.h b/apt-pkg/contrib/sha256.h index c490bfa4d..1951f053b 100644 --- a/apt-pkg/contrib/sha256.h +++ b/apt-pkg/contrib/sha256.h @@ -15,6 +15,7 @@ #define APTPKG_SHA256_H #include +#include #include using std::string; diff --git a/apt-pkg/indexfile.cc b/apt-pkg/indexfile.cc index ca11fc111..cf238eb4a 100644 --- a/apt-pkg/indexfile.cc +++ b/apt-pkg/indexfile.cc @@ -13,6 +13,7 @@ #include #include +#include /*}}}*/ // Global list of Item supported diff --git a/apt-pkg/pkgsystem.cc b/apt-pkg/pkgsystem.cc index eee19e35c..6dd2d3ee4 100644 --- a/apt-pkg/pkgsystem.cc +++ b/apt-pkg/pkgsystem.cc @@ -13,6 +13,7 @@ #include #include #include +#include /*}}}*/ pkgSystem *_system = 0; diff --git a/debian/changelog b/debian/changelog index e2c0e5303..bf5afb3b9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -24,6 +24,7 @@ apt (0.7.7) UNRELEASED; urgency=low * apt-pkg/acquire.cc: - increase MaxPipeDepth for the internal worker<->method communication to 1000 for the debtorrent backend + * make apt build with g++ 4.3 [ Ian Jackson ] * dpkg-triggers: Deal properly with new package states. diff --git a/ftparchive/writer.cc b/ftparchive/writer.cc index 59107e02b..9d248ab86 100644 --- a/ftparchive/writer.cc +++ b/ftparchive/writer.cc @@ -28,6 +28,7 @@ #include #include #include +#include #include "cachedb.h" #include "apt-ftparchive.h" -- cgit v1.2.3-70-g09d2 From da50ba30b371f21f264c040ca9f2161771d55233 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 10 Sep 2007 16:28:04 +0200 Subject: apt-pkg/deb/dpkgpm.cc: - ignore EINTR on select() --- apt-pkg/deb/dpkgpm.cc | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'apt-pkg') diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index 36086d72e..ac63ccfdf 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -818,12 +818,16 @@ bool pkgDPkgPM::Go(int OutStatusFd) tv.tv_sec = 1; tv.tv_usec = 0; select_ret = select(max(master, _dpkgin)+1, &rfds, NULL, NULL, &tv); - if (select_ret < 0) { - std::cerr << "Error in select()" << std::endl; - continue; - } else if (select_ret == 0) - continue; - + if (select_ret == 0) + continue; + else if (select_ret < 0 && errno == EINTR) + continue; + else if (select_ret < 0) + { + perror("select() returned error"); + continue; + } + if(master >= 0 && FD_ISSET(master, &rfds)) DoTerminalPty(master); if(master >= 0 && FD_ISSET(0, &rfds)) -- cgit v1.2.3-70-g09d2