ports/99370: USE_LDCONFIG fails installation for non-default prefix

Gerald Pfeifer gerald at FreeBSD.org
Fri Jun 23 13:50:19 UTC 2006


>Number:         99370
>Category:       ports
>Synopsis:       USE_LDCONFIG fails installation for non-default prefix
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jun 23 13:50:16 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Gerald Pfeifer
>Release:        FreeBSD 5.4-STABLE i386
>Organization:
>Environment:
	Current Ports Collection.
>Description:
	I converted some of my ports, notably emulators/wine and
	lang/gcc40 to use the nice new USE_LDCONFIG facility, but
	now found that installation into a non-default prefix fails
	when trying to write ${PREFIX}/${LDCONFIG_DIR}/${UNIQUENAME}
	since ${PREFIX}/${LDCONFIG_DIR} does not exist.

	(I had tested this before updating the ports, and successfully,
	so I'm not sure what made the difference.)

	Looking at the code, the problem is easy to spot:

.if ${USE_LDCONFIG:L} != "${PREFIX}/lib"
    @${ECHO_MSG} "===>   Installing ldconfig configuration file"
    @${MKDIR} ${PREFIX}/${LDCONFIG_DIR}
    @${ECHO_CMD} ${USE_LDCONFIG} | ${TR} ' ' '\n' \
        > ${PREFIX}/${LDCONFIG_DIR}/${UNIQUENAME}
    @${ECHO_CMD} ${LDCONFIG_DIR}/${UNIQUENAME} >> ${TMPPLIST}
.endif

>How-To-Repeat:
	I avoided this by adding the following to my ports:

post-install:
        -@${MKDIR} ${PREFIX}/libdata/ldconfig

>Fix:

	The real fix may look like the following:

Index: bsd.port.mk
===================================================================
RCS file: /home/pcvs/ports/Mk/bsd.port.mk,v
retrieving revision 1.534
diff -u -3 -p -r1.534 bsd.port.mk
--- bsd.port.mk	16 Jun 2006 04:53:43 -0000	1.534
+++ bsd.port.mk	23 Jun 2006 13:36:32 -0000
@@ -3663,6 +3663,7 @@ install-ldconfig-file:
 .endif
 .if ${USE_LDCONFIG:L} != "${PREFIX}/lib"
 	@${ECHO_MSG} "===>   Installing ldconfig configuration file"
+	@${MKDIR} ${PREFIX}/${LDCONFIG_DIR}
 	@${ECHO_CMD} ${USE_LDCONFIG} | ${TR} ' ' '\n' \
 		> ${PREFIX}/${LDCONFIG_DIR}/${UNIQUENAME}
 	@${ECHO_CMD} ${LDCONFIG_DIR}/${UNIQUENAME} >> ${TMPPLIST}
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list