Date: Mon, 2 May 2005 10:05:22 +0200 (CEST) From: Matthias Andree <matthias.andree@gmx.de> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/80528: PORTDOCS: shell glob "*" causes test command error Message-ID: <20050502080522.C97571B205@merlin.emma.line.org> Resent-Message-ID: <200505020810.j428A5qm097934@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 80528 >Category: ports >Synopsis: PORTDOCS: shell glob "*" causes test command error >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 May 02 08:10:03 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Matthias Andree >Release: FreeBSD 5.4-STABLE i386 >Organization: >Environment: System: FreeBSD merlin.emma.line.org 5.4-STABLE FreeBSD 5.4-STABLE #28: Sun Apr 24 10:56:21 CEST 2005 toor@merlin.emma.line.org:/usr/src/sys/i386/compile/MA5 i386 >Description: Using a shell glob in PORTDOCS in a port's Makefile (for instance PORTDOCS=*) causes an error, example: [: /usr/local/share/doc/leafnode/ADD-ONS: unexpected operator The context is, for news/leafnode, using "make -dl install": if /usr/bin/egrep -qe '^@cw?d' /var/tmp/usr/ports/news/leafnode/work/.PLIST.mktmp && [ "`/usr/bin/sed -En -e '/^@cw?d[ ]*/s,,,p' /var/tmp/usr/ports/news/leafnode/work/.PLIST.mktmp | /usr/bin/tail -n 1`" != "/usr/local" ]; then echo "@cwd /usr/local" >> /var/tmp/usr/ports/news/leafnode/work/.PLIST.mktmp; fi if [ ! -e /usr/local/share/doc/leafnode/* ]; then @echo /usr/local/share/doc/leafnode/* | /usr/bin/sed -e 's,^/usr/local/,,' >> /var/tmp/usr/ports/news/leafnode/work/.PLIST.mktmp; fi [: /usr/local/share/doc/leafnode/ADD-ONS: unexpected operator /usr/bin/find -P /usr/local/share/doc/leafnode/* ! -type d 2>/dev/null | /usr/bin/sed -ne 's,^/usr/local/,,p' >> /var/tmp/usr/ports/news/leafnode/work/.PLIST.mktmp /usr/bin/find -P -d /usr/local/share/doc/leafnode/* -type d 2>/dev/null | /usr/bin/sed -ne 's,^/usr/local/,@dirrm ,p' >> /var/tmp/usr/ports/news/leafnode/work/.PLIST.mktmp Replacing the wildcard by an explicit file lists makes this error disappear, but /usr/ports/Mk/bsd.ports.mk is documented as "# PORTDOCS - A list of files and directories relative to DOCSDIR. # Shell glob patterns can be used, directories include # the entire subtree of contained files and directories. ..." allowing globs. >How-To-Repeat: cd /usr/ports/news/leafnode make install Note: leafnode uses PORTDOCS= * >Fix: change /usr/ports/Mk/bsd.port.mk so it Does The Right Thing[tm] :-) >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050502080522.C97571B205>