~ubuntu-branches/ubuntu/saucy/synaptic/saucy

« back to all changes in this revision

Viewing changes to common/rpackage.cc

  • Committer: Package Import Robot
  • Author(s): Michael Vogt
  • Date: 2013-05-08 21:11:11 UTC
  • mfrom: (19.1.8 experimental)
  • Revision ID: package-import@ubuntu.com-20130508211111-p6sq5df1u3r1de10
Tags: 0.80
update translations from launchpad

Show diffs side-by-side

added added

removed removed

Lines of Context:
120
120
   static string _srcPkg;
121
121
 
122
122
   pkgCache::VerIterator ver = (*_depcache)[*_package].CandidateVerIter(*_depcache);
123
 
   pkgRecords::Parser &rec=_records->Lookup(ver.FileList());
124
 
   _srcPkg = rec.SourcePkg().empty()?name():rec.SourcePkg();
 
123
   if (!ver.end()) {
 
124
      pkgRecords::Parser &parser = _records->Lookup(ver.FileList());
 
125
      _srcPkg = parser.SourcePkg().empty() ? name() : parser.SourcePkg();
 
126
      return _srcPkg.c_str();
 
127
   }
125
128
 
126
 
   return _srcPkg.c_str();
 
129
   return name();
127
130
}
128
131
 
129
132
 
154
157
   return "";
155
158
}
156
159
 
 
160
const char *RPackage::homepage()
 
161
{
 
162
   static string _homepage;
 
163
   pkgCache::VerIterator ver = (*_depcache)[*_package].CandidateVerIter(*_depcache);
 
164
   if (!ver.end()) {
 
165
      pkgRecords::Parser & parser = _records->Lookup(ver.FileList());
 
166
      _homepage = parser.Homepage();
 
167
      return _homepage .c_str();
 
168
   }
 
169
   return "";
 
170
}
 
171
 
 
172
 
157
173
string RPackage::arch()
158
174
{
159
175
   pkgCache::VerIterator ver;