summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-03-24 02:19:00 +0100
committerDan McGee <dan@archlinux.org>2011-03-24 02:19:00 +0100
commitdad2ca8b3e42cbf0ad5a67be7016426ec4835a19 (patch)
tree30d786f5743bc16553da17f468c9f1c0fd8f6e4c
parentd6b148779f3a1119e30fa75c63a2a0e46938098c (diff)
downloadarchweb-dad2ca8b3e42cbf0ad5a67be7016426ec4835a19.tar.gz
archweb-dad2ca8b3e42cbf0ad5a67be7016426ec4835a19.tar.xz
Clear out package relation sets before adding new values
Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--devel/management/commands/reporead.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/devel/management/commands/reporead.py b/devel/management/commands/reporead.py
index 708b8a5..277196e 100644
--- a/devel/management/commands/reporead.py
+++ b/devel/management/commands/reporead.py
@@ -267,12 +267,15 @@ def populate_pkg(dbpkg, repopkg, force=False, timestamp=None):
for y in repopkg.optdepends:
create_depend(dbpkg, y, True)
+ dbpkg.conflicts.all().delete()
if hasattr(repopkg, 'conflicts'):
for y in repopkg.conflicts:
create_related(Conflict, dbpkg, y)
+ dbpkg.provides.all().delete()
if hasattr(repopkg, 'provides'):
for y in repopkg.provides:
create_related(Provision, dbpkg, y, equals_only=True)
+ dbpkg.replaces.all().delete()
if hasattr(repopkg, 'replaces'):
for y in repopkg.replaces:
create_related(Replacement, dbpkg, y)