diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2001-03-22 20:42:04 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2001-03-22 20:42:04 +0000 |
commit | 9dad926a4c4c277ede492cbb47adfe8d13b15856 (patch) | |
tree | 5372c0d45129c56d046faa23ccc2fff0f65dad35 /usr.sbin/pkg_install | |
parent | a7bd78a2784a060a8a60b3fccab7e5c839b0d8ea (diff) |
Smarter default conflict, use pkgname-[0-9]* if a version number has been
found, pkgname-* otherwise.
Diffstat (limited to 'usr.sbin/pkg_install')
-rw-r--r-- | usr.sbin/pkg_install/add/perform.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.sbin/pkg_install/add/perform.c b/usr.sbin/pkg_install/add/perform.c index c4bafc1f814..432922fc0e2 100644 --- a/usr.sbin/pkg_install/add/perform.c +++ b/usr.sbin/pkg_install/add/perform.c @@ -1,7 +1,7 @@ -/* $OpenBSD: perform.c,v 1.16 2000/10/16 17:22:18 espie Exp $ */ +/* $OpenBSD: perform.c,v 1.17 2001/03/22 20:42:03 espie Exp $ */ #ifndef lint -static const char *rcsid = "$OpenBSD: perform.c,v 1.16 2000/10/16 17:22:18 espie Exp $"; +static const char *rcsid = "$OpenBSD: perform.c,v 1.17 2001/03/22 20:42:03 espie Exp $"; #endif /* @@ -243,8 +243,7 @@ pkg_do(char *pkg) break; } } - buf[s-PkgName+1]='*'; - buf[s-PkgName+2]='\0'; + strcpy(buf+(s-PkgName+1), isdigit(s[1]) ? "[0-9]*" : "*"); if (findmatchingname(dbdir, buf, check_if_installed, installed)) { warnx("other version '%s' already installed", installed); |