summaryrefslogtreecommitdiff
path: root/apt-pkg/deb
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:54:12 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:54:12 +0000
commitfc4b5c9f963c8292d0908a9dd30e47bbb00a6396 (patch)
tree49b04091a33eedadf19e64e10aacd78c9787b365 /apt-pkg/deb
parent2fd65468b3cb25c725a709f9b470ced0ab4823a6 (diff)
g++- works
Author: jgg Date: 1999-07-09 04:11:33 GMT g++- works
Diffstat (limited to 'apt-pkg/deb')
-rw-r--r--apt-pkg/deb/dpkgpm.cc18
-rw-r--r--apt-pkg/deb/dpkgpm.h6
2 files changed, 18 insertions, 6 deletions
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc
index 998750b3b..4e108c419 100644
--- a/apt-pkg/deb/dpkgpm.cc
+++ b/apt-pkg/deb/dpkgpm.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: dpkgpm.cc,v 1.10 1999/07/03 03:10:35 jgg Exp $
+// $Id: dpkgpm.cc,v 1.11 1999/07/09 04:11:34 jgg Exp $
/* ######################################################################
DPKG Package Manager - Provide an interface to dpkg
@@ -65,12 +65,15 @@ bool pkgDPkgPM::Configure(PkgIterator Pkg)
// DPkgPM::Remove - Remove a package /*{{{*/
// ---------------------------------------------------------------------
/* Add a remove operation to the sequence list */
-bool pkgDPkgPM::Remove(PkgIterator Pkg)
+bool pkgDPkgPM::Remove(PkgIterator Pkg,bool Purge)
{
if (Pkg.end() == true)
return false;
- List.push_back(Item(Item::Remove,Pkg));
+ if (Purge == true)
+ List.push_back(Item(Item::Purge,Pkg));
+ else
+ List.push_back(Item(Item::Remove,Pkg));
return true;
}
/*}}}*/
@@ -184,6 +187,15 @@ bool pkgDPkgPM::Go()
Size += strlen(Args[n-1]);
break;
+ case Item::Purge:
+ Args[n++] = "--force-depends";
+ Size += strlen(Args[n-1]);
+ Args[n++] = "--force-remove-essential";
+ Size += strlen(Args[n-1]);
+ Args[n++] = "--purge";
+ Size += strlen(Args[n-1]);
+ break;
+
case Item::Configure:
Args[n++] = "--configure";
Size += strlen(Args[n-1]);
diff --git a/apt-pkg/deb/dpkgpm.h b/apt-pkg/deb/dpkgpm.h
index d7898daf1..e8ffe7bb4 100644
--- a/apt-pkg/deb/dpkgpm.h
+++ b/apt-pkg/deb/dpkgpm.h
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: dpkgpm.h,v 1.4 1999/07/03 03:10:35 jgg Exp $
+// $Id: dpkgpm.h,v 1.5 1999/07/09 04:11:34 jgg Exp $
/* ######################################################################
DPKG Package Manager - Provide an interface to dpkg
@@ -23,7 +23,7 @@ class pkgDPkgPM : public pkgPackageManager
struct Item
{
- enum Ops {Install, Configure, Remove} Op;
+ enum Ops {Install, Configure, Remove, Purge} Op;
string File;
PkgIterator Pkg;
Item(Ops Op,PkgIterator Pkg,string File = "") : Op(Op),
@@ -39,7 +39,7 @@ class pkgDPkgPM : public pkgPackageManager
// The Actuall installation implementation
virtual bool Install(PkgIterator Pkg,string File);
virtual bool Configure(PkgIterator Pkg);
- virtual bool Remove(PkgIterator Pkg);
+ virtual bool Remove(PkgIterator Pkg,bool Purge = false);
virtual bool Go();
virtual void Reset();