]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
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 c70ab6de5f67e51b035d8793fd08130d52261246..18254efa9dd3d9b5443fc6b53df71a4bdf8c4f46 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)