Bug 22403

Summary: "make readmes" hangs if category directory is missing
Product: Ports & Packages Reporter: dann <dann>
Component: Individual Port(s)Assignee: Port Management Team <portmgr>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description dann 2000-10-30 00:20:01 UTC
"make readmes" will (apparently) hang after issuing a message
if a category directory is missing (Actually, it's a cat waiting
for EOF on stdin, but this is not obvious). So, if chinese is missing,
you'll see "cd: can't cd to chinese"; then everything just stops.

Fix: Work around:  Hit CTRL-D whenever you get the "can't cd to <blah>"
message.  This will allow the process to continue, but the
generated toplevel README.html will contain some minor 
formatting gaffes.
A better fix would be to alter /usr/ports/Makefile or bsd.ports.subdir.mk
to check for the existence of a category directory before attempting
to use it.  The following is against /usr/ports/Makefile; I haven't
looked at bsd.ports.subdir.mk long enough to feel comfortable with
it.
How-To-Repeat: If any of the category directories is missing, cd /usr/ports ; make readmes.
Comment 1 dann 2000-11-03 03:28:01 UTC
I'd like to shred this PR, but I guess I can't.  The proposed
fix was a gawdawful POS; I think the chemo is affecting what's
left of my brain :-/.  Anyway, the following is *much* better;
kudos to Jeff Mountin and James Housley.

----------------------------------------------------------------
--- Makefile    Tue Sep 26 19:08:53 2000
+++ Makefile.fixed      Tue Oct 31 09:39:15 2000
@@ -49,6 +49,13 @@
 SUBDIR += x11-toolkits
 SUBDIR += x11-wm

+.for dir in ${SUBDIR}
+.if exists(${.CURDIR}/${dir}/Makefile)
+SUBDIR_EXISTS += ${dir}
+.endif
+.endfor
+SUBDIR = ${SUBDIR_EXISTS}
+
 PORTSTOP=      yes 
   
 .include <bsd.port.subdir.mk>

----------------------------------------------------------------

-- 
Dann Lunsford       The only thing necessary for the triumph of evil
dann@greycat.com    is that men of good will do nothing.  --  Cicero
Comment 2 Maxim Sobolev freebsd_committer freebsd_triage 2000-11-03 15:16:50 UTC
Responsible Changed
From-To: freebsd-ports->asami

PW's land.
Comment 3 Will Andrews freebsd_committer freebsd_triage 2001-04-04 09:22:26 UTC
Responsible Changed
From-To: asami->portmgr

Over to new maintainer.
Comment 4 Will Andrews freebsd_committer freebsd_triage 2001-12-23 11:22:31 UTC
State Changed
From-To: open->closed

Solved slightly differently as per PR #28510.  Thanks for your patches though, 
and sorry for being so late fixing this issue.