Force use of 'gpg2'

Mel fbsd.questions at rachie.is-a-geek.net
Tue Feb 3 12:16:48 PST 2009


On Tuesday 03 February 2009 10:28:33 Jerry wrote:
> On Tue, 3 Feb 2009 19:03:01 +0000
> Chris Rees <utisoft at googlemail.com> wrote:
>
> [snip]
>
> >Try putting the link in somewhere that gets searched before
> >/usr/local/bin, like /bin or (better) /usr/bin. Then try rehash &&
> >which gpg
>
> I am using 'bash' so I don't think 'rehash' is going to do anything,
> although I could be mistaken. However, I don't see how that would stop
> a port from installing 'gpg' rather than 'gpg2'. I don't need both
> versions installed and would rather just keep the newer 'gpg2' one.

It would fit the RUN|BUILD_DEPENDS case, since gpg is looked for in $PATH. 
However, some ports check for gpgv and one even for ${PREFIX}/bin/gpgv, which 
would not help you.

You could run:
cd ${PORTSDIR:="/usr/ports"}
find . -depth 3 -name Makefile -exec fgrep -l security/gnupg1 {} + | xargs \
	your_filter_command_here

That filter command would have to rewrite the RUN|BUILD_DEPENDS line, so that 
it fits gnupg2.

Of course you can shorten the list and edit by hand if you only look at the 
ports that you actually use.

-- 
Mel

Problem with today's modular software: they start with the modules
    and never get to the software part.


More information about the freebsd-questions mailing list