diff options
author | Dan McGee <dan@archlinux.org> | 2010-02-26 20:38:08 -0600 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2010-02-26 20:42:13 -0600 |
commit | 31522fad893f7ecc836dc215b6b79daaaa64ce65 (patch) | |
tree | 7e205e9609d9155d813d6c0ab562af886b489944 /devel | |
parent | 990e3862632e3a354566d86916a72079b27b06a4 (diff) |
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')
-rwxr-xr-x | devel/management/commands/reporead.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/devel/management/commands/reporead.py b/devel/management/commands/reporead.py index 733e9d3e..90337b8d 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() |