Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Jun 2007 15:36:29 -0400
From:      Ben Kelly <bkelly@vadev.org>
To:        ports@freebsd.org
Subject:   install-ldconfig-file target problem
Message-ID:  <467198BD.9020401@vadev.org>

next in thread | raw e-mail | index | archive | help
Hello,

For the last few months I have been receiving odd messages from my
system when I try to use portupgrade -p on certain ports.  Specifically,
the package fails to be created do to a (null) prefix entry on certain
files.  This problem also shows up when deinstalling a package.  For
example:


vir# pwd
/usr/ports/ports-mgmt/portupgrade
vir# make deinstall
===> Deinstalling for ports-mgmt/portupgrade
===> Deinstalling portupgrade-2.2.6_3,2
pkg_delete: file '(null)/libdata/ldconfig/portupgrade' doesn't really exist
pkg_delete: couldn't entirely delete package (perhaps the packing list is
incorrectly specified?)
vir#


I believe this was being caused by the @cwd command being placed on a
separate line from its argument in the .PLIST.mktmp file.  For example:


vir# pwd
/var/tmp/ports/usr/ports/ports-mgmt/portupgrade/work
vir# tail -3 .PLIST.mktmp
@unexec /sbin/ldconfig -R
@cwd
libdata/ldconfig/portupgrade
vir#


I am running:

FreeBSD vir.in.vadev.org 6.2-STABLE FreeBSD 6.2-STABLE #0: Wed Jun 13
17:20:53 EDT 2007     root@vir.in.vadev.org:/usr/obj/usr/src/sys/SERVER
 i386

My ports tree was portsnap'd just before the uname build time.  My src
tree was updated perhaps 12 hours earlier.

I was able to fix the problem locally with the following patch:


--- bsd.port.mk.orig	Thu Jun 14 15:09:35 2007
+++ bsd.port.mk.new	Thu Jun 14 15:10:51 2007
@@ -4008,7 +4008,7 @@
 .endif
 	@${ECHO_CMD} ${USE_LDCONFIG} | ${TR} ' ' '\n' \
 		> ${PREFIX}/${LDCONFIG_DIR}/${UNIQUENAME}
-	@${ECHO_CMD} "@cwd" >> ${TMPPLIST}
+	@${ECHO_CMD} -n "@cwd " >> ${TMPPLIST}
 	@${ECHO_CMD} ${LDCONFIG_DIR}/${UNIQUENAME} >> ${TMPPLIST}
 .if defined(NO_LDCONFIG_MTREE)
 	@${ECHO_CMD} "@unexec rmdir ${LDCONFIG_DIR} >/dev/null 2>&1 || true"
>> ${TMPPLIST}


Is this the correct fix or is there something else wrong with my
configuration?

Thanks.

- Ben



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?467198BD.9020401>