pkg: improve conflicts handling
parent
fdbd97b23a
commit
8f3548c38f
10
pkg.c
10
pkg.c
|
@ -756,13 +756,18 @@ static inline unsigned int
|
|||
pkg_walk_conflicts_list(pkg_t *root, pkg_dependency_t *deplist, unsigned int flags)
|
||||
{
|
||||
unsigned int eflags;
|
||||
pkg_dependency_t *node;
|
||||
pkg_dependency_t *node, *depnode;
|
||||
|
||||
PKG_FOREACH_LIST_ENTRY(deplist, node)
|
||||
{
|
||||
if (*node->package == '\0')
|
||||
continue;
|
||||
|
||||
PKG_FOREACH_LIST_ENTRY(root->requires, depnode)
|
||||
{
|
||||
pkg_t *pkgdep;
|
||||
|
||||
if (*node->package == '\0')
|
||||
if (*depnode->package == '\0' || strcmp(depnode->package, node->package))
|
||||
continue;
|
||||
|
||||
pkgdep = pkg_verify_dependency(node, flags, &eflags);
|
||||
|
@ -781,6 +786,7 @@ pkg_walk_conflicts_list(pkg_t *root, pkg_dependency_t *deplist, unsigned int fla
|
|||
|
||||
pkg_free(pkgdep);
|
||||
}
|
||||
}
|
||||
|
||||
return PKG_ERRF_OK;
|
||||
}
|
||||
|
|
|
@ -129,7 +129,7 @@ run_test "PKG_CONFIG_PATH=${selfdir}/lib1 PKG_CONFIG_SYSROOT_DIR=/test ${1} --cf
|
|||
|
||||
# 8) tests for 'Conflicts'
|
||||
run_test "PKG_CONFIG_PATH=${selfdir}/lib1 ${1} --libs conflicts; echo \$?" \
|
||||
'1'
|
||||
'0'
|
||||
run_test "PKG_CONFIG_PATH=${selfdir}/lib1 ${1} --ignore-conflicts --libs conflicts; echo \$?" \
|
||||
'-lconflicts' '0'
|
||||
|
||||
|
|
Loading…
Reference in New Issue