diff options
author | joerg <joerg@pkgsrc.org> | 2009-02-27 19:34:12 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2009-02-27 19:34:12 +0000 |
commit | f9a9823e92406955a86a16de7ad1c437fd02a6f5 (patch) | |
tree | 1b1e6439b1b8348f2d18aa8af52ee58def590ac6 /pkgtools/pkg_install/files/add | |
parent | 952e8430c0d4737ae8546f72a1c51054f39535e0 (diff) | |
download | pkgsrc-f9a9823e92406955a86a16de7ad1c437fd02a6f5.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/pkg_install/files/add')
-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.", |