From 944fb0aa82269120138918eb955851b7934be580 Mon Sep 17 00:00:00 2001 From: Michael Schroeder Date: Mon, 22 Jun 2009 14:13:51 +0200 Subject: [PATCH] - fix internalize logic --- ext/repo_products.c | 4 ++++ ext/repo_releasefile_products.c | 10 ++-------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/ext/repo_products.c b/ext/repo_products.c index 5cdcc19..7325cd7 100644 --- a/ext/repo_products.c +++ b/ext/repo_products.c @@ -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 */ diff --git a/ext/repo_releasefile_products.c b/ext/repo_releasefile_products.c index 2413d20..9277395 100644 --- a/ext/repo_releasefile_products.c +++ b/ext/repo_releasefile_products.c @@ -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)); } -- 2.7.4