From c0633aa76f7e5fbe90db35fcf3dd74e2cc9ded24 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sat, 27 Mar 2010 16:33:54 -0500 Subject: 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 --- devel/management/commands/reporead.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'devel') diff --git a/devel/management/commands/reporead.py b/devel/management/commands/reporead.py index f83b127..32e7929 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 -- cgit v1.2.3-24-g4f1b