Subject: CVS commit: [pkgviews] src/usr.sbin/pkg_install/admin
To: None <source-changes@NetBSD.org>
From: Johnny C. Lam <jlam@netbsd.org>
List: source-changes
Date: 07/31/2003 19:17:38
Module Name:	src
Committed By:	jlam
Date:		Thu Jul 31 19:17:38 UTC 2003

Modified Files:
	src/usr.sbin/pkg_install/admin [pkgviews]: main.c pkg_admin.1

Log Message:
Add an option "-s sfx_pattern" to pkg_admin(1) to allow specifying the
package suffix when matching package names for the `lsall' and `lsbest'
commands.  The sfx_pattern defaults to ".t[bg]z" to match the existing
behaviour.

We can now use pkg_admin(1) in ${DEPOTBASE} to find the best version of
a package if multiple versions are installed:

	# cd /usr/pkg/packages
	# ls png-*
	png-1.2.1
	png-1.2.4
	png-1.2.5nb2
	# pkg_admin -s "" lsall 'png>=1.2.4'
	/usr/pkg/packages/png-1.2.4
	/usr/pkg/packages/png-1.2.5nb2
	# pkg_admin -s "" lsbest 'png>=1.2.4'
	/usr/pkg/packages/png-1.2.5nb2


To generate a diff of this commit:
cvs rdiff -r1.28.2.2 -r1.28.2.3 src/usr.sbin/pkg_install/admin/main.c
cvs rdiff -r1.16.4.1 -r1.16.4.2 src/usr.sbin/pkg_install/admin/pkg_admin.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.