diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2007-10-24 08:50:26 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2007-10-24 08:50:26 +0000 |
commit | c15945d92d79bbcd8716ef8c80f65f066988ed07 (patch) | |
tree | 72ebdaff778b2b7709fc36fd5c3b505a8f2a5a84 /dbgenerator | |
parent | Document how we detect changes (diff) | |
download | packages-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.py | 14 |
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)) |