From dad2ca8b3e42cbf0ad5a67be7016426ec4835a19 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Wed, 23 Mar 2011 20:19:00 -0500 Subject: Clear out package relation sets before adding new values Signed-off-by: Dan McGee --- devel/management/commands/reporead.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'devel') diff --git a/devel/management/commands/reporead.py b/devel/management/commands/reporead.py index 708b8a59..277196e2 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) -- cgit v1.2.3-54-g00ecf