]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
Support rich deps in SOLVABLE_PREREQ_IGNOREINST
authorMichael Schroeder <mls@suse.de>
Tue, 12 Sep 2023 11:14:17 +0000 (13:14 +0200)
committerMichael Schroeder <mls@suse.de>
Tue, 12 Sep 2023 11:14:17 +0000 (13:14 +0200)
ext/repo_rpmdb.c

index d78893ee22506684404a4e6a2a439e32fd68206c..a60ed4fe9e0223063fbf245cf9f261035e322a42 100644 (file)
@@ -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)