diff options
author | TizenOpenSource <tizenopensrc@samsung.com> | 2023-12-08 12:23:05 +0900 |
---|---|---|
committer | TizenOpenSource <tizenopensrc@samsung.com> | 2023-12-08 12:23:05 +0900 |
commit | 1aac48dff40ef592968a18058bad270da65ed847 (patch) | |
tree | 3e9a2fb59b3a9559e2a8f2aa1ad194929708d1df /ext/repo_rpmdb.c | |
parent | 2d757ccc60324e7bfcc07f6f46d7f38e30642fcb (diff) | |
download | libsolv-upstream.tar.gz libsolv-upstream.tar.bz2 libsolv-upstream.zip |
Imported Upstream version 0.7.27upstream/0.7.27upstream
Diffstat (limited to 'ext/repo_rpmdb.c')
-rw-r--r-- | ext/repo_rpmdb.c | 47 |
1 files changed, 27 insertions, 20 deletions
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 |