Proposed patch to inform users of fetchindex

Adam Weinberger adamw at FreeBSD.org
Mon Jan 31 16:10:39 PST 2005


Doug Barton wrote:
> On Mon, 31 Jan 2005, Adam Weinberger wrote:
> 
>> Doug Barton wrote:
>>
>>> I can't help but think that the majority of users try to build their 
>>> own index because they don't know that there is a better alternative. 
>>> What would y'all think of the following patch?
>>
>>
>> I like the warning, but I don't think that making a new target is 
>> really a good thing. I think that printing the warning message at the 
>> beginning of a 'make index' is better than having 'make index' not 
>> result in any INDEX whatsoever.
> 
> 
> Another way to approach it would be:
> 
> Index: Makefile
> ===================================================================
> RCS file: /home/pcvs/ports/Makefile,v
> retrieving revision 1.90
> diff -u -r1.90 Makefile
> --- Makefile    17 Dec 2004 11:23:22 -0000    1.90
> +++ Makefile    31 Jan 2005 23:59:53 -0000
> @@ -66,8 +66,12 @@
>  .include <bsd.port.subdir.mk>
> 
>  index:
> +.if !defined(I_REALLY_MEAN_IT)
> +    @${ECHO} 'Warning'
> +.else
>      @rm -f ${.CURDIR}/${INDEXFILE}
>      @cd ${.CURDIR} && make ${.CURDIR}/${INDEXFILE}
> +.endif
> 
>  fetchindex:
>      @cd ${.CURDIR} && ${FETCHINDEX} 
> ${MASTER_SITE_INDEX}/${INDEXFILE}.bz2 && bunzip2 -f ${INDEXFILE}.bz2 && 
> chmod a+r ${INDEXFILE}
> 
> 
> Or similar ... It's the general concept I want to get across here, the 
> implementation is a SMOP.

I 1000% agree that a warning should be put in so that people know that 
they can use fetchindex instead of index, but I think that the general 
concept of issuing said warning INSTEAD of allowing default INDEX build 
behaviour would be a bad move.

That said, I'd also be okay with having 'make index' do the same thing 
as 'make fetchindex', and have the current 'make index' behaviour be 
moved to a new target called 'make buildindex'.

# Adam


-- 
Adam Weinberger
adamw at magnesium.net || adamw at FreeBSD.org
adamw at vectors.cx    ||   adamw at gnome.org
http://www.vectors.cx


More information about the freebsd-ports mailing list