diff options
author | Dan McGee <dan@archlinux.org> | 2012-02-12 01:46:02 +0100 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2012-02-12 01:46:02 +0100 |
commit | 2ac90512fd17012208d34c4b86ac56d39e3cecd2 (patch) | |
tree | 8064926b6e72b1cd2c7dd4fcc184cd0edc194046 /devel/management | |
parent | 6dfc85affc01785f77e8696aad2ac5c74df18659 (diff) | |
download | archweb-2ac90512fd17012208d34c4b86ac56d39e3cecd2.tar.gz archweb-2ac90512fd17012208d34c4b86ac56d39e3cecd2.tar.xz |
reporead: only reset flag date if upstream version changes
This preserves the flag date if only a simple pkgrel bump occurred,
which makes sense more often than not for rebuilds.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'devel/management')
-rw-r--r-- | devel/management/commands/reporead.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/devel/management/commands/reporead.py b/devel/management/commands/reporead.py index d149a27..3ed95a9 100644 --- a/devel/management/commands/reporead.py +++ b/devel/management/commands/reporead.py @@ -191,6 +191,13 @@ def create_multivalued(dbpkg, repopkg, db_attr, repo_attr): finder = UserFinder() def populate_pkg(dbpkg, repopkg, force=False, timestamp=None): + # we reset the flag date only if the upstream version components change; + # e.g. epoch or pkgver, but not pkgrel + if dbpkg.epoch is None or dbpkg.epoch != repopkg.epoch: + dbpkg.flag_date = None + elif dbpkg.pkgver is None or dbpkg.pkgver != repopkg.ver: + dbpkg.flag_date = None + if repopkg.base: dbpkg.pkgbase = repopkg.base else: @@ -210,7 +217,6 @@ def populate_pkg(dbpkg, repopkg, force=False, timestamp=None): dbpkg.pgp_signature = repopkg.pgpsig if timestamp: - dbpkg.flag_date = None dbpkg.last_update = timestamp dbpkg.save() |