Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-5]: src/usr.sbin/pkg_install/add Pull up rev. 1.54 to netbsd-1-...



details:   https://anonhg.NetBSD.org/src/rev/347302e2673c
branches:  netbsd-1-5
changeset: 489611:347302e2673c
user:      hubertf <hubertf%NetBSD.org@localhost>
date:      Sun Oct 01 22:00:25 2000 +0000

description:
Pull up rev. 1.54 to netbsd-1-5 branch, OK'd by jhawk:
>Don't replace the pkg version with -[0-9] on pkg alternates ("{foo-x,bar-y}")
>as this will remove things like trailing '}' etc. and doesn't work in general.
>
>As mentioned in the already-existing comment, doing TRT here would mean to
>partly expand the pattern, then replace the versions on alternatives.
>Unless our pkg pattern parser gets these hooks, cowardly step back.

diffstat:

 usr.sbin/pkg_install/add/perform.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r 992025af0397 -r 347302e2673c usr.sbin/pkg_install/add/perform.c
--- a/usr.sbin/pkg_install/add/perform.c        Sun Oct 01 21:53:31 2000 +0000
+++ b/usr.sbin/pkg_install/add/perform.c        Sun Oct 01 22:00:25 2000 +0000
@@ -1,11 +1,11 @@
-/*     $NetBSD: perform.c,v 1.52.2.1 2000/09/03 04:17:49 hubertf Exp $ */
+/*     $NetBSD: perform.c,v 1.52.2.2 2000/10/01 22:00:25 hubertf Exp $ */
 
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static const char *rcsid = "from FreeBSD Id: perform.c,v 1.44 1997/10/13 15:03:46 jkh Exp";
 #else
-__RCSID("$NetBSD: perform.c,v 1.52.2.1 2000/09/03 04:17:49 hubertf Exp $");
+__RCSID("$NetBSD: perform.c,v 1.52.2.2 2000/10/01 22:00:25 hubertf Exp $");
 #endif
 #endif
 
@@ -374,6 +374,9 @@
 
                        /* doing this right required to parse the full version(s),
                         * do a 99% solution here for now */
+                       if (strchr(p->name, '{'))
+                               continue;       /* would remove trailing '}' else */
+
                        if ((s = strpbrk(p->name, "<>")) != NULL) {
                                fmt = "%.*s-[0-9]*";
                                skip = 0;



Home | Main Index | Thread Index | Old Index