Re: make search oddity

2004-07-09 Thread Mark Frank
* On Thu, Jul 08, 2004 at 10:05:35PM +0100 Matthew Seaman wrote:
 On Thu, Jul 08, 2004 at 04:23:14PM -0400, Mark Frank wrote:
  # make search icase=1 name=phpmyadmin display=name,path,maint
  
  # make search icase=1 name=phpMyAdmin display=name,path,maint
  Port:   phpMyAdmin-2.5.7.1
  Path:   /usr/ports/databases/phpmyadmin
  Maint:  [EMAIL PROTECTED]
  
  
  Am I being dense here?
 
 Most odd.  The search target works by substituting the values you give
 on the make command line into an awk script, which pulls the data out
 of /usr/ports/INDEX (or INDEX-5 on 5.x) and formats it as required.
 It's all in /usr/ports/Mk/bsd.port.subdir.mk
 
 Do you have PORTSEARCH_IGNORECASE defined in your environment or in
 /etc/make.conf ?  Not that that would make any difference to the
 result above, as using icase on the command line will override that
 value.

I don't but I did try it when you sent me to /usr/ports/CHANGES
for a read.

 
 Hmmm... what awk(1) program is first on your path?  And if it isn't
 the default version supplied with the system (/usr/bin/awk -- in 4.10
 this is actually GNU Awk 3.0.6) does it support 'IGNORECASE'?  There's
 this little snippet in the awk(1) man page:
 
NOTE: In versions of gawk prior  to  3.0,  IGNORECASE  only
affected  regular  expression  operations.   It now affects
string comparisons as well.

I only have one copy of awk on the box.  Things like awk I usually take
for granted and don't think about.  Here's what I think I see, please
correct me if I'm wrong.

On all my 5.2.1-RELEASE boxes the version of awk appears to be the
one-true-awk which I believe is the old ATT/Lucent awk.  I don't know
how to extract the exact version number but obviously doesn't support
IGNORECASE.  I've never done anything intentionally to change versions
of awk on any of these.

The only 4.x system I have is a 4.8 box which has never gone through a
buildworld/installworld cycle (it's a poor old Pentium that's just used
as a caching DNS server in my LAN) and it does have GNU Awk 3.0.6 on it.
If I did a buildworld/installworld on it, would it use the Makefile in
/usr/src/usr.bin/awk, which seems to point to the source for the
one-true-awk?

I do see the GNU version of awk in ports, gawk-3.1.1_1.  Should I be
using that?  Will it break something else if I install it and link
/usr/bin/awk to it?

Yes, I'm confused.

Mark

-- 
Mark Frank
The fix is only temporary...unless it works. - Red Green
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: make search oddity

2004-07-09 Thread Matthew Seaman
On Fri, Jul 09, 2004 at 03:22:45PM -0400, Mark Frank wrote:
 * On Thu, Jul 08, 2004 at 10:05:35PM +0100 Matthew Seaman wrote:

  Hmmm... what awk(1) program is first on your path?  And if it isn't
  the default version supplied with the system (/usr/bin/awk -- in 4.10
  this is actually GNU Awk 3.0.6) does it support 'IGNORECASE'?  There's
  this little snippet in the awk(1) man page:
  
 NOTE: In versions of gawk prior  to  3.0,  IGNORECASE  only
 affected  regular  expression  operations.   It now affects
 string comparisons as well.
 
 I only have one copy of awk on the box.  Things like awk I usually take
 for granted and don't think about.  Here's what I think I see, please
 correct me if I'm wrong.

If you're using the version of awk supplied with the system and the
systems you're running aren't hugely out of date, then you shouldn't
have a problem.
 
 On all my 5.2.1-RELEASE boxes the version of awk appears to be the
 one-true-awk which I believe is the old ATT/Lucent awk.  I don't know
 how to extract the exact version number but obviously doesn't support
 IGNORECASE.  I've never done anything intentionally to change versions
 of awk on any of these.

Hmmm... The 5.x awk(1) man page certainly doesn't mention IGNORECASE
(which is a GNU extension and not in the POSIX awk specification). I
do think it odd that all those improvements to the ports search
facility should have been committed with a large chunk of
functionality not working under 5.x.  None the less, that appears to
have been the case.

IGNORECASE support hasn't been added to the one-true-awk in 5.x as far
as I can tell.  I can find no mention of it searching through the
sources via cvsweb.cgi -- mind you, that may well be because I just
didn't manage to search very effectively.  Could you try running this
command on a 5.x system?

% echo aB | awk 'BEGIN { IGNORECASE=1; } /ab/ { print IGNORECASE works }'

On 4.x that prints out 'IGNORECASE works' -- from what you've said,
I'd expect no output on 5.x

Looks like you've spotted a bug.  

 The only 4.x system I have is a 4.8 box which has never gone through a
 buildworld/installworld cycle (it's a poor old Pentium that's just used
 as a caching DNS server in my LAN) and it does have GNU Awk 3.0.6 on it.
 If I did a buildworld/installworld on it, would it use the Makefile in
 /usr/src/usr.bin/awk, which seems to point to the source for the
 one-true-awk?

No -- 4.x uses and will use GNU awk all the way.  It's one of those
policy things: not to make potentially disruptive changes like
replacing an important application with one using a completely
different software base within the life of a system major version.

With 5.x they've switched to a BSD licensed awk(1) implementation.
They're going to do much the same with tar(1), if they haven't already
-- so long as they can make the switch before 5.3 goes stable.  If
they miss that, bsdtar will have to wait until 6.x.  Ultimately the
idea is to provide a purely BSD licensed system, but it will be quite
a long time before there's a suitable replacement for gcc(1) and the
rest of the compiler toolchain available.

 I do see the GNU version of awk in ports, gawk-3.1.1_1.  Should I be
 using that?  Will it break something else if I install it and link
 /usr/bin/awk to it?

You can certainly install gawk from ports if you want, but I wouldn't
go replacing the system version with it -- awk(1) is vital for
rebuilding world, kernel and you wouldn't want to run the risk of
breaking that.  After all, being able to do a case insensitive search
of the ports INDEX is not actually that important in the grand scheme
of things.

Cheers,

Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.   26 The Paddocks
  Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey Marlow
Tel: +44 1628 476614  Bucks., SL7 1TH UK


pgplXycw4pfLm.pgp
Description: PGP signature


Re: make search oddity

2004-07-09 Thread Mark Frank
* On Fri, Jul 09, 2004 at 09:47:35PM +0100 Matthew Seaman wrote:
 IGNORECASE support hasn't been added to the one-true-awk in 5.x as far
 as I can tell.  I can find no mention of it searching through the
 sources via cvsweb.cgi -- mind you, that may well be because I just
 didn't manage to search very effectively.  Could you try running this
 command on a 5.x system?
 
 % echo aB | awk 'BEGIN { IGNORECASE=1; } /ab/ { print IGNORECASE works }'
 
 On 4.x that prints out 'IGNORECASE works' -- from what you've said,
 I'd expect no output on 5.x

True.  No output.

 Looks like you've spotted a bug.  

Great.  Then I'm not crazy...in this matter anyway.

 
 You can certainly install gawk from ports if you want, but I wouldn't
 go replacing the system version with it -- awk(1) is vital for
 rebuilding world, kernel and you wouldn't want to run the risk of
 breaking that.  After all, being able to do a case insensitive search
 of the ports INDEX is not actually that important in the grand scheme
 of things.

That's what I thought.  Thanks for the confirmation.

-- 
Mark Frank
The fix is only temporary...unless it works. - Red Green
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


make search oddity

2004-07-08 Thread Mark Frank
This isn't a life or death situation but it's the first time I've
noticed this oddity.  I've always used make search name= from
/usr/ports to find a particular port to install but it seemed to fail
finding phpMyAdmin.

This is on a 5.2.1-RELEASE-p9 box where I cvsup the ports tree nightly.


# cd /usr/ports

# make search name=phpmyadmin

# make search name=php | grep phpmyadmin -B 1 -A 4
Port:   phpMyAdmin-2.5.7.1
Path:   /usr/ports/databases/phpmyadmin
Info:   A set of PHP-scripts to administer MySQL over the web
Maint:  [EMAIL PROTECTED]
B-deps: 
R-deps: apache-1.3.31_2 expat-1.95.7 mod_php4-4.3.7_3,1
mysql-client-4.0.20 perl-5.8.4


Then I thought about the possibility of case sensitivity:


# make search name=phpMyAdmin
Port:   phpMyAdmin-2.5.7.1
Path:   /usr/ports/databases/phpmyadmin
Info:   A set of PHP-scripts to administer MySQL over the web
Maint:  [EMAIL PROTECTED]
B-deps: 
R-deps: apache-1.3.31_2 expat-1.95.7 mod_php4-4.3.7_3,1
mysql-client-4.0.20 perl-5.8.4


I didn't think this used to be case sensitive so I tried it on a
5.2-RELEASE development box that hasn't had anything, ports or
otherwise, updated since January.


# make search name=phpmyadmin
Port:   phpMyAdmin-2.5.4
Path:   /usr/ports/databases/phpmyadmin
Info:   A set of PHP-scripts to adminstrate MySQL over the web
Maint:  [EMAIL PROTECTED]
Index:  databases www
B-deps:
R-deps: apache-1.3.29_1 expat-1.95.6_1 mysql-client-4.0.16 perl-5.6.1_15
php4-4.3.4_2


Hmmm.  Not case sensitive.  I notice /usr/ports/README mentions make
search key= but not make search name=.  Has something changed or is it just me?

Mark

-- 
Mark Frank
The fix is only temporary...unless it works. - Red Green
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: make search oddity

2004-07-08 Thread Matthew Seaman
On Thu, Jul 08, 2004 at 01:29:16PM -0400, Mark Frank wrote:
 This isn't a life or death situation but it's the first time I've
 noticed this oddity.  I've always used make search name= from
 /usr/ports to find a particular port to install but it seemed to fail
 finding phpMyAdmin.
 
 This is on a 5.2.1-RELEASE-p9 box where I cvsup the ports tree nightly.
 
 
   # cd /usr/ports
   
   # make search name=phpmyadmin
   
   # make search name=php | grep phpmyadmin -B 1 -A 4
   Port:   phpMyAdmin-2.5.7.1
   Path:   /usr/ports/databases/phpmyadmin
   Info:   A set of PHP-scripts to administer MySQL over the web
   Maint:  [EMAIL PROTECTED]
   B-deps: 
   R-deps: apache-1.3.31_2 expat-1.95.7 mod_php4-4.3.7_3,1
   mysql-client-4.0.20 perl-5.8.4

You called?

Actually, yes,the search capability in ports was updated and expanded
quite a bit recently.  Read all about it in the /usr/ports/CHANGES
file.

You can now do:

% make search icase=1 name=phpmyadmin display=name,path,maint
Port:   phpMyAdmin-2.5.7.1
Path:   /usr/ports/databases/phpmyadmin
Maint:  [EMAIL PROTECTED]

Cheers,

Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.   26 The Paddocks
  Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey Marlow
Tel: +44 1628 476614  Bucks., SL7 1TH UK


pgpmeKdCbegiz.pgp
Description: PGP signature


Re: make search oddity

