X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/09fa2df2f4717ac956210d43e3f3465d6ef5b82b..319810767180e5c57c296b06c93e3ebec9f36a8e:/apt-pkg/deb/dpkgpm.h diff --git a/apt-pkg/deb/dpkgpm.h b/apt-pkg/deb/dpkgpm.h index c7792aba4..43e5c7d45 100644 --- a/apt-pkg/deb/dpkgpm.h +++ b/apt-pkg/deb/dpkgpm.h @@ -23,9 +23,14 @@ class pkgDPkgPM : public pkgPackageManager { private: + bool stdin_is_dev_null; + // the buffer we use for the dpkg status-fd reading char dpkgbuf[1024]; int dpkgbuf_pos; + FILE *term_out; + + protected: // progress reporting struct DpkgState @@ -41,16 +46,14 @@ class pkgDPkgPM : public pkgPackageManager // the dpkg states that are already done; the string is the package // 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 PackageOpsDone; // progress reporting - int Done; - int Total; - - protected: + unsigned int PackagesDone; + unsigned int PackagesTotal; struct Item { - enum Ops {Install, Configure, Remove, Purge} Op; + enum Ops {Install, Configure, Remove, Purge, ConfigurePending, TriggersPending} Op; string File; PkgIterator Pkg; Item(Ops Op,PkgIterator Pkg,string File = "") : Op(Op), @@ -61,17 +64,19 @@ class pkgDPkgPM : public pkgPackageManager vector List; // Helpers - bool RunScripts(const char *Cnf); bool RunScriptsWithPkgs(const char *Cnf); bool SendV2Pkgs(FILE *F); + // dpkg log + bool OpenLog(); + bool CloseLog(); + // input processing void DoStdin(int master); - void DoTerminalPty(int master, FILE *out); + void DoTerminalPty(int master); void DoDpkgStatusFd(int statusfd, int OutStatusFd); void ProcessDpkgStatusLine(int OutStatusFd, char *line); - // The Actuall installation implementation virtual bool Install(PkgIterator Pkg,string File); virtual bool Configure(PkgIterator Pkg);