]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
- fix internalize logic
authorMichael Schroeder <mls@suse.de>
Mon, 22 Jun 2009 12:13:51 +0000 (14:13 +0200)
committerMichael Schroeder <mls@suse.de>
Mon, 22 Jun 2009 12:13:51 +0000 (14:13 +0200)
ext/repo_products.c
ext/repo_releasefile_products.c

index 5cdcc19cdc4ff3a8a8479483758e81f26e98dbb2..7325cd7b6647a91174678ffbb500c00f73dda9f1 100644 (file)
@@ -551,6 +551,10 @@ repo_add_products(Repo *repo, const char *proddir, const char *root, int flags)
   /* no luck. print an error message in case the root argument is wrong */
   perror(fullpath);
   join_freemem();
+
+  /* the least we can do... */
+  if (!(flags & REPO_NO_INTERNALIZE) && (flags & REPO_REUSE_REPODATA) != 0)
+    repodata_internalize(repo_last_repodata(repo));
 }
 
 /* EOF */
index 2413d20335ad8cc1f184cdb748c1cc0146c902fd..92773953ea97dd38df4cfc34e77594e62430ef14 100644 (file)
@@ -144,13 +144,7 @@ repo_add_releasefile_products(Repo *repo, const char *dirpath, int flags)
   closedir(dir);
   join_freemem();
 
-  if (!(flags & REPO_NO_INTERNALIZE))
-    {
-      if (!(flags & REPO_REUSE_REPODATA))
-       {
-         Repodata *data = repo_add_repodata(repo, 0);
-         repodata_internalize(data);
-       }
-    }
+  if (!(flags & REPO_NO_INTERNALIZE) && (flags & REPO_REUSE_REPODATA) != 0)
+    repodata_internalize(repo_last_repodata(repo));
 }