diff options
Diffstat (limited to 'apt-pkg/deb')
-rw-r--r-- | apt-pkg/deb/deblistparser.cc | 9 | ||||
-rw-r--r-- | apt-pkg/deb/debrecords.cc | 9 | ||||
-rw-r--r-- | apt-pkg/deb/debrecords.h | 1 |
3 files changed, 19 insertions, 0 deletions
diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc index 878170d00..ec5787fb4 100644 --- a/apt-pkg/deb/deblistparser.cc +++ b/apt-pkg/deb/deblistparser.cc @@ -148,6 +148,15 @@ bool debListParser::NewVersion(pkgCache::VerIterator &Ver) const char *Start; const char *Stop; + if (Section.Find("Name",Start,Stop) == true) + { + Ver->Display = WriteString(Start, Stop - Start); + } + else if (Section.Find("Maemo-Display-Name",Start,Stop) == true) + { + Ver->Display = WriteString(Start, Stop - Start); + } + // Parse the section if (Section.Find(pkgTagSection::Key::Section,Start,Stop) == true) { diff --git a/apt-pkg/deb/debrecords.cc b/apt-pkg/deb/debrecords.cc index a132f34a6..6d642c7b8 100644 --- a/apt-pkg/deb/debrecords.cc +++ b/apt-pkg/deb/debrecords.cc @@ -74,6 +74,15 @@ string debRecordParserBase::Name() return Result; } /*}}}*/ +// RecordParserBase::Display - Return the package homepage /*{{{*/ +string debRecordParserBase::Display() +{ + string display(Section.FindS("Name")); + if (display.empty()) + display = Section.FindS("Maemo-Display-Name"); + return display; +} + /*}}}*/ // RecordParserBase::Homepage - Return the package homepage /*{{{*/ string debRecordParserBase::Homepage() { diff --git a/apt-pkg/deb/debrecords.h b/apt-pkg/deb/debrecords.h index 7fc82a88d..8f443c9a3 100644 --- a/apt-pkg/deb/debrecords.h +++ b/apt-pkg/deb/debrecords.h @@ -44,6 +44,7 @@ class APT_HIDDEN debRecordParserBase : public pkgRecords::Parser virtual std::string ShortDesc(std::string const &lang) APT_OVERRIDE; virtual std::string LongDesc(std::string const &lang) APT_OVERRIDE; virtual std::string Name() APT_OVERRIDE; + virtual std::string Display() APT_OVERRIDE; virtual std::string Homepage() APT_OVERRIDE; // An arbitrary custom field |