Fix rpmdb2solv, reused solvables must retain their association with the
authorMichael Matz <matz@suse.de>
Sun, 25 Nov 2007 00:57:09 +0000 (00:57 +0000)
committerMichael Matz <matz@suse.de>
Sun, 25 Nov 2007 00:57:09 +0000 (00:57 +0000)
repo.

tools/repo_rpmdb.c

index c70ab6d..18254ef 100644 (file)
@@ -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)