]>
git.saurik.com Git - apt.git/blob - test/interactive-helper/testdeb.cc
d28f20114fa1516170a352218ca2c74e31ddbe96
1 #include <apt-pkg/dirstream.h>
2 #include <apt-pkg/debfile.h>
3 #include <apt-pkg/error.h>
4 #include <apt-pkg/extracttar.h>
6 class NullStream
: public pkgDirStream
9 virtual bool DoItem(Item
&Itm
,int &Fd
) {return true;};
12 bool Test(const char *File
)
14 FileFd
Fd(File
,FileFd::ReadOnly
);
17 if (_error
->PendingError() == true)
20 // Get the archive member and positition the file
21 const ARArchive::Member
*Member
= Deb
.GotoMember("data.tar.gz");
26 ExtractTar
Tar(Deb
.GetFile(),Member
->Size
, "gzip");
28 if (Tar
.Go(Dir
) == false)
34 int main(int argc
, const char *argv
[])