ports/68181: [PATCH] mail/py-spambayes doesn't install due to using ${PORTDOCS}
Danny Pansters
danny at ricin.com
Mon Jun 21 21:50:21 UTC 2004
>Number: 68181
>Category: ports
>Synopsis: [PATCH] mail/py-spambayes doesn't install due to using ${PORTDOCS}
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon Jun 21 21:50:20 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator: Danny Pansters
>Release: 5.2-CURRENT
>Organization:
>Environment:
FreeBSD workstation.homenet 5.2-CURRENT FreeBSD 5.2-CURRENT #2: Thu Jun 10 18:27:35 CEST 2004 root at workstation.homenet:/usr/src/sys/i386/compile/WORKSTATION i386
>Description:
When updating my mail/py-spambayes I noticed it fails to install:
...
install -o root -g wheel -m 444 /usr/ports/mail/py-spambayes/work/spambayes-1.0rc1/WHAT_IS_NEW.txt /usr/local/share/doc/spambayes
install -o root -g wheel -m 444 /usr/ports/mail/py-spambayes/work/spambayes-1.0rc1/contrib/ /usr/local/share/doc/spambayes
install: /usr/ports/mail/py-spambayes/work/spambayes-1.0rc1/contrib/: Inappropriate file type or format
*** Error code 71
>How-To-Repeat:
cd /usr/ports/mail/py-spambayes
[make deinstall]
make install
>Fix:
The for loop in the Makefile causes ${INSTALL_DATA} to attempt to install a directory as if it were a file. From what I gather from bsd.port.mk, it seems that the interpretation of shell expansions and directories (adding subdirs if any) in ${PORTDOCS} works for +CONTENTS generation only. Perhaps someone can confirm this?
Here's one possible workaround which still retains some advantage of defining ${PORTDOCS} in the sense that you can loop over it.
workstation# diff -u Makefile.orig Makefile
--- Makefile.orig Mon Jun 21 22:41:36 2004
+++ Makefile Mon Jun 21 23:35:30 2004
@@ -7,6 +7,7 @@
PORTNAME= spambayes
PORTVERSION= 1.0.rc.1
+PORTREVISION= 1
CATEGORIES= mail python
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
@@ -34,12 +35,12 @@
post-install:
.ifndef(NOPORTDOCS)
- @${MKDIR} ${DOCSDIR}
+ @${MKDIR} ${DOCSDIR} ${DOCSDIR}/contrib
.for file in ${PORTDOCS}
- ${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR}
+ if [ -d ${WRKSRC}/${file} ]; then \
+ ${INSTALL_DATA} ${WRKSRC}/${file}/* ${DOCSDIR}/contrib; else \
+ ${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR}; fi
.endfor
- @${MKDIR} ${DOCSDIR}/contrib
- @${INSTALL_DATA} ${WRKSRC}/contrib/* ${DOCSDIR}/contrib
.endif
.include <bsd.port.mk>
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list