Hide Forgot
Changelog information is spread across three headers in rpms. It would be useful if rpmlib had a method that combined the data and that RpmWrapper objects exposed this through an attribute. Sample code: def get_changelogs(hdr, max=-1, timeformat="%a %b %d %Y"): if max == 0: return s = [] names = get_header_field(hdr, 'CHANGELOGNAME') times = get_header_field(hdr, 'CHANGELOGTIME') text = get_header_field(hdr, 'CHANGELOGTEXT') i = 0 while (i < max or max < 0) and i < len(names): if isinstance(times, int): time_value = time.gmtime(times) elif isinstance(times, list): time_value = time.gmtime(times[i]) time_text = time.strftime(timeformat, time_value) s.append((time_value, "%s %s\n%s" % (time_text, names[i], text[i]))) i += 1 return s @property def changelogs(self): return kobo.rpmlib.get_changelogs(self.header)
This might work: http://git.fedorahosted.org/cgit/kobo.git/commit/?id=8eb8ce82a46bd95f73eb33bae5bdc0ba6a86e771 Please close this bug if the code works for you.