diff options
author | David Kalnischkies <david@kalnischkies.de> | 2014-11-07 16:45:18 +0100 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2014-11-08 14:28:28 +0100 |
commit | 765190e493645e13b5651625d87fd9c8db910a85 (patch) | |
tree | 880990c3eca3c131345c2289d426a989a498fb53 /apt-pkg/edsp.cc | |
parent | dce45dbe97531de6806707445da97d3f22285db8 (diff) |
guard ABI changes for SourcePkg/Ver in pkgCache
Git-Dch: Ignore
Diffstat (limited to 'apt-pkg/edsp.cc')
-rw-r--r-- | apt-pkg/edsp.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/apt-pkg/edsp.cc b/apt-pkg/edsp.cc index 2ba914b16..3c6a7e30f 100644 --- a/apt-pkg/edsp.cc +++ b/apt-pkg/edsp.cc @@ -96,7 +96,14 @@ void EDSP::WriteScenarioVersion(pkgDepCache &Cache, FILE* output, pkgCache::PkgI 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, "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) |