Subject: Re: changing 'install-depends' output
To: None <hubert@feyrer.de, tech-pkg@netbsd.org>
From: Alistair Crooks <AlistairCrooks@excite.com>
List: tech-pkg
Date: 11/13/2000 08:19:26
On Sun, 12 Nov 2000 16:49:08 +0100 (MET), hubert@feyrer.de wrote:

>  
>  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?

What is the motivation for this?

I last used punched cards in 1977. I last used a real vt100 in 1985. Why do
people want me to re-visit my past?

OK, so consoles are 80 columns before X11 is brought up, but still, it seems
like a throwback to me.

Personally, I'd prefer to keep the original package name in there, as it
makes it easier to see at a glance what's going on, especially reviewing log
files or scrollback.

I also don't like the stealth transition from "not" to "NOT". There's no
need to shout with these things.

>  Any comments about s/installed package/package/?

Not really - it could be changed. 

>  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

I'd be much more inclined to make the output look like:

===> package gtk+-1.2.8 (gtk+>=1.2.8) required for mozilla-0.m18nb1 
===> package ORBit-0.5.3nb1 (ORBit>=0.5.1) required for mozilla-0.m18nb1 
===> package jpeg-6b (jpeg-6b) required for mozilla-0.m18nb1 
===> file /usr/pkg/bin/perl found for mozilla-0.m18nb1 
===> executable /usr/pkg/bin/autoconf found for mozilla-0.m18nb1 
===> executable /usr/pkg/bin/zip found for mozilla-0.m18nb1 
===> executable /usr/pkg/bin/gmake found for mozilla-0.m18nb1

[But, there again, I really don't see a reason to change.]

Regards,
Alistair

>   - 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>
>  


--
Alistair Crooks (agc@pkgsrc.org)





_______________________________________________________
Tired of slow Internet? Get @Home Broadband Internet
http://www.home.com/xinbox/signup.html