summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-11-30 12:25:54 -0600
committerDan McGee <dan@archlinux.org>2011-11-30 12:29:15 -0600
commitac34e358103ee718369692b9ba5afe6830a1df92 (patch)
treeaca661524f05854fa0ee54d43649c54e7a1be62f
parent85657db05d7f65604340699cfcb9967c9e81a0ef (diff)
reporead: fix filesonly needs update checks
This was broken after the select for update changes. We really should split the whole filesonly update into another method instead of the current shotgun approach with conditionals everywhere. Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--devel/management/commands/reporead.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/devel/management/commands/reporead.py b/devel/management/commands/reporead.py
index cf101d97..f8cc2034 100644
--- a/devel/management/commands/reporead.py
+++ b/devel/management/commands/reporead.py
@@ -382,11 +382,13 @@ def db_update(archname, reponame, pkgs, options):
# files/depends/all related items to be double-imported.
if filesonly:
with transaction.commit_on_success():
+ if not dbpkg.files_last_update or not dbpkg.last_update:
+ pass
+ elif dbpkg.files_last_update > dbpkg.last_update:
+ logger.debug("Files for %s are up to date", pkg.name)
+ continue
# TODO Django 1.4 select_for_update() will work once released
dbpkg = select_pkg_for_update(dbpkg)
- if pkg_same_version(pkg, dbpkg):
- logger.debug("Package %s was already updated", pkg.name)
- continue
logger.debug("Checking files for package %s", pkg.name)
populate_files(dbpkg, pkg, force=force)
else: