From fenner@chongo.dyndns.org  Mon Jun 26 14:19:16 2006
Return-Path: <fenner@chongo.dyndns.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id C514416A50D
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 26 Jun 2006 14:19:16 +0000 (UTC)
	(envelope-from fenner@chongo.dyndns.org)
Received: from rwcrmhc14.comcast.net (rwcrmhc14.comcast.net [204.127.192.84])
	by mx1.FreeBSD.org (Postfix) with ESMTP id DDB0243E64
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 26 Jun 2006 14:18:58 +0000 (GMT)
	(envelope-from fenner@chongo.dyndns.org)
Received: from chongo.dyndns.org ([71.224.154.163])
          by comcast.net (rwcrmhc14) with ESMTP
          id <20060626141857m14000f80be>; Mon, 26 Jun 2006 14:18:57 +0000
Received: from chongo.dyndns.org (localhost [127.0.0.1])
	by chongo.dyndns.org (8.13.3/8.13.3) with ESMTP id k5QDLk1r007072
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 26 Jun 2006 09:23:47 -0400 (EDT)
	(envelope-from fenner@chongo.dyndns.org)
Received: (from fenner@localhost)
	by chongo.dyndns.org (8.13.3/8.13.3/Submit) id k5QDLVjt007045;
	Mon, 26 Jun 2006 09:21:31 -0400 (EDT)
	(envelope-from fenner)
Message-Id: <200606261321.k5QDLVjt007045@chongo.dyndns.org>
Date: Mon, 26 Jun 2006 09:21:31 -0400 (EDT)
From: Bill Fenner <fenner@chongo.dyndns.org>
Reply-To: Bill Fenner <fenner@chongo.dyndns.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: bsd.port.mk has wrong RUN_DEPENDS for ldconfig_compat
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         99491
>Category:       ports
>Synopsis:       bsd.port.mk has wrong RUN_DEPENDS for ldconfig_compat
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    portmgr
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jun 26 14:20:18 GMT 2006
>Closed-Date:    Tue Jun 27 20:10:43 GMT 2006
>Last-Modified:  Tue Jun 27 20:10:43 GMT 2006
>Originator:     Bill Fenner
>Release:        FreeBSD 5.4-RELEASE i386
>Organization:
AT&T Labs - Research
>Environment:
System: FreeBSD chongo.dyndns.org 5.4-RELEASE FreeBSD 5.4-RELEASE #0: Tue Dec 27 18:00:57 EST 2005 root@chongo.dyndns.org:/usr/obj/usr/src/sys/GENERIC i386


	
>Description:
	

When trying to upgrade mysql41-client, I consistently get an
error when it finds that it needs to install ldconfig_compat,
builds it, tries to install it and finds that it is already
installed.

>How-To-Repeat:
	

"make depends" in mysql41-client; see it say

===>   mysql-client-4.1.20 depends on file: /usr/local/bin/libtool - found
===>   mysql-client-4.1.20 depends on file: /usr/local/libdata/ldconfig - not found
===>    Verifying install for /usr/local/libdata/ldconfig in /usr/ports/misc/ldconfig_compat
===>  Installing for ldconfig_compat-1.0_7
===>   Generating temporary packing list
===>  Checking if misc/ldconfig_compat already installed
===>   ldconfig_compat-1.0_7 is already installed
      You may wish to ``make deinstall'' and install this port again
      by ``make reinstall'' to upgrade it properly.
      If you really wish to overwrite the old port of misc/ldconfig_compat
      without deleting it first, set the variable "FORCE_PKG_REGISTER"
      in your environment or the "make install" command line.
*** Error code 1

Stop in /usr/ports/misc/ldconfig_compat.
*** Error code 1

Stop in /usr/ports/databases/mysql41-client.

>Fix:

	

Fix bsd.port.mk to know how to depend on ldconfig_compat properly.
ldconfig_compat only installs one file: the rc.d file, which is
named differently on different OS versions, so in order to depend
on it the RUN_DEPENDS line will probably have to mimic the logic
in misc/ldconfig_compat/Makefile.

.if ${OSVERSION} < 504105 || \
                (${OSVERSION} >= 700000 && ${OSVERSION} < 700012) || \
                (${OSVERSION} >= 600000 && ${OSVERSION} < 600104)
RUN_DEPENDS+=   ${LOCALBASE}/${LDCONFIG_DIR}:${PORTSDIR}/misc/ldconfig_compat
.endif

The file can be ${LOCALBASE}/etc/rc.d/ldconfig_compat,
/etc/rc.d/ldconfig_compat, or /etc/rc.d/000.ldconfig_compat.sh.
Apparently, on FreeBSD before 5.0, the LDCONFIG_DIR is installed
by the ldconfig_compat port, so the current bsd.port.mk logic works
on 4.x, but not 5.x or 6.x or 7.x.



Workaround: mkdir -p  /usr/local/libdata/ldconfig
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->portmgr 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Mon Jun 26 14:20:28 UTC 2006 
Responsible-Changed-Why:  
bsd.port.mk is port manager territory 

http://www.freebsd.org/cgi/query-pr.cgi?pr=99491 
State-Changed-From-To: open->closed 
State-Changed-By: linimon 
State-Changed-When: Tue Jun 27 20:09:37 UTC 2006 
State-Changed-Why:  
I'm going to use flz' patch in the followup to ports/99370, which he claims 
will fix both that problem and this one. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=99491 
>Unformatted:
