Re: [gentoo-dev] dont use `which` in ebuilds

2007-03-18 Thread Paul de Vrieze
On Friday 16 March 2007, Petteri Räty wrote:
 Ned Ludd wrote:
  Here are the remaining offenders for sync 1174037821 that match
  '$(which ' or '`which ' in eclasses and ebuilds.
 
  dev-db/hsqldb/hsqldb-1.7.3.1-r1.ebuild:48:

 This one just echos which to a script so it's safe I think.

The reasons why not to use which still apply. Even though which is used in a 
script instead of the ebuild itself.

Paul

-- 
Paul de Vrieze
Gentoo Developer
Mail: [EMAIL PROTECTED]
Homepage: http://www.devrieze.net


pgpY9jyEZ0nad.pgp
Description: PGP signature


Re: [gentoo-dev] dont use `which` in ebuilds

2007-03-16 Thread Lars Weiler
* Ned Ludd [EMAIL PROTECTED] [07/03/12 16:36 -0700]:
 app-cdr/cdrkit/cdrkit-1.0.ebuild:26:
 app-cdr/cdrkit/cdrkit-1.1.2.ebuild:28:

Those are fixed.

Regards, Lars

-- 
Lars Weiler  [EMAIL PROTECTED]  +49-171-1963258
Instant Messaging : [EMAIL PROTECTED]
Gentoo Linux PowerPC  : Strategical Lead and Release Engineer
Gentoo Infrastructure : CVS Administrator


pgpY8iwgWLjer.pgp
Description: PGP signature


Re: [gentoo-dev] dont use `which` in ebuilds

2007-03-16 Thread Ned Ludd
On Mon, 2007-03-12 at 19:15 -0400, Mike Frysinger wrote:
 On Monday 12 March 2007, Mike Frysinger wrote:
  instead, since we require bash for our ebuilds, use the builtin `type -p`
 
 err i botched that ;)
 
 `type -p` is almost a complete drop in replacement for which ... it does not 
 work on bash builtins however, so people should use `type -P` to force the 
 PATH search
 
 in other words, `type -p echo` would return  while `type -P echo` would 
 return /bin/echo
 -mike


Here are the remaining offenders for sync 1174037821 that match 
'$(which ' or '`which ' in eclasses and ebuilds.

eclass/mysql.eclass:529:
eclass/mysql.eclass:530:
app-dicts/stardict/stardict-2.4.8.ebuild:42:
sci-mathematics/octave/octave-2.1.57-r1.ebuild:34:
sci-mathematics/octave/octave-2.1.69.ebuild:36:
www-apps/lxr/lxr-0.3.1.ebuild:37:
app-cdr/cdrkit/cdrkit-1.0.ebuild:26:
app-cdr/cdrkit/cdrkit-1.0_pre5.ebuild:30:
app-cdr/cdrkit/cdrkit-1.1.0.ebuild:28:
app-cdr/cdrkit/cdrkit-1.1.1.ebuild:28:
app-cdr/cdrkit/cdrkit-1.1.2.ebuild:28:
app-dicts/verbiste/verbiste-0.1.16.ebuild:28:
app-text/pdftk/pdftk-1.12.ebuild:20:
dev-db/hsqldb/hsqldb-1.7.3.1-r1.ebuild:48:
dev-util/kdesvn/kdesvn-0.11.1.ebuild:34:
dev-util/kdesvn/kdesvn-0.11.1.ebuild:35:
media-libs/pdflib/pdflib-5.0.4_p1-r1.ebuild:39:
media-libs/pdflib/pdflib-6.0.3-r1.ebuild:48:
media-libs/pdflib/pdflib-6.0.3.ebuild:38:
sys-process/fcron/fcron-2.0.2.ebuild:28:
sys-process/fcron/fcron-2.9.5.1.ebuild:31:
sys-process/fcron/fcron-2.9.7.ebuild:26:
sys-process/fcron/fcron-3.0.0.ebuild:33:
sys-process/fcron/fcron-3.0.1-r1.ebuild:33:
sys-process/fcron/fcron-3.0.1.ebuild:33:

-- 
Ned Ludd [EMAIL PROTECTED]
Gentoo Linux

-- 
gentoo-dev@gentoo.org mailing list



Re: [gentoo-dev] dont use `which` in ebuilds

2007-03-16 Thread Petteri Räty
Ned Ludd wrote:

 Here are the remaining offenders for sync 1174037821 that match 
 '$(which ' or '`which ' in eclasses and ebuilds.

 dev-db/hsqldb/hsqldb-1.7.3.1-r1.ebuild:48:

This one just echos which to a script so it's safe I think.

Regards,
Petteri



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-dev] dont use `which` in ebuilds

2007-03-16 Thread Danny van Dyk
Am Freitag, 16. März 2007 23:16 schrieb Ned Ludd:
 On Mon, 2007-03-12 at 19:15 -0400, Mike Frysinger wrote:
  On Monday 12 March 2007, Mike Frysinger wrote:

 Here are the remaining offenders for sync 1174037821 that match
 '$(which ' or '`which ' in eclasses and ebuilds.


 sci-mathematics/octave/octave-2.1.57-r1.ebuild:34:
 sci-mathematics/octave/octave-2.1.69.ebuild:36:
^^ fixed. Must have slipped through in my first round.

Danny
-- 
Danny van Dyk [EMAIL PROTECTED]
Gentoo/AMD64 Project, Gentoo Scientific Project
--
gentoo-dev@gentoo.org mailing list



Re: [gentoo-dev] dont use `which` in ebuilds

2007-03-16 Thread Luca Longinotti
Ned Ludd wrote:
 Here are the remaining offenders for sync 1174037821 that match 
 '$(which ' or '`which ' in eclasses and ebuilds.
 
 eclass/mysql.eclass:529:
 eclass/mysql.eclass:530:
 media-libs/pdflib/pdflib-5.0.4_p1-r1.ebuild:39:
 media-libs/pdflib/pdflib-6.0.3-r1.ebuild:48:
 media-libs/pdflib/pdflib-6.0.3.ebuild:38:

Fixed, thanks for the report!

-- 
Best regards,
Luca Longinotti aka CHTEKK

LongiTEKK Networks Admin: [EMAIL PROTECTED]
Gentoo Dev: [EMAIL PROTECTED]
SysCP Dev: [EMAIL PROTECTED]
TILUG Supporter: [EMAIL PROTECTED]
-- 
gentoo-dev@gentoo.org mailing list



Re: [gentoo-dev] dont use `which` in ebuilds

2007-03-13 Thread Matthias Schwarzott
On Dienstag, 13. März 2007, Thomas de Grenier de Latour wrote:

 ./eclass/vdr-plugin.eclass:
if which md5sum /dev/null 21; then
^^ fixed

Matthias


-- 
Matthias Schwarzott (zzam)
--
gentoo-dev@gentoo.org mailing list



Re: [gentoo-dev] dont use `which` in ebuilds

2007-03-13 Thread Matthias Schwarzott
On Dienstag, 13. März 2007, Ned Ludd wrote:
 On Mon, 2007-03-12 at 19:15 -0400, Mike Frysinger wrote:
  On Monday 12 March 2007, Mike Frysinger wrote:
   instead, since we require bash for our ebuilds, use the builtin `type
   -p`
 
  err i botched that ;)
 
  `type -p` is almost a complete drop in replacement for which ... it does
  not work on bash builtins however, so people should use `type -P` to
  force the PATH search
 
  in other words, `type -p echo` would return  while `type -P echo` would
  return /bin/echo
  -mike

 Quick search shows the following ebuilds are abusing this behavior.


The scripts installed by these ebuilds also use which:
sys-kernel/module-rebuild:
media-tv/vdrplugin-rebuild: (fixed)

R_PORTAGEQ=`which portageq 2/dev/null`

Matthias

