summaryrefslogtreecommitdiffstats
path: root/devel/management/commands
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-05-24 18:29:35 +0200
committerDan McGee <dan@archlinux.org>2010-05-24 18:29:35 +0200
commitb3e8354cdff4af8117feda0806a7c1104d5bb30e (patch)
treeeb1ef2c9dce6a3b428ab756d5ae7fd1377b6b550 /devel/management/commands
parent5adceb6586afcac163b1abf9fb6f2d0f1b151b9a (diff)
downloadarchweb-b3e8354cdff4af8117feda0806a7c1104d5bb30e.tar.gz
archweb-b3e8354cdff4af8117feda0806a7c1104d5bb30e.tar.xz
reporead: use the DB package we already have
Rather than go to the database for every single package on something like a files update, use the one we already have. Duh. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'devel/management/commands')
-rw-r--r--devel/management/commands/reporead.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/devel/management/commands/reporead.py b/devel/management/commands/reporead.py
index ee60684..6e71c26 100644
--- a/devel/management/commands/reporead.py
+++ b/devel/management/commands/reporead.py
@@ -266,14 +266,12 @@ def db_update(archname, reponame, pkgs, options):
continue
else:
timestamp = datetime.now()
- pkg = Package.objects.get(
- pkgname=p.name,arch=architecture, repo=repository)
if filesonly:
- logger.info("Possibly populating files for package %s in database", p.name)
- populate_files(pkg, p)
+ logger.debug("Checking files for package %s in database", p.name)
+ populate_files(dbp, p)
else:
logger.info("Updating package %s in database", p.name)
- populate_pkg(pkg, p, force=force, timestamp=timestamp)
+ populate_pkg(dbp, p, force=force, timestamp=timestamp)
logger.info('Finished updating Arch: %s' % archname)