Subject: pkg/15375: pkgtools/pkg_chk uses make update even when installing stuff first time
To: None <gnats-bugs@gnats.netbsd.org>
From: None <kivinen@ssh.fi>
List: netbsd-bugs
Date: 01/26/2002 13:44:11
>Number:         15375
>Category:       pkg
>Synopsis:       pkg_chk uses make update instead of make install in when run with -a
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jan 26 03:46:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Tero Kivinen
>Release:        NetBSD 1.5ZA 2002-01-22
>Organization:
SSH Communications Security
>Environment:
System: NetBSD kaakeli.ssh.fi 1.5ZA NetBSD 1.5ZA (KAAKELI) #3: Wed Jan 23 21:19:47 EET 2002 root@kaakeli.ssh.fi:/usr/src/sys/arch/i386/compile/KAAKELI i386
Architecture: i386
Machine: i386
>Description:

	If I have kdelibs2 installed, but kdelibs and I say pkg_chk -a
	with config file that says that it wants to install
	khostchooser. Khostchooser notices that it need kdelibs-1.1.2
	and because that is not installed it goes to x11/kdelibs and
	says make update there. The x11/kdelibs now removes the
	kdelibs2 before starting to install kdelibs because it matches
	the kdelibs-* (kdelibs-2.2.2) and after that all my kde2 stuff
	is removed. If the pkg_chk -a would have used make install
	instead of make update the install of kdelibs either would
	have failed (in case kdelibs and kdelibs2 are conflicting) or
	it would have simply installed kdelibs in addition to
	kdelibs2.

	The problem might also be that kdelibs-1.1.2 (kdelibs package)
	and kdelibs-2.2.2 (kdelibs2 package) are using names that
	match and the khostchooser specifies that it wants exactly
	kdelibs-1.1.2. End result is that the pkg_chk removed all of
	my kde2 related stuff I had installed earlier (several hours
	of compilation) and installed kde1 stuff instead...

	Also because the pkg_chk has already checked that this
	package does not exists there is no need to use make update
	for it, make install would be enough, and that would not ever
	remove any packages, but it would fail in this kind of cases.
	This of would of course leave the problem for the next time I
	say pkg_chk -u...

>How-To-Repeat:

	(cd x11/kde2; make install)
	echo x11/khostchooser > pkgchk.conf
	pkg_chk -a 

>Fix:

	Either change the pkg_chk script to use make install when
	installing stuff first time, or change kdelibs* to have
	non-overlapping names, or mark khostchooser to be in conflict
	with kdelibs2 (i.e if it really does not work with
	kdelibs-2*). 
>Release-Note:
>Audit-Trail:
>Unformatted: