From 1aac48dff40ef592968a18058bad270da65ed847 Mon Sep 17 00:00:00 2001 From: TizenOpenSource Date: Fri, 8 Dec 2023 12:23:05 +0900 Subject: Imported Upstream version 0.7.27 --- ext/repo_rpmdb.c | 47 +++++++++++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 20 deletions(-) (limited to 'ext/repo_rpmdb.c') diff --git a/ext/repo_rpmdb.c b/ext/repo_rpmdb.c index d78893e..17334e6 100644 --- a/ext/repo_rpmdb.c +++ b/ext/repo_rpmdb.c @@ -678,29 +678,32 @@ makedeps(Pool *pool, Repo *repo, RpmHead *rpmhead, int tagn, int tagv, int tagf, if ((f[i] & (DEP_LESS|DEP_EQUAL|DEP_GREATER)) == 0 && n[i][0] == '(') { id = pool_parserpmrichdep(pool, n[i]); - if (id) - *ida++ = id; - else - cc--; - continue; + if (!id) + { + cc--; + continue; + } } + else #endif - id = pool_str2id(pool, n[i], 1); - if (f[i] & (DEP_LESS|DEP_GREATER|DEP_EQUAL)) { - Id evr; - int fl = 0; - if ((f[i] & DEP_LESS) != 0) - fl |= REL_LT; - if ((f[i] & DEP_EQUAL) != 0) - fl |= REL_EQ; - if ((f[i] & DEP_GREATER) != 0) - fl |= REL_GT; - if (v[i][0] == '0' && v[i][1] == ':' && v[i][2]) - evr = pool_str2id(pool, v[i] + 2, 1); - else - evr = pool_str2id(pool, v[i], 1); - id = pool_rel2id(pool, id, evr, fl, 1); + id = pool_str2id(pool, n[i], 1); + if (f[i] & (DEP_LESS|DEP_GREATER|DEP_EQUAL)) + { + Id evr; + int fl = 0; + if ((f[i] & DEP_LESS) != 0) + fl |= REL_LT; + if ((f[i] & DEP_EQUAL) != 0) + fl |= REL_EQ; + if ((f[i] & DEP_GREATER) != 0) + fl |= REL_GT; + if (v[i][0] == '0' && v[i][1] == ':' && v[i][2]) + evr = pool_str2id(pool, v[i] + 2, 1); + else + evr = pool_str2id(pool, v[i], 1); + id = pool_rel2id(pool, id, evr, fl, 1); + } } *ida++ = id; if (haspre == 2 && ignq) @@ -2523,7 +2526,11 @@ rpm_byrpmh(void *rpmstate, Header h) if (!h) return 0; #ifndef RPM5 +# ifdef RPM_MASK_TYPE + uh = headerExport(h, NULL); +# else uh = headerUnload(h); +# endif #else uh = headerUnload(h, NULL); #endif -- cgit v1.2.3