Imported Upstream version 0.6.29
[platform/upstream/libsolv.git] / ext / pool_parserpmrichdep.c
index d3e559e..93d77f8 100644 (file)
@@ -17,10 +17,13 @@ static struct RichOpComp {
   int l;
   Id fl;
 } RichOps[] = {
-  { "and",  3, REL_AND },
-  { "or",   2, REL_OR },
-  { "if",   2, REL_COND },
-  { "else", 4, REL_ELSE },
+  { "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 },
   { NULL, 0, 0},
 };
 
@@ -106,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;