HCoop
/
ntk
/
apt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
caa3279
)
EDSP: add Source field to Package stanzas
author
Stefano Zacchiroli
<zack@debian.org>
Thu, 5 Sep 2013 14:36:44 +0000
(16:36 +0200)
committer
Stefano Zacchiroli
<zack@debian.org>
Sun, 4 May 2014 16:27:10 +0000
(18:27 +0200)
apt-pkg/edsp.cc
patch
|
blob
|
blame
|
history
diff --git
a/apt-pkg/edsp.cc
b/apt-pkg/edsp.cc
index
33478df
..
178791d
100644
(file)
--- a/
apt-pkg/edsp.cc
+++ b/
apt-pkg/edsp.cc
@@
-18,6
+18,7
@@
#include <apt-pkg/pkgcache.h>
#include <apt-pkg/cacheiterators.h>
#include <apt-pkg/strutl.h>
#include <apt-pkg/pkgcache.h>
#include <apt-pkg/cacheiterators.h>
#include <apt-pkg/strutl.h>
+#include <apt-pkg/pkgrecords.h>
#include <ctype.h>
#include <stddef.h>
#include <ctype.h>
#include <stddef.h>
@@
-87,7
+88,12
@@
bool EDSP::WriteLimitedScenario(pkgDepCache &Cache, FILE* output,
void EDSP::WriteScenarioVersion(pkgDepCache &Cache, FILE* output, pkgCache::PkgIterator const &Pkg,
pkgCache::VerIterator const &Ver)
{
void EDSP::WriteScenarioVersion(pkgDepCache &Cache, FILE* output, pkgCache::PkgIterator const &Pkg,
pkgCache::VerIterator const &Ver)
{
+ 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, "Package: %s\n", Pkg.Name());
+ fprintf(output, "Source: %s\n", srcpkg.c_str());
fprintf(output, "Architecture: %s\n", Ver.Arch());
fprintf(output, "Version: %s\n", Ver.VerStr());
if (Pkg.CurrentVer() == Ver)
fprintf(output, "Architecture: %s\n", Ver.Arch());
fprintf(output, "Version: %s\n", Ver.VerStr());
if (Pkg.CurrentVer() == Ver)