pkgSourceList *List = Cache.GetSourceList();
// Create the text record parsers
-#if APT_PKG_ABI < 413
- pkgRecords Recs(Cache);
-#endif
pkgSrcRecords SrcRecs(*List);
if (_error->PendingError() == true)
return false;
{
string Src;
pkgSrcRecords::Parser *Last = 0;
+ SPtr<pkgSrcRecords::Parser> LastOwner;
// an unpacked debian source tree
using APT::String::Startswith;
{
ioprintf(c1out, _("Note, using directory '%s' to get the build dependencies\n"), *I);
// FIXME: how can we make this more elegant?
- std::string TypeName = "debian/control File Source Index";
+ std::string TypeName = "Debian control file";
pkgIndexFile::Type *Type = pkgIndexFile::Type::GetType(TypeName.c_str());
if(Type != NULL)
- Last = Type->CreateSrcPkgParser(*I);
+ LastOwner = Last = Type->CreateSrcPkgParser(*I);
}
// if its a local file (e.g. .dsc) use this
else if (FileExists(*I))
ioprintf(c1out, _("Note, using file '%s' to get the build dependencies\n"), *I);
// see if we can get a parser for this pkgIndexFile type
- string TypeName = flExtension(*I) + " File Source Index";
+ string TypeName = "Debian " + flExtension(*I) + " file";
pkgIndexFile::Type *Type = pkgIndexFile::Type::GetType(TypeName.c_str());
if(Type != NULL)
- Last = Type->CreateSrcPkgParser(*I);
+ LastOwner = Last = Type->CreateSrcPkgParser(*I);
} else {
// normal case, search the cache for the source file
#if APT_PKG_ABI >= 413