From 871e123cf3fafe5aff734e2c5cf1ce89a203f719 Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Thu, 22 Feb 2007 04:42:59 +0000 Subject: * Cleaned up some debug output * Fixed a segfault in the conflict checking code * Added an automatic failure in the case of -A/-U for a replacement of an existing package. This requires a large amount of work and is postponed for now. Example: If ncmpc is installed, pacman -U /path/to/ncmpc-svn.pkg.tar.gz will fail with and appropriate error message --- lib/libalpm/package.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/libalpm/package.c') diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c index d5738703..09161dba 100644 --- a/lib/libalpm/package.c +++ b/lib/libalpm/package.c @@ -467,8 +467,8 @@ pmpkg_t *_alpm_pkg_isin(char *needle, alpm_list_t *haystack) for(lp = haystack; lp; lp = lp->next) { pmpkg_t *info = lp->data; - if(info && !strcmp(info->name, needle)) { - return(lp->data); + if(info && strcmp(info->name, needle) == 0) { + return(info); } } return(NULL); -- cgit v1.2.3-24-g4f1b