summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-02-11 18:46:02 -0600
committerDan McGee <dan@archlinux.org>2012-02-11 18:46:02 -0600
commit2ac90512fd17012208d34c4b86ac56d39e3cecd2 (patch)
tree8064926b6e72b1cd2c7dd4fcc184cd0edc194046
parent6dfc85affc01785f77e8696aad2ac5c74df18659 (diff)
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>
-rw-r--r--devel/management/commands/reporead.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/devel/management/commands/reporead.py b/devel/management/commands/reporead.py
index d149a276..3ed95a9d 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()