summaryrefslogtreecommitdiffstats
path: root/devel/management/commands/reporead.py
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-11-30 19:25:54 +0100
committerDan McGee <dan@archlinux.org>2011-11-30 19:29:15 +0100
commitac34e358103ee718369692b9ba5afe6830a1df92 (patch)
treeaca661524f05854fa0ee54d43649c54e7a1be62f /devel/management/commands/reporead.py
parent85657db05d7f65604340699cfcb9967c9e81a0ef (diff)
downloadarchweb-ac34e358103ee718369692b9ba5afe6830a1df92.tar.gz
archweb-ac34e358103ee718369692b9ba5afe6830a1df92.tar.xz
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>
Diffstat (limited to 'devel/management/commands/reporead.py')
-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 cf101d9..f8cc203 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: