diff options
author | joerg <joerg> | 2009-02-27 19:34:12 +0000 |
---|---|---|
committer | joerg <joerg> | 2009-02-27 19:34:12 +0000 |
commit | 98692f6d7e35bedae67b8ae743d852d4d0f98c50 (patch) | |
tree | 1b1e6439b1b8348f2d18aa8af52ee58def590ac6 /pkgtools | |
parent | 5957dba1077dad22174c250379e3b7e660157b72 (diff) | |
download | pkgsrc-98692f6d7e35bedae67b8ae743d852d4d0f98c50.tar.gz |
When checking for explicit conflicts, skip the old version checkif no
old version exists (e.g. because this is not an update).
Reported by Thomas Klausner.
Diffstat (limited to 'pkgtools')
-rw-r--r-- | pkgtools/pkg_install/files/add/perform.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pkgtools/pkg_install/files/add/perform.c b/pkgtools/pkg_install/files/add/perform.c index eacd16dce54..3d414ff4c7d 100644 --- a/pkgtools/pkg_install/files/add/perform.c +++ b/pkgtools/pkg_install/files/add/perform.c @@ -1,4 +1,4 @@ -/* $NetBSD: perform.c,v 1.79 2009/02/26 12:52:43 joerg Exp $ */ +/* $NetBSD: perform.c,v 1.80 2009/02/27 19:34:12 joerg Exp $ */ #if HAVE_CONFIG_H #include "config.h" #endif @@ -6,7 +6,7 @@ #if HAVE_SYS_CDEFS_H #include <sys/cdefs.h> #endif -__RCSID("$NetBSD: perform.c,v 1.79 2009/02/26 12:52:43 joerg Exp $"); +__RCSID("$NetBSD: perform.c,v 1.80 2009/02/27 19:34:12 joerg Exp $"); /*- * Copyright (c) 2003 Grant Beattie <grant@NetBSD.org> @@ -901,7 +901,7 @@ check_explicit_conflict_iter(const char *cur_pkg, void *cookie) { struct find_conflict_data *data = cookie; - if (strcmp(data->old_pkg, cur_pkg) == 0) + if (data->old_pkg && strcmp(data->old_pkg, cur_pkg) == 0) return 0; warnx("Package `%s' conflicts with `%s', and `%s' is installed.", |