diff options
author | Dan McGee <dan@archlinux.org> | 2010-03-27 16:33:54 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2010-03-27 18:09:33 -0500 |
commit | c0633aa76f7e5fbe90db35fcf3dd74e2cc9ded24 (patch) | |
tree | f95810400a3593a4e5b30ea29731c1d9e692c431 /devel/management | |
parent | 2af0ac721bba1c32978ef542a090d987a68a8309 (diff) |
Make reporead always populate pkgbase
And also add a data migration to add the value retroactively for anything
already in our database. We simply fall back to pkgname if pkgbase isn't
available.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'devel/management')
-rw-r--r-- | devel/management/commands/reporead.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/devel/management/commands/reporead.py b/devel/management/commands/reporead.py index f83b127e..32e7929e 100644 --- a/devel/management/commands/reporead.py +++ b/devel/management/commands/reporead.py @@ -135,7 +135,10 @@ class Pkg(object): def populate_pkg(dbpkg, repopkg, force=False, timestamp=None): - dbpkg.pkgbase = repopkg.base + if repopkg.base: + dbpkg.pkgbase = repopkg.base + else: + dbpkg.pkgbase = repopkg.name dbpkg.pkgver = repopkg.ver dbpkg.pkgrel = repopkg.rel dbpkg.pkgdesc = repopkg.desc |