Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Mar 2003 12:08:58 -0800
From:      "David O'Brien" <obrien@FreeBSD.org>
To:        Ruslan Ermilov <ru@FreeBSD.org>
Cc:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/usr.bin/less Makefile lesspipe.sh
Message-ID:  <20030306200858.GA41375@dragon.nuxi.com>
In-Reply-To: <20030306185824.GE78034@sunbay.com>
References:  <200303060435.h264Zmkk039395@repoman.freebsd.org> <20030306154915.GE55489@sunbay.com> <20030306181137.GB40027@dragon.nuxi.com> <20030306185824.GE78034@sunbay.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Mar 06, 2003 at 08:58:24PM +0200, Ruslan Ermilov wrote:
> The "documented" name is an example only, it is not the default --
> one still needs to set the LESSOPEN environment variable.

Yeah, so?  I'd much rather use the example than be HIH.
 
> The example script from the manpage can't even handle the `-' as
> the first character in the name.

*shrug* I've used exactly what I committed since Sep 9 1998.
It's worked great for me.  If you have improvements to the script itself,
email me a patch.
 
> How do you expect people to know that we provide lesspipe.sh and
> they should set to LESSOPEN=/usr/bin/lesspipe.sh to explore it?

I am doing this in steps.  I need to poll people to see if it should be
committed to the sample dot files, or in /etc/login.conf.

> The answer is to document this (hint: this can easily be done by
> compile-time adding the FreeBSD-specific section to the otherwise
> stock vendor file), where you can document the fact that FreeBSD
> provides /usr/bin/lesspipe (without .sh) suitable for LESSOPEN.

Hint, I *like* the name and don't plan on changing.  Plus based on the
man page, I feel more people are likely to have "lesspipe.sh" than
"lesspipe" on their non-FreeBSD systems.

> In any case, it's not _stupid_, as the default behavior of
> SCRIPTSNAME of stripping extensions fits 99% of cases, and
> it was designed bearing this in mind.

Huh??  SCRIPTSNAME is only used when you need to over ride the default
behavior.  Perhaps you are talking about "SCRIPTS".  What I think is
stupid is that if I do use SCRIPTSNAME I still have to use SCRIPTS.  Also
as written, bsd.prog.mk doesn't handle this well:

    .for script in ${SCRIPTS}
    .if defined(SCRIPTSNAME)
    SCRIPTSNAME_${script:T}?=	${SCRIPTSNAME}
    .else
    SCRIPTSNAME_${script:T}?=	${script:T:R}
    .endif

So what we have is SCRIPTS is a list, but SCRIPTSNAME name isn't.
So what happens with
    ...
    SCRIPTS=foo.sh bar.sh
    SCRIPTSNAME=baz
    .include <bsd.prog.mk>

both get installed as baz.  SCRIPTS and SCRIPTSNAME should be treated
separately.  I'd fix it, but anytime I touch bsd.*.mk you pop up and I
have a federal case on my hands -- thus I now try hard to never touch
them.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-src" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030306200858.GA41375>