From 19ff58e29b359a5c48aeae8cb466c7258975d5e7 Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Sun, 25 Nov 2007 00:57:09 +0000 Subject: [PATCH] Fix rpmdb2solv, reused solvables must retain their association with the repo. --- tools/repo_rpmdb.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/repo_rpmdb.c b/tools/repo_rpmdb.c index c70ab6d..18254ef 100644 --- a/tools/repo_rpmdb.c +++ b/tools/repo_rpmdb.c @@ -618,7 +618,10 @@ repo_add_rpmdb(Repo *repo, Repo *ref) } else { - memset(s, 0, sizeof(*s)); /* oops, reuse that one */ + /* We can reuse this solvable, but make sure it's still + associated with this repo. */ + memset(s, 0, sizeof(*s)); + s->repo = repo; } } if (s) -- 2.7.4