summaryrefslogtreecommitdiff
path: root/apt-inst/deb/debfile.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2012-05-22 16:07:49 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2012-05-22 16:07:49 +0200
commit800694cbf33e206935dc9e6e8fa6e9a036b8efad (patch)
tree1557d96ee0f463a020b11604146be66fb9809a31 /apt-inst/deb/debfile.cc
parent6c0c0387e616f8d04f00916fbd1fe899acd265cd (diff)
parent1351329e376a8dbe7780693693d0f3db0ec749fa (diff)
merged (and resolved a bunch of conflicts) of the debian-sid branch
Diffstat (limited to 'apt-inst/deb/debfile.cc')
-rw-r--r--apt-inst/deb/debfile.cc63
1 files changed, 0 insertions, 63 deletions
diff --git a/apt-inst/deb/debfile.cc b/apt-inst/deb/debfile.cc
index 4bd065cf8..ab4037915 100644
--- a/apt-inst/deb/debfile.cc
+++ b/apt-inst/deb/debfile.cc
@@ -18,7 +18,6 @@
// 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>
@@ -90,42 +89,6 @@ const ARArchive::Member *debDebFile::GotoMember(const char *Name)
return Member;
}
/*}}}*/
-// DebFile::ExtractControl - Extract Control information /*{{{*/
-// ---------------------------------------------------------------------
-/* Extract the control information into the Database's temporary
- directory. */
-bool debDebFile::ExtractControl(pkgDataBase &DB)
-{
- // Get the archive member and positition the file
- const ARArchive::Member *Member = GotoMember("control.tar.gz");
- if (Member == 0)
- return false;
-
- // Prepare Tar
- ControlExtract Extract;
- ExtractTar Tar(File,Member->Size,"gzip");
- if (_error->PendingError() == true)
- return false;
-
- // Get into the temporary directory
- std::string Cwd = SafeGetCWD();
- std::string Tmp;
- if (DB.GetMetaTmp(Tmp) == false)
- return false;
- if (chdir(Tmp.c_str()) != 0)
- return _error->Errno("chdir",_("Couldn't change to %s"),Tmp.c_str());
-
- // Do extraction
- if (Tar.Go(Extract) == false)
- return false;
-
- // Switch out of the tmp directory.
- if (chdir(Cwd.c_str()) != 0)
- chdir("/");
-
- return true;
-}
- /*}}}*/
// DebFile::ExtractArchive - Extract the archive data itself /*{{{*/
// ---------------------------------------------------------------------
/* Simple wrapper around tar.. */
@@ -167,32 +130,6 @@ bool debDebFile::ExtractArchive(pkgDirStream &Stream)
return Tar.Go(Stream);
}
/*}}}*/
-// DebFile::MergeControl - Merge the control information /*{{{*/
-// ---------------------------------------------------------------------
-/* This reads the extracted control file into the cache and returns the
- version that was parsed. All this really does is select the correct
- parser and correct file to parse. */
-pkgCache::VerIterator debDebFile::MergeControl(pkgDataBase &DB)
-{
- // Open the control file
- std::string Tmp;
- if (DB.GetMetaTmp(Tmp) == false)
- return pkgCache::VerIterator(DB.GetCache());
- FileFd Fd(Tmp + "control",FileFd::ReadOnly);
- if (_error->PendingError() == true)
- return pkgCache::VerIterator(DB.GetCache());
-
- // Parse it
- debListParser Parse(&Fd);
- pkgCache::VerIterator Ver(DB.GetCache());
- if (DB.GetGenerator().MergeList(Parse,&Ver) == false)
- return pkgCache::VerIterator(DB.GetCache());
-
- if (Ver.end() == true)
- _error->Error(_("Failed to locate a valid control file"));
- return Ver;
-}
- /*}}}*/
// DebFile::ControlExtract::DoItem - Control Tar Extraction /*{{{*/
// ---------------------------------------------------------------------