2004-07-08 Thread Mark Frank
* On Thu, Jul 08, 2004 at 08:22:45PM +0100 Matthew Seaman wrote:
 On Thu, Jul 08, 2004 at 01:29:16PM -0400, Mark Frank wrote:
  This isn't a life or death situation but it's the first time I've
  noticed this oddity.  I've always used make search name= from
  /usr/ports to find a particular port to install but it seemed to fail
  finding phpMyAdmin.
  
  This is on a 5.2.1-RELEASE-p9 box where I cvsup the ports tree nightly.
 
 Actually, yes,the search capability in ports was updated and expanded
 quite a bit recently.  Read all about it in the /usr/ports/CHANGES
 file.
 
 You can now do:
 
 % make search icase=1 name=phpmyadmin display=name,path,maint
 Port:   phpMyAdmin-2.5.7.1
 Path:   /usr/ports/databases/phpmyadmin
 Maint:  [EMAIL PROTECTED]

I've (now) read /usr/ports/CHANGES but the behavior for me isn't
matching.

# pwd
/usr/ports

# make search icase=1 name=phpmyadmin display=name,path,maint

# make search icase=1 name=phpMyAdmin display=name,path,maint
Port:   phpMyAdmin-2.5.7.1
Path:   /usr/ports/databases/phpmyadmin
Maint:  [EMAIL PROTECTED]


Am I being dense here?

Mark

-- 
Mark Frank
The fix is only temporary...unless it works. - Red Green
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: make search oddity

2004-07-08 Thread Matthew Seaman
On Thu, Jul 08, 2004 at 04:23:14PM -0400, Mark Frank wrote:
 * On Thu, Jul 08, 2004 at 08:22:45PM +0100 Matthew Seaman wrote:
  On Thu, Jul 08, 2004 at 01:29:16PM -0400, Mark Frank wrote:
   This isn't a life or death situation but it's the first time I've
   noticed this oddity.  I've always used make search name= from
   /usr/ports to find a particular port to install but it seemed to fail
   finding phpMyAdmin.
   
   This is on a 5.2.1-RELEASE-p9 box where I cvsup the ports tree nightly.
  
  Actually, yes,the search capability in ports was updated and expanded
  quite a bit recently.  Read all about it in the /usr/ports/CHANGES
  file.
  
  You can now do:
  
  % make search icase=1 name=phpmyadmin display=name,path,maint
  Port:   phpMyAdmin-2.5.7.1
  Path:   /usr/ports/databases/phpmyadmin
  Maint:  [EMAIL PROTECTED]
 
 I've (now) read /usr/ports/CHANGES but the behavior for me isn't
 matching.
 
   # pwd
   /usr/ports
 
   # make search icase=1 name=phpmyadmin display=name,path,maint
 
   # make search icase=1 name=phpMyAdmin display=name,path,maint
   Port:   phpMyAdmin-2.5.7.1
   Path:   /usr/ports/databases/phpmyadmin
   Maint:  [EMAIL PROTECTED]
 
 
 Am I being dense here?

Most odd.  The search target works by substituting the values you give
on the make command line into an awk script, which pulls the data out
of /usr/ports/INDEX (or INDEX-5 on 5.x) and formats it as required.
It's all in /usr/ports/Mk/bsd.port.subdir.mk

Do you have PORTSEARCH_IGNORECASE defined in your environment or in
/etc/make.conf ?  Not that that would make any difference to the
result above, as using icase on the command line will override that
value.

Hmmm... what awk(1) program is first on your path?  And if it isn't
the default version supplied with the system (/usr/bin/awk -- in 4.10
this is actually GNU Awk 3.0.6) does it support 'IGNORECASE'?  There's
this little snippet in the awk(1) man page:

   NOTE: In versions of gawk prior  to  3.0,  IGNORECASE  only
   affected  regular  expression  operations.   It now affects
   string comparisons as well.

Cheers,

Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.   26 The Paddocks
  Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey Marlow
Tel: +44 1628 476614  Bucks., SL7 1TH UK


pgpGcmJ3x3ltS.pgp
Description: PGP signature