ports/64519: [PATCH] Check to see if NONEXISTENT exists, and error out if it does
Joe Marcus Clarke
marcus at marcuscom.com
Sat Mar 20 21:40:18 UTC 2004
>Number: 64519
>Category: ports
>Synopsis: [PATCH] Check to see if NONEXISTENT exists, and error out if it does
>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 Mar 20 13:40:17 PST 2004
>Closed-Date:
>Last-Modified:
>Originator: Joe Marcus Clarke
>Release: FreeBSD 4.9-STABLE i386
>Organization:
MarcusCom, Inc.
>Environment:
System: FreeBSD shumai.marcuscom.com 4.9-STABLE FreeBSD 4.9-STABLE #41: Fri Mar 19 01:53:37 EST 2004 marcus at shumai.marcuscom.com:/usr/obj/usr/src/sys/SHUMAI i386
>Description:
Certain ports require a dependency to be extracted/compiled everytime. To do
this, they check for a bug dependency file (usually /nonexistent). If this
bogus file/directory actually exists, however, the port build will fail.
The attached patch corrects that by checkig for ${NONEXISTENT}, and erroring
out if it exists.
>How-To-Repeat:
# touch -f /nonexistent
# cd /usr/ports/mail/mutt
# make -DWITH_MUTT_XFACE
>Fix:
With this patch, the above procedure will produce:
===> Extracting for mutt-1.4.2.1
>Release-Note:
>Audit-Trail:
>Unformatted:
>> Checksum OK for mutt/mutt-1.4.2.1i.tar.gz.
>> Checksum OK for mutt/patch-1.4.2.1.rr.compressed.gz.
>> Checksum OK for mutt/patch-1.4.2.1.vvv.initials.gz.
===> Patching for mutt-1.4.2.1
Error: /nonexistent exists. Please remove it, and restart the build.
*** Error code 1
Stop in /usr/ports/mail/mutt.
--- bsd.port.mk.diff begins here ---
--- bsd.port.mk.orig Sat Mar 20 16:29:57 2004
+++ bsd.port.mk Sat Mar 20 16:29:48 2004
@@ -4347,12 +4347,17 @@
fi; \
if ${EXPR} "$$prog" : \\/ >/dev/null; then \
if [ -e "$$prog" ]; then \
- ${ECHO_MSG} "===> ${PKGNAME} depends on file: $$prog - found"; \
- if [ ${_DEPEND_ALWAYS} = 1 ]; then \
- ${ECHO_MSG} " (but building it anyway)"; \
- notfound=1; \
+ if [ "$$prog" = "${NONEXISTENT}" ]; then \
+ ${ECHO_MSG} "Error: ${NONEXISTENT} exists. Please remove it, and restart the build."; \
+ ${FALSE}; \
else \
- notfound=0; \
+ ${ECHO_MSG} "===> ${PKGNAME} depends on file: $$prog - found"; \
+ if [ ${_DEPEND_ALWAYS} = 1 ]; then \
+ ${ECHO_MSG} " (but building it anyway)"; \
+ notfound=1; \
+ else \
+ notfound=0; \
+ fi; \
fi; \
else \
${ECHO_MSG} "===> ${PKGNAME} depends on file: $$prog - not found"; \
--- bsd.port.mk.diff ends here ---
More information about the freebsd-ports-bugs
mailing list