Subject: pkg/15660: packages with conflicting files don't build right
To: None <gnats-bugs@gnats.netbsd.org>
From: None <raeburn@raeburn.org>
List: netbsd-bugs
Date: 02/18/2002 13:47:05
>Number:         15660
>Category:       pkg
>Synopsis:       packages with conflicting files don't build right
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Feb 18 10:48:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Ken Raeburn
>Release:        pkgsrc approx 2002-02-18, system -current approx 2001-08-01 or earlier
>Organization:
	
>Environment:
	
System: NetBSD raeburn.org 1.5X NetBSD 1.5X (RAEBURN.412) #3: Wed Aug 1 14:08:55 EDT 2001 raeburn@raeburn.org:/u1/netbsd-cvs/src/sys/arch/i386/compile/RAEBURN.412 i386
Architecture: i386
Machine: i386
>Description:

When one package to be built and installed contains a file that's already
installed by a different package (and thus likely to be different), the
package system doesn't seem to notice, or at least doesn't complain during
the build phase.

The krb-kth package, built because arla depends on it, builds and installs
libcom_err.a in /usr/pkg/lib.  However, the zephyr package also installs a
libcom_err.a in /usr/pkg/lib, and the order of -L options when building
cause the zephyr package's version to be used when linking krb-kth programs
instead of the uninstalled one in the krb-kth build tree.  So the build fails.

>How-To-Repeat:

Install zephyr package then try building arla.

>Fix:

Complain about conflicts earlier?

Order -L options so as to prefer build-tree libraries over installed ones.
(This might also be an issue when building a new version of a package while
an old version is installed, if the older library is missing routines required
by newer programs in the package.)
>Release-Note:
>Audit-Trail:
>Unformatted: