Subject: Re: dewey-conformity
To: Masao Uebayashi <uebayasi@orchid.tky.plala.or.jp>
From: Hubert Feyrer <hubert.feyrer@informatik.fh-regensburg.de>
List: tech-pkg
Date: 12/09/2001 16:27:33
Here is the patch that i mentioned in my other mail.


 - Hubert

Index: admin/main.c
===================================================================
RCS file: /cvsroot/basesrc/usr.sbin/pkg_install/admin/main.c,v
retrieving revision 1.23
diff -u -r1.23 main.c
--- admin/main.c	2001/04/17 10:42:11	1.23
+++ admin/main.c	2001/12/09 15:23:41
@@ -340,6 +340,26 @@
 		show_version();
 		/* NOTREACHED */
 
+	} else if (strcasecmp(argv[1], "pmatch") == 0) {
+
+		char *pattern, *pkg;
+		
+		argv++;		/* argv[0] */
+		argv++;		/* "pmatch" */
+
+		pattern = argv[0];
+		pkg = argv[1];
+
+		if (pattern == NULL || pkg == NULL) {
+			usage();
+		}
+
+		if (pmatch(pattern, pkg)){
+			return 0;
+		} else {
+			return 1;
+		}
+	  
 	} else if (strcasecmp(argv[1], "rebuild") == 0) {
 
 		rebuild();
@@ -560,7 +580,8 @@
 #endif
 	    " lsall /path/to/pkgpattern   - list all pkgs matching the pattern\n"
 	    " lsbest /path/to/pkgpattern  - list pkgs matching the pattern best\n"
-	    " dump                        - dump database\n");
+	    " dump                        - dump database\n"
+	    " pmatch pattern pkg          - returns true if pkg matches pattern, false else\n");
 	exit(1);
 }
 

-- 
Want to get a clue on IPv6 but don't know where to start? Try this:
* Basics -> http://www.onlamp.com/pub/a/onlamp/2001/05/24/ipv6_tutorial.html
* Setup  -> http://www.onlamp.com/pub/a/onlamp/2001/06/01/ipv6_tutorial.html 
Of course with your #1 IPv6 ready operating system -> http://www.NetBSD.org/