Subject: changing 'install-depends' output
To: None <tech-pkg@netbsd.org>
From: None <hubert@feyrer.de>
List: tech-pkg
Date: 11/12/2000 16:49:08
I'd like to change the output of the 'install-depends' target so it fits
in 80 columns. Any objections to commit the patch below?

Any comments about s/installed package/package/?


before:
===> mozilla-0.m18nb1 depends on installed package: gtk+>=1.2.8 - gtk+-1.2.8 found
===> mozilla-0.m18nb1 depends on installed package: ORBit>=0.5.1 - ORBit-0.5.3nb1 found
===> mozilla-0.m18nb1 depends on installed package: jpeg-6b - jpeg-6b found
===> mozilla-0.m18nb1 depends on installed package: png>=1.0.6 - png-1.0.8 found
===> mozilla-0.m18nb1 depends on file: /usr/pkg/bin/perl - found
===> mozilla-0.m18nb1 depends on executable: autoconf - /usr/pkg/bin/autoconf found
===> mozilla-0.m18nb1 depends on executable: zip - /usr/pkg/bin/zip found
===> mozilla-0.m18nb1 depends on executable: gmake - /usr/pkg/bin/gmake found

after:
===> Required installed package gtk+>=1.2.8: gtk+-1.2.8 found
===> Required installed package ORBit>=0.5.1: ORBit-0.5.3nb1 found
===> Required installed package jpeg-6b: jpeg-6b found
===> Required installed package png>=1.0.6: png-1.0.8 found
===> Required file /usr/pkg/bin/perl: found
===> Required executable autoconf: /usr/pkg/bin/autoconf found
===> Required executable zip: /usr/pkg/bin/zip found
===> Required executable gmake: /usr/pkg/bin/gmake found


 - Hubert

Index: bsd.pkg.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/bsd.pkg.mk,v
retrieving revision 1.604
diff -u -r1.604 bsd.pkg.mk
--- bsd.pkg.mk	2000/11/12 15:20:06	1.604
+++ bsd.pkg.mk	2000/11/12 15:37:48
@@ -2597,13 +2576,13 @@
 	else								\
 		target=${DEPENDS_TARGET};				\
 	fi;								\
-	found=not;							\
+	found=NOT;							\
 	if expr "$$prog" : '.*/' >/dev/null; then			\
 		if ${TEST} -e "$$prog" ; then				\
-			${ECHO_MSG} "${_PKGSRC_IN}> ${PKGNAME} depends on file: $$prog - found"; \
+			${ECHO_MSG} "${_PKGSRC_IN}> Required file $$prog: found"; \
 			found="";					\
 		else							\
-			${ECHO_MSG} "${_PKGSRC_IN}> ${PKGNAME} depends on file: $$prog - not found"; \
+			${ECHO_MSG} "${_PKGSRC_IN}> Required file $$prog: NOT found"; \
 		fi;							\
 	else								\
 		for d in ${PATH:S/:/ /g}; do				\
@@ -2612,9 +2591,9 @@
 				break;					\
 			fi						\
 		done;							\
-		${ECHO_MSG} "${_PKGSRC_IN}> ${PKGNAME} depends on executable: $$prog - $$found found"; \
+		${ECHO_MSG} "${_PKGSRC_IN}> Required executable $$prog: $$found found"; \
 	fi;								\
-	if [ "$$found" = "not" ]; then					\
+	if [ "$$found" = "NOT" ]; then					\
 		${ECHO_MSG} "${_PKGSRC_IN}> Verifying $$target for $$prog in $$dir"; \
 		if [ ! -d "$$dir" ]; then				\
 			${ECHO_MSG} "=> No directory for $$prog.  Skipping.."; \
@@ -2661,10 +2640,10 @@
 			${ECHO} "    (" `${ECHO} $$found` ")." ; 	\
 			${ECHO} "    Please check if this is really intended!" ; \
 		else 							\
-			${ECHO_MSG} "${_PKGSRC_IN}> ${PKGNAME} depends on installed package: $$pkg - $${found} found"; \
+			${ECHO_MSG} "${_PKGSRC_IN}> Required installed package $$pkg: $${found} found"; \
 		fi ; 							\
 	else								\
-		${ECHO_MSG} "${_PKGSRC_IN}> ${PKGNAME} depends on package: $$pkg"; \
+		${ECHO_MSG} "${_PKGSRC_IN}> Required package $$pkg: NOT found"; \
 		target=${DEPENDS_TARGET};				\
 		${ECHO_MSG} "${_PKGSRC_IN}> Verifying $$target for $$dir"; 	\
 		if [ ! -d $$dir ]; then					\

-- 
Hubert Feyrer <hubert@feyrer.de>