-- 
Matthias Schwarzott (zzam)
--
gentoo-dev@gentoo.org mailing list



Re: [gentoo-dev] dont use `which` in ebuilds

2007-03-13 Thread Mike Frysinger
On Tuesday 13 March 2007, Matthias Schwarzott wrote:
 The scripts installed by these ebuilds also use which:
 sys-kernel/module-rebuild:

that's a different issue ... this is a Linux-only package, so it can safely 
depend on the behavior of the which app that is installed onto our Linux 
hosts

so if its scripts are !/bin/sh, then it should use which ... but if its 
scripts are !/bin/bash, then either is OK
-mike


pgpiuLKnJNrgR.pgp
Description: PGP signature


Re: [gentoo-dev] dont use `which` in ebuilds

2007-03-12 Thread Mike Frysinger
On Monday 12 March 2007, Mike Frysinger wrote:
 instead, since we require bash for our ebuilds, use the builtin `type -p`

err i botched that ;)

`type -p` is almost a complete drop in replacement for which ... it does not 
work on bash builtins however, so people should use `type -P` to force the 
PATH search

in other words, `type -p echo` would return  while `type -P echo` would 
return /bin/echo
-mike


pgpc7IwJ2qSvR.pgp
Description: PGP signature


Re: [gentoo-dev] dont use `which` in ebuilds

2007-03-12 Thread Thomas de Grenier de Latour
On 2007/03/12, Ned Ludd [EMAIL PROTECTED] wrote:

 Matches `which 
 ...
 And matches $(which 
 ...

Also there are some occurences in eclasses:

./eclass/enlightenment.eclass: 
   cp $(which gettextize) ${T}/ || die could not copy gettextize
./eclass/fortran.eclass: 
   elif [ -x $(which ifc 2 /dev/null) ]; then
./eclass/fortran.eclass: 
   if [ -x $(which f2c 2 /dev/null) ]; then
./eclass/fortran.eclass: 
   if [ -x $(which g77 2 /dev/null) ]; then
./eclass/fortran.eclass: 
   if [ -x $(which gfortran 2 /dev/null) ]; then
./eclass/fortran.eclass: 
   if [ -x $(which ifort 2 /dev/null) ]; then
./eclass/ghc-package.eclass: 
   echo $(which ghc)
./eclass/ghc-package.eclass: 
   echo $(which ghc-pkg)
./eclass/haskell-cabal.eclass: 
   sed -i s|$(ghc-getghcpkg)|$(which true)| .setup-config
./eclass/kde.eclass:
   export WHICH=which
./eclass/mysql.eclass: 
   -DCMAKE_C_COMPILER=$(which $(tc-getCC)) \
./eclass/mysql.eclass: 
   -DCMAKE_CXX_COMPILER=$(which $(tc-getCC)) \
./eclass/vdr-plugin.eclass: 
   if which md5sum /dev/null 21; then
./eclass/vim-doc.eclass: 
   vim=$(which vim 2/dev/null)
./eclass/vim-doc.eclass: 
   [[ -z $vim ]]  vim=$(which gvim 2/dev/null)
./eclass/vim-doc.eclass: 
   [[ -z $vim ]]  vim=$(which kvim 2/dev/null)
./eclass/vim.eclass: 
   export ac_cv_prog_STRIP=$(which true ) faking strip


And in a few more ebuilds (if which, plus a few weirdnesses):

./app-i18n/scim-qtimm/scim-qtimm-0.8.95.ebuild: 
   if which kde-config /dev/null 21 ; then
./app-i18n/scim-qtimm/scim-qtimm-0.9.3.ebuild: 
   if which kde-config /dev/null 21 ; then
./dev-ml/findlib/findlib-1.0.4-r1.ebuild: 
   if ( use tk  which ocaml  ! which labltk ); then
./dev-scheme/kawa/kawa-1.6.97.ebuild: 
   which javac
./dev-scheme/kawa/kawa-1.7.ebuild: 
   which javac
./sci-libs/plplot/plplot-5.5.2.ebuild:
   use fortran  ! use ifc || if [ -z 'which g77' ]; then
./sci-visualization/xd3d/xd3d-8.2.1.ebuild: 
   which g77 2 /dev/null || die No GNU Fortran compiler found!
./sys-apps/discover/discover-2.0.2.ebuild:  
   if which docbook2man 2/dev/null ; then
./sys-apps/discover/discover-2.0.2.ebuild:  
   if ! which docbook-to-man 2/dev/null ; then

--
TGL.
-- 
gentoo-dev@gentoo.org mailing list



Re: [gentoo-dev] dont use `which` in ebuilds

2007-03-12 Thread Danny van Dyk
Am Dienstag, 13. März 2007 00:36 schrieb Ned Ludd:
   instead, since we require bash for our ebuilds, use the builtin
   `type -p`
 
  err i botched that ;)
 
  `type -p` is almost a complete drop in replacement for which ... it
  does not work on bash builtins however, so people should use `type
  -P` to force the PATH search
 
  in other words, `type -p echo` would return  while `type -P echo`
  would return /bin/echo
  -mike

 Quick search shows the following ebuilds are abusing this behavior.

 Matches `which 

 sci-chemistry/molden/molden-4.3.ebuild:30:
 sci-libs/blas-atlas/blas-atlas-3.6.0-r1.ebuild:33:
 sci-libs/blas-atlas/blas-atlas-3.6.0-r2.ebuild:34:
 sci-libs/blas-atlas/blas-atlas-3.6.0.ebuild:28:
 sci-libs/lapack-atlas/lapack-atlas-3.6.0.ebuild:64:
 sci-libs/lapack-reference/lapack-reference-3.0.ebuild:52:
 sci-mathematics/octave/octave-2.1.57-r1.ebuild:34:
 sci-mathematics/octave/octave-2.1.69.ebuild:36:
