]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/edsp.cc
implement 'apt-get files' to access index targets
[apt.git] / apt-pkg / edsp.cc
index 0d0418e0633c52c191dde8d4b4a6f38448db2465..3c6a7e30f903131412a414ff6449096a99ec3cc4 100644 (file)
@@ -95,12 +95,15 @@ bool EDSP::WriteLimitedScenario(pkgDepCache &Cache, FILE* output,
 void EDSP::WriteScenarioVersion(pkgDepCache &Cache, FILE* output, pkgCache::PkgIterator const &Pkg,
                                pkgCache::VerIterator const &Ver)
 {
+   fprintf(output, "Package: %s\n", Pkg.Name());
+#if APT_PKG_ABI >= 413
+   fprintf(output, "Source: %s\n", Ver.SourcePkgName());
+#else
    pkgRecords Recs(Cache);
    pkgRecords::Parser &rec = Recs.Lookup(Ver.FileList());
    string srcpkg = rec.SourcePkg().empty() ? Pkg.Name() : rec.SourcePkg();
-
-   fprintf(output, "Package: %s\n", Pkg.Name());
    fprintf(output, "Source: %s\n", srcpkg.c_str());
+#endif
    fprintf(output, "Architecture: %s\n", Ver.Arch());
    fprintf(output, "Version: %s\n", Ver.VerStr());
    if (Pkg.CurrentVer() == Ver)