]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
rpm upstream accepted the 'unless' pull request
authorMichael Schroeder <mls@suse.de>
Wed, 6 Sep 2017 12:21:45 +0000 (14:21 +0200)
committerMichael Schroeder <mls@suse.de>
Wed, 6 Sep 2017 12:21:45 +0000 (14:21 +0200)
ext/pool_parserpmrichdep.c
ext/testcase.c

index 0b5467769d84453dbed1ef560a8714a9f92d8e33..93d77f8e8094d4dd77b81873df3cfe7726d5bbf6 100644 (file)
@@ -20,6 +20,7 @@ static struct RichOpComp {
   { "and",     3, REL_AND },
   { "or",      2, REL_OR },
   { "if",      2, REL_COND },
+  { "unless",  6, REL_UNLESS },
   { "else",    4, REL_ELSE },
   { "with",    4, REL_WITH },
   { "without", 7, REL_WITHOUT },
@@ -108,7 +109,7 @@ parseRichDep(Pool *pool, const char **depp, Id chainfl)
   fl = op->fl;
   if (!fl)
     return 0;
-  if (chainfl == REL_COND && fl == REL_ELSE)
+  if ((chainfl == REL_COND || chainfl == REL_UNLESS) && fl == REL_ELSE)
     chainfl = 0;
   if (chainfl && fl != chainfl)
     return 0;
index 25c23cb988a324929d1b514b74d505a601e44ed6..77cc7194704e9ee20ecd0d749ada9cbb365cc47e 100644 (file)
@@ -393,6 +393,7 @@ struct oplist {
   { REL_KIND,  "<KIND>" },
   { REL_ELSE, "<ELSE>" },
   { REL_ERROR, "<ERROR>" },
+  { REL_UNLESS, "<UNLESS>" },
   { REL_LT, "<" },
   { 0, 0 }
 };