^^^ fixed.

 And matches $(which 
 sci-geosciences/grass/grass-6.2.0-r1.ebuild:111:
 sci-geosciences/mapserver/mapserver-4.10.0.ebuild:106:
 sci-misc/boinc/boinc-4.72.20050813-r3.ebuild:56:
 sci-misc/boinc/boinc-5.2.14.ebuild:57:
 sci-misc/boinc/boinc-5.4.11.ebuild:53:
 sci-misc/boinc/boinc-5.5.6.ebuild:59:
^^^ fixed as well.

Danny
-- 
Danny van Dyk [EMAIL PROTECTED]
Gentoo/AMD64 Project, Gentoo Scientific Project
--
gentoo-dev@gentoo.org mailing list



Re: [gentoo-dev] dont use `which` in ebuilds

2007-03-12 Thread Danny van Dyk
Am Dienstag, 13. März 2007 01:14 schrieb Thomas de Grenier de Latour:
 On 2007/03/12, Ned Ludd [EMAIL PROTECTED] wrote:
  Matches `which 
  ...
  And matches $(which 
  ...

 Also there are some occurences in eclasses:

 ./eclass/fortran.eclass:
elif [ -x $(which ifc 2 /dev/null) ]; then
 ./eclass/fortran.eclass:
if [ -x $(which f2c 2 /dev/null) ]; then
 ./eclass/fortran.eclass:
if [ -x $(which g77 2 /dev/null) ]; then
 ./eclass/fortran.eclass:
if [ -x $(which gfortran 2 /dev/null) ]; then
 ./eclass/fortran.eclass:
if [ -x $(which ifort 2 /dev/null) ]; then
^^^ fixed.


 And in a few more ebuilds (if which, plus a few weirdnesses):

 ./sci-libs/plplot/plplot-5.5.2.ebuild:
use fortran  ! use ifc || if [ -z 'which g77' ]; then
 ./sci-visualization/xd3d/xd3d-8.2.1.ebuild:
which g77 2 /dev/null || die No GNU Fortran compiler found!
^^^ fixed, too.

Danny
-- 
Danny van Dyk [EMAIL PROTECTED]
Gentoo/AMD64 Project, Gentoo Scientific Project
--
gentoo-dev@gentoo.org mailing list



Re: [gentoo-dev] dont use `which` in ebuilds

2007-03-12 Thread Mike Kelly
On Tue, 13 Mar 2007 01:14:54 +0100
Thomas de Grenier de Latour [EMAIL PROTECTED] wrote:

 Also there are some occurences in eclasses:
 ./eclass/vim-doc.eclass: 
vim=$(which vim 2/dev/null)
 ./eclass/vim-doc.eclass: 
[[ -z $vim ]]  vim=$(which gvim 2/dev/null)
 ./eclass/vim-doc.eclass: 
[[ -z $vim ]]  vim=$(which kvim 2/dev/null)
 ./eclass/vim.eclass: 
export ac_cv_prog_STRIP=$(which true ) faking strip

Fixed.

-- 
Mike Kelly
-- 
gentoo-dev@gentoo.org mailing list



Re: [gentoo-dev] dont use `which` in ebuilds

2007-03-12 Thread Chris Gianelloni
On Mon, 2007-03-12 at 16:36 -0700, Ned Ludd wrote:
 games-emulation/advancemame/advancemame-0.104.0.ebuild:35:
 games-emulation/advancemame/advancemame-0.104.0.ebuild:37:
 games-emulation/advancemame/advancemame-0.104.0.ebuild:39:
 games-emulation/advancemame/advancemame-0.106.0.ebuild:40:
 games-emulation/advancemame/advancemame-0.106.0.ebuild:42:
 games-emulation/advancemame/advancemame-0.106.0.ebuild:44:
 games-emulation/advancemenu/advancemenu-2.4.13.ebuild:42:
 games-emulation/advancemenu/advancemenu-2.4.13.ebuild:43:
 games-emulation/advancemenu/advancemenu-2.4.13.ebuild:44:
 games-fps/doomsday/doomsday-1.9.0_beta5.ebuild:32:
 games-fps/quake2-icculus/quake2-icculus-0.16.1-r1.ebuild:72:
 games-fps/quake2-icculus/quake2-icculus-0.16.1.ebuild:51:
 games-mud/tkmoo/tkmoo-0.3.32.ebuild:32:
 games-strategy/boson/boson-0.13.ebuild:43:
 games-strategy/boson/boson-0.13.ebuild:44:

Done.

-- 
Chris Gianelloni
Release Engineering Strategic Lead
Alpha/AMD64/x86 Architecture Teams
Games Developer/Council Member/Foundation Trustee
Gentoo Foundation


signature.asc
Description: This is a digitally signed message part


Re: [gentoo-dev] dont use `which` in ebuilds

2007-03-12 Thread Yuri Vasilevski
On Mon, 12 Mar 2007 16:36:03 -0700
Ned Ludd [EMAIL PROTECTED] wrote:

 And matches $(which 
 x11-misc/xoo/xoo-0.7.ebuild:25:

Fixed.

Best wishes,
Yuri.
-- 
gentoo-dev@gentoo.org mailing list



Re: [gentoo-dev] dont use `which` in ebuilds

2007-03-12 Thread Andrew Ross
Ned Ludd wrote:
 On Mon, 2007-03-12 at 19:15 -0400, Mike Frysinger wrote:
 On Monday 12 March 2007, Mike Frysinger wrote:
 instead, since we require bash for our ebuilds, use the builtin `type -p`

 `type -p` is almost a complete drop in replacement for which ... it does not 
 work on bash builtins however, so people should use `type -P` to force the 
 PATH search

 Quick search shows the following ebuilds are abusing this behavior.


 app-emulation/xen-tools/xen-tools-3.0.2-r3.ebuild:57:
 app-emulation/xen-tools/xen-tools-3.0.2-r4.ebuild:52:

Fixed.

Cheers

Andrew



signature.asc
Description: OpenPGP digital signature