aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2007-10-24 08:50:26 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2007-10-24 08:50:26 +0000
commitc15945d92d79bbcd8716ef8c80f65f066988ed07 (patch)
tree72ebdaff778b2b7709fc36fd5c3b505a8f2a5a84 /dbgenerator
parentDocument how we detect changes (diff)
downloadpackages-3-c15945d92d79bbcd8716ef8c80f65f066988ed07.tar.gz
packages-3-c15945d92d79bbcd8716ef8c80f65f066988ed07.tar.bz2
packages-3-c15945d92d79bbcd8716ef8c80f65f066988ed07.zip
Backend accessor functions for changelog metadata.
Diffstat (limited to 'dbgenerator')
-rw-r--r--dbgenerator/backend.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/dbgenerator/backend.py b/dbgenerator/backend.py
index ac42b68..ca28717 100644
--- a/dbgenerator/backend.py
+++ b/dbgenerator/backend.py
@@ -113,8 +113,16 @@ class domain_repo_interface:
def all_packages_list(self):
return self.current_repo.versions
+ def get_changelog_meta(self, (category, package)):
+ """Return the changelog mtime and SHA1"""
+ filename = pjoin(self.current_repo.location,
+ category, package, "ChangeLog")
+ mtime = file_mtime(filename)
+ sha1 = file_sha1(filename)
+ return ( mtime, sha1)
+
def get_changelog(self, (category, package)):
- """Return the changelog contents, mtime and SHA1"""
+ """Return the changelog contents"""
filename = pjoin(self.current_repo.location,
category, package, "ChangeLog")
try:
@@ -128,9 +136,7 @@ class domain_repo_interface:
for line in changelogfile:
text += unicode(line, 'utf-8')
changelogfile.close()
- mtime = file_mtime(filename)
- sha1 = file_sha1(filename)
- return (text, mtime, sha1)
+ return text
def get_app_metadata(self,(category, package)):
package_atom = atom("%s/%s" % (category, package))