summaryrefslogtreecommitdiffstats
path: root/devel/management
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-02-27 03:38:08 +0100
committerDan McGee <dan@archlinux.org>2010-02-27 03:42:13 +0100
commit31522fad893f7ecc836dc215b6b79daaaa64ce65 (patch)
tree7e205e9609d9155d813d6c0ab562af886b489944 /devel/management
parent990e3862632e3a354566d86916a72079b27b06a4 (diff)
downloadarchweb-31522fad893f7ecc836dc215b6b79daaaa64ce65.tar.gz
archweb-31522fad893f7ecc836dc215b6b79daaaa64ce65.tar.xz
Add some additional fields to package import
We can capture the build date, compressed size, and installed size when reporead runs. Even if we don't show all of it, we should pull it in. FS#14270 is requesting that the package size be shown on the website. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'devel/management')
-rwxr-xr-xdevel/management/commands/reporead.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/devel/management/commands/reporead.py b/devel/management/commands/reporead.py
index 733e9d3..90337b8 100755
--- a/devel/management/commands/reporead.py
+++ b/devel/management/commands/reporead.py
@@ -137,6 +137,10 @@ def populate_pkg(dbpkg, repopkg, timestamp=None):
dbpkg.pkgdesc = repopkg.desc
dbpkg.license = repopkg.license
dbpkg.url = repopkg.url
+ dbpkg.compressed_size = int(repopkg.csize)
+ dbpkg.installed_size = int(repopkg.isize)
+ dbpkg.build_date = datetime.utcfromtimestamp(int(repopkg.builddate))
+
dbpkg.needupdate = False
dbpkg.last_update = timestamp
dbpkg.save()