Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 May 2008 20:43:41 GMT
From:      Ganael Laplanche <ganael.laplanche@martymac.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/123964: Mk fix: bsd.linux-rpm.mk - Handling of NOPORTDOCS
Message-ID:  <200805242043.m4OKhfwo069453@www.freebsd.org>
Resent-Message-ID: <200805242050.m4OKo3Z7032178@freefall.freebsd.org>

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

>Number:         123964
>Category:       ports
>Synopsis:       Mk fix: bsd.linux-rpm.mk - Handling of NOPORTDOCS
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat May 24 20:50:03 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Ganael Laplanche
>Release:        8.0-CURRENT
>Organization:
http://contribs.martymac.com
>Environment:
FreeBSD home.martymac.com 8.0-CURRENT FreeBSD 8.0-CURRENT #17: Sun May 18 23:44:45 CEST 2008     root@:/usr/obj/usr/src/sys/MYKERNEL  amd64
>Description:
As discussed in this thread :

http://lists.freebsd.org/pipermail/freebsd-ports/2008-May/048724.html

bsd.linux-rpm.mk ignores PORTDOCS and NOPORTDOCS variables. A port using USE_LINUX_RPM will have *every* files in WRKDIR (including documentation) installed.

This leads to incorrect plist generation when both NOPORTDOCS and PORTDOCS are defined : the do-install target of bsd.linux-rpm.mk will unconditionally install documentation files, while the plist file will not include them if NOPORTDOCS is defined. When deinstalling the port, if NOPORTDOCS has been defined, documentation files are left installed.

The attached patch removes PORTDOCS from WRKDIR at pre-patch stage if NOPORTDOCS is defined, so that documentation files will not be installed.

Note : As far as I can see, 3 ports are involved in such a situation :
- archivers/linux-par2cmdline
- graphics/linux-png
- graphics/linux-png10
>How-To-Repeat:
cd /usr/ports/archivers/linux-par2cmdline
make -DNOPORTDOCS install
make -DNOPORTDOCS deinstall
ls /compat/linux/usr/share/doc/par2cmdline-0.4

The last command shows documentation has been installed and left behind after deinstallation.
>Fix:


Patch attached with submission follows:

--- bsd.linux-rpm.mk.orig	2008-05-24 20:46:04.931665759 +0200
+++ bsd.linux-rpm.mk	2008-05-24 21:32:51.721449935 +0200
@@ -105,6 +105,20 @@
 BRANDELF_DIRS?=
 BRANDELF_FILES?=
 
+# For ports that define PORTDOCS, be sure not to install
+# documentation if NOPORTDOCS is defined
+.if defined(PORTDOCS) && defined(NOPORTDOCS)
+pre-patch: linux-rpm-clean-portdocs
+
+.  if !target(linux-rpm-clean-portdocs)
+linux-rpm-clean-portdocs:
+.for x in ${PORTDOCS}
+	@${RM} -f ${WRKDIR}/${DOCSDIR_REL}/${x}
+.endfor
+	@${RMDIR} ${WRKDIR}/${DOCSDIR_REL}
+.  endif
+.endif
+
 .  if defined(AUTOMATIC_PLIST)
 
 .    if ${USE_LINUX} == "fc4" || ${USE_LINUX:L} == "yes"


>Release-Note:
>Audit-Trail:
>Unformatted:



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