From 76e32ad40bb4cc27e13818be5c2acc4a70197c9e Mon Sep 17 00:00:00 2001
From: rpm-build <rpm-build>
Date: Tue, 2 May 2017 11:26:56 -0400
Subject: [PATCH] Revert "reldep_from_str: add support for rich deps"
This reverts commit 28017b4e2678f416f4a287da82382accd394d0d9.
---
libdnf/libdnf/hy-iutil.c | 27 ++++++++-------------------
1 file changed, 8 insertions(+), 19 deletions(-)
diff --git a/libdnf/libdnf/hy-iutil.c b/libdnf/libdnf/hy-iutil.c
index 4031a15..f5c14b5 100644
--- a/libdnf/libdnf/hy-iutil.c
+++ b/libdnf/libdnf/hy-iutil.c
@@ -40,7 +40,6 @@
#include <solv/solver.h>
#include <solv/solverdebug.h>
#include <solv/util.h>
-#include <solv/pool_parserpmrichdep.h>
// glib
#include <glib.h>
@@ -52,7 +51,6 @@
#include "hy-packageset-private.h"
#include "hy-query.h"
#include "dnf-sack-private.h"
-#include "dnf-reldep-private.h"
#define BUF_BLOCK 4096
#define CHKSUM_TYPE REPOKEY_TYPE_SHA256
@@ -734,23 +732,14 @@ parse_reldep_str(const char *reldep_str, char **name, char **evr,
DnfReldep *
reldep_from_str(DnfSack *sack, const char *reldep_str)
{
- if (reldep_str[0] == '(') {
- /* Rich dependency */
- Pool *pool = dnf_sack_get_pool (sack);
- Id id = pool_parserpmrichdep(pool, reldep_str);
- if (!id)
- return NULL;
- return dnf_reldep_from_pool (pool, id);
- } else {
- char *name, *evr = NULL;
- int cmp_type = 0;
- if (parse_reldep_str(reldep_str, &name, &evr, &cmp_type) == -1)
- return NULL;
- DnfReldep *reldep = dnf_reldep_new (sack, name, cmp_type, evr);
- g_free(name);
- g_free(evr);
- return reldep;
- }
+ char *name, *evr = NULL;
+ int cmp_type = 0;
+ if (parse_reldep_str(reldep_str, &name, &evr, &cmp_type) == -1)
+ return NULL;
+ DnfReldep *reldep = dnf_reldep_new (sack, name, cmp_type, evr);
+ g_free(name);
+ g_free(evr);
+ return reldep;
}
DnfReldepList *
--
2.12.2