Date: Thu, 13 Mar 2008 22:30:28 GMT From: Maxim Sobolev <sobomax@FreeBSD.org> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/121681: bsd.port.mk unnecessary touches two files in ${PREFIX} during every install Message-ID: <200803132230.m2DMUScb029772@www.freebsd.org> Resent-Message-ID: <200803132240.m2DMe1Ye038892@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 121681 >Category: ports >Synopsis: bsd.port.mk unnecessary touches two files in ${PREFIX} during every install >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Mar 13 22:40:01 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Maxim Sobolev >Release: 6.3-RELEASE >Organization: Sippy Software, Inc. >Environment: FreeBSD pioneer.sippysoft.com 6.3-RELEASE FreeBSD 6.3-RELEASE #1: Tue Jan 15 12:54:53 PST 2008 root@pioneer.sippysoft.com:/usr/obj/usr/src/sys/PIONEER amd64 >Description: The bsd.port.mk is unconditionally removes and creates again two symbolic links in ${PREFIX} when doing install of the port. This is annoying behaviour, since when preparing upgrade to a port maintainers like myself often use `find -cmin' to locate any files that are not in the packaging list, and those two links pop up every time. Attached patch fixes that behaviour, by only creating those links when necessary. It should not have any other effects. -Maxim >How-To-Repeat: cd /usr/ports/foo/bar; sudo make all install deinstall; sudo find /usr/local -cmin -5 >Fix: Patch attached with submission follows: --- Mk/bsd.port.mk 2008/03/13 22:13:05 1.1 +++ Mk/bsd.port.mk 2008/03/13 22:19:24 @@ -2243,6 +2243,8 @@ MTREE_CMD?= /usr/sbin/mtree MTREE_ARGS?= -U ${MTREE_FOLLOWS_SYMLINKS} -f ${MTREE_FILE} -d -e -p +READLINK_CMD?= /usr/bin/readlink + # Determine whether or not we can use rootly owner/group functions. .if !defined(UID) UID!= ${ID} -u @@ -3854,8 +3856,13 @@ ${MTREE_CMD} ${MTREE_ARGS} ${PREFIX}/ >/dev/null; \ if [ ${PREFIX} = ${LOCALBASE} ]; then \ cd ${PREFIX}/share/nls; \ - ${LN} -shf C POSIX; \ - ${LN} -shf C en_US.US-ASCII; \ + for link in POSIX en_US.US-ASCII; \ + do \ + if [ x"`${READLINK_CMD} $${link}`" != x"C" ]; \ + then \ + ${LN} -shf C $${link}; \ + fi; \ + done; \ fi; \ fi; \ else \ >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200803132230.m2DMUScb029772>