summaryrefslogtreecommitdiff
path: root/apt-inst/deb
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2011-11-10 16:32:52 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2011-11-10 16:32:52 +0100
commit71ecaad29d8066a494f516efc5efd80860653fe2 (patch)
treeb0769df88e2b6496f23e3d899aeb1c240a3488d9 /apt-inst/deb
parenta865ed25fa54514224cf4d6f83dd9cf48b7ed02b (diff)
parent37adedc9d0b66eeae7efb88aebd08dfbc6e06f77 (diff)
merged from http://bzr.debian.org/bzr/apt/apt/debian-experimental2
Diffstat (limited to 'apt-inst/deb')
-rw-r--r--apt-inst/deb/debfile.cc9
-rw-r--r--apt-inst/deb/debfile.h9
-rw-r--r--apt-inst/deb/dpkgdb.cc4
-rw-r--r--apt-inst/deb/dpkgdb.h13
4 files changed, 25 insertions, 10 deletions
diff --git a/apt-inst/deb/debfile.cc b/apt-inst/deb/debfile.cc
index a40cd1ae8..4bd065cf8 100644
--- a/apt-inst/deb/debfile.cc
+++ b/apt-inst/deb/debfile.cc
@@ -16,6 +16,9 @@
##################################################################### */
/*}}}*/
// Include Files /*{{{*/
+#include<config.h>
+
+#include <apt-pkg/database.h>
#include <apt-pkg/debfile.h>
#include <apt-pkg/extracttar.h>
#include <apt-pkg/error.h>
@@ -105,8 +108,8 @@ bool debDebFile::ExtractControl(pkgDataBase &DB)
return false;
// Get into the temporary directory
- string Cwd = SafeGetCWD();
- string Tmp;
+ std::string Cwd = SafeGetCWD();
+ std::string Tmp;
if (DB.GetMetaTmp(Tmp) == false)
return false;
if (chdir(Tmp.c_str()) != 0)
@@ -172,7 +175,7 @@ bool debDebFile::ExtractArchive(pkgDirStream &Stream)
pkgCache::VerIterator debDebFile::MergeControl(pkgDataBase &DB)
{
// Open the control file
- string Tmp;
+ std::string Tmp;
if (DB.GetMetaTmp(Tmp) == false)
return pkgCache::VerIterator(DB.GetCache());
FileFd Fd(Tmp + "control",FileFd::ReadOnly);
diff --git a/apt-inst/deb/debfile.h b/apt-inst/deb/debfile.h
index 6b9f8ffc8..2c4734f9e 100644
--- a/apt-inst/deb/debfile.h
+++ b/apt-inst/deb/debfile.h
@@ -25,9 +25,12 @@
#include <apt-pkg/arfile.h>
-#include <apt-pkg/database.h>
#include <apt-pkg/dirstream.h>
#include <apt-pkg/tagfile.h>
+#include <apt-pkg/pkgcache.h>
+
+class FileFd;
+class pkgDataBase;
class debDebFile
{
@@ -68,7 +71,7 @@ class debDebFile::MemControlExtract : public pkgDirStream
char *Control;
pkgTagSection Section;
unsigned long Length;
- string Member;
+ std::string Member;
// Members from DirStream
virtual bool DoItem(Item &Itm,int &Fd);
@@ -81,7 +84,7 @@ class debDebFile::MemControlExtract : public pkgDirStream
bool TakeControl(const void *Data,unsigned long Size);
MemControlExtract() : IsControl(false), Control(0), Length(0), Member("control") {};
- MemControlExtract(string Member) : IsControl(false), Control(0), Length(0), Member(Member) {};
+ MemControlExtract(std::string Member) : IsControl(false), Control(0), Length(0), Member(Member) {};
~MemControlExtract() {delete [] Control;};
};
/*}}}*/
diff --git a/apt-inst/deb/dpkgdb.cc b/apt-inst/deb/dpkgdb.cc
index a75cf59ca..819c123f6 100644
--- a/apt-inst/deb/dpkgdb.cc
+++ b/apt-inst/deb/dpkgdb.cc
@@ -13,12 +13,16 @@
##################################################################### */
/*}}}*/
// Include Files /*{{{*/
+#include<config.h>
+
#include <apt-pkg/dpkgdb.h>
#include <apt-pkg/configuration.h>
#include <apt-pkg/error.h>
#include <apt-pkg/progress.h>
#include <apt-pkg/tagfile.h>
#include <apt-pkg/strutl.h>
+#include <apt-pkg/fileutl.h>
+#include <apt-pkg/filelist.h>
#include <stdio.h>
#include <errno.h>
diff --git a/apt-inst/deb/dpkgdb.h b/apt-inst/deb/dpkgdb.h
index 125845f96..f28563a93 100644
--- a/apt-inst/deb/dpkgdb.h
+++ b/apt-inst/deb/dpkgdb.h
@@ -22,17 +22,22 @@
#include <apt-pkg/database.h>
+#include <string>
+
+class DynamicMMap;
+class OpProgress;
+
class debDpkgDB : public pkgDataBase
{
protected:
-
- string AdminDir;
+
+ std::string AdminDir;
DynamicMMap *CacheMap;
DynamicMMap *FileMap;
unsigned long DiverInode;
signed long DiverTime;
-
- virtual bool InitMetaTmp(string &Dir);
+
+ virtual bool InitMetaTmp(std::string &Dir);
bool ReadFList(OpProgress &Progress);
bool ReadDiversions();
bool ReadConfFiles();