// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: debfile.cc,v 1.2 2001/02/20 07:03:17 jgg Exp $
+// $Id: debfile.cc,v 1.4 2004/01/07 20:39:37 mdz Exp $
/* ######################################################################
Debian Archive File (.deb)
#include <sys/stat.h>
#include <unistd.h>
+#include <apti18n.h>
/*}}}*/
// DebFile::debDebFile - Constructor /*{{{*/
bool debDebFile::CheckMember(const char *Name)
{
if (AR.FindMember(Name) == 0)
- return _error->Error("This is not a valid DEB archive, missing '%s' member",Name);
+ return _error->Error(_("This is not a valid DEB archive, missing '%s' member"),Name);
return true;
}
/*}}}*/
const ARArchive::Member *Member = AR.FindMember(Name);
if (Member == 0)
{
- _error->Error("Internal Error, could not locate member %s",Name);
+ _error->Error(_("Internal Error, could not locate member %s"),Name);
return 0;
}
if (File.Seek(Member->Start) == false)
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());
+ return _error->Errno("chdir",_("Couldn't change to %s"),Tmp.c_str());
// Do extraction
if (Tar.Go(Extract) == false)
// Get the archive member and positition the file
const ARArchive::Member *Member = AR.FindMember("data.tar.gz");
if (Member == 0)
- return _error->Error("Internal Error, could not locate member");
+ return _error->Error(_("Internal Error, could not locate member"));
if (File.Seek(Member->Start) == false)
return false;
return pkgCache::VerIterator(DB.GetCache());
if (Ver.end() == true)
- _error->Error("Failed to locate a valid control file");
+ _error->Error(_("Failed to locate a valid control file"));
return Ver;
}
/*}}}*/
Control[Length] = '\n';
Control[Length+1] = '\n';
if (Section.Scan(Control,Length+2) == false)
- return _error->Error("Unparsible control file");
+ return _error->Error(_("Unparsible control file"));
return true;
}
/*}}}*/