Re: [Fink-devel] Re: [Fink-beginners] undefined value as filehandle reference at /sw/lib/perl5/Fink/Package.pm line 36

2005-02-25 Thread Daniel Macks
On Fri, Feb 25, 2005 at 03:12:11PM -0500, Dave Vasilevsky wrote:
> 
> On Feb 25, 2005, at 10:24 AM, Daniel Macks wrote:
> > open APTDUMP, "$basepath/bin/apt-cache dump |"
> 
> Perl usually discourages this form, since if someone could convince 
> $basepath to bstart with ">" it might do bad things.

I did it that way to be consistent with all our open/read-pipe usage.

> Why not stick with this?
> 
> open APTDUMP, "-|", "$basepath/bin/apt-cache dump";
> 
> Still not super (since ugly basepaths with spaces can still fail), but 
> a bit better and it works with both perls.

True. We already know that spaces in $basepath are a hopeless case, so
no loss. Maybe what we really need is to implement them all as a new
Services::read_pipe_cmd(($cmd) that either returns a filehandle ready
to read or prints a warning and returns an undef. That way we could
use Symbol::gensym or maybe IO::* objects with intelligent scoping and
do away from all those FILEHANDLE symbols.

dan

-- 
Daniel Macks
[EMAIL PROTECTED]
http://www.netspace.org/~dmacks



---
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
___
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-devel


Re: [Fink-devel] Re: [Fink-beginners] undefined value as filehandle reference at /sw/lib/perl5/Fink/Package.pm line 36

2005-02-25 Thread Dave Vasilevsky
On Feb 25, 2005, at 10:24 AM, Daniel Macks wrote:
 open APTDUMP, "$basepath/bin/apt-cache dump |"
Perl usually discourages this form, since if someone could convince 
$basepath to bstart with ">" it might do bad things.

Why not stick with this?
open APTDUMP, "-|", "$basepath/bin/apt-cache dump";
Still not super (since ugly basepaths with spaces can still fail), but 
a bit better and it works with both perls.

Dave


PGP.sig
Description: This is a digitally signed message part


[Fink-devel] Re: [Fink-beginners] undefined value as filehandle reference at /sw/lib/perl5/Fink/Package.pm line 36

2005-02-25 Thread Robert Wyatt
Daniel Macks wrote:
Sure 'nuf! Does:
 open APTDUMP, "$basepath/bin/apt-cache dump |"
function correctly? That's the canonical form we use elsewhere.
Yes, it does work.

---
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
___
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-devel


Re: [Fink-devel] Re: [Fink-beginners] undefined value as filehandle reference at /sw/lib/perl5/Fink/Package.pm line 36

2005-02-25 Thread Daniel Macks
On Fri, Feb 25, 2005 at 10:21:46AM +0100, Martin Costabel wrote:
> Robert Wyatt wrote:
> >Howdy,
> >
> >I updated my 10.2-gcc3.3 to 0.24.0 today and something didn't work out 
> >quite right. How do I proceed with this one?
> []
> >Failed: Can't use an undefined value as filehandle reference at 
> >/sw/lib/perl5/Fink/Package.pm line 360.
> 
> Do you have UseBinaryDist: true in your /sw/etc/fink.conf? If yes, set 
> it to false while this bug is being fixed.
> 
> Or, if you feel more adventurous, you can also try to fix it yourself 
> (no guarantee!):
> 
> Edit the line in question, for example by running
> 
>   sudo vi +360 /sw/lib/perl5/Fink/Package.pm
> 
> and change it from
> 
> open APTDUMP, '-|', "$basepath/bin/apt-cache", "dump"
> to
> open APTDUMP, '-|', "$basepath/bin/apt-cache dump"
> 
> I am CCing this to fink-devel so that it gets fixed soon.
> (Explanation: perl-5.6.x doesn't seem to understand the open command 
> with more than 3 arguments.)

Sure 'nuf! Does:

 open APTDUMP, "$basepath/bin/apt-cache dump |"

function correctly? That's the canonical form we use elsewhere.

dan

-- 
Daniel Macks
[EMAIL PROTECTED]
http://www.netspace.org/~dmacks



---
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
___
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-devel


[Fink-devel] Re: [Fink-beginners] undefined value as filehandle reference at /sw/lib/perl5/Fink/Package.pm line 36

2005-02-25 Thread Robert T Wyatt
Martin,
Yes, I have UseBinaryDist: true in fink.conf.
I changed the line in question per your instructions below, and 
everything is copacetic.

Thanks! --robert
At 10:21 AM +0100 2/25/05, Martin Costabel wrote:
Robert Wyatt wrote:
Do you have UseBinaryDist: true in your /sw/etc/fink.conf? If yes, 
set it to false while this bug is being fixed.

Or, if you feel more adventurous, you can also try to fix it 
yourself (no guarantee!):

Edit the line in question, for example by running
  sudo vi +360 /sw/lib/perl5/Fink/Package.pm
and change it from
open APTDUMP, '-|', "$basepath/bin/apt-cache", "dump"
to
open APTDUMP, '-|', "$basepath/bin/apt-cache dump"
I am CCing this to fink-devel so that it gets fixed soon.
(Explanation: perl-5.6.x doesn't seem to understand the open command 
with more than 3 arguments.)

---
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
___
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-devel


[Fink-devel] Re: [Fink-beginners] undefined value as filehandle reference at /sw/lib/perl5/Fink/Package.pm line 36

2005-02-25 Thread Martin Costabel
Robert Wyatt wrote:
Howdy,
I updated my 10.2-gcc3.3 to 0.24.0 today and something didn't work out 
quite right. How do I proceed with this one?
[]
Failed: Can't use an undefined value as filehandle reference at 
/sw/lib/perl5/Fink/Package.pm line 360.
Do you have UseBinaryDist: true in your /sw/etc/fink.conf? If yes, set 
it to false while this bug is being fixed.

Or, if you feel more adventurous, you can also try to fix it yourself 
(no guarantee!):

Edit the line in question, for example by running
  sudo vi +360 /sw/lib/perl5/Fink/Package.pm
and change it from
open APTDUMP, '-|', "$basepath/bin/apt-cache", "dump"
to
open APTDUMP, '-|', "$basepath/bin/apt-cache dump"
I am CCing this to fink-devel so that it gets fixed soon.
(Explanation: perl-5.6.x doesn't seem to understand the open command 
with more than 3 arguments.)

Thanks,
Robert
bash-2.05b$ date; nice fink -b selfupdate; nice fink list -i; gcc 
--version | head -n 1; fink -V | head -n 2; sw_vers; uname -m; date
Thu Feb 24 21:34:59 CST 2005
rsync -az -q  rsync://msn.wi.us.finkmirrors.net/finkinfo//TIMESTAMP 
/sw/fink/TIMESTAMP.tmp
I will now run the rsync command to retrieve the latest package 
descriptions.
rsync -rtz --delete-after --delete -q   --include='10.2-gcc3.3/' 
--include='10.2-gcc3.3/stable/' --include='10.2-gcc3.3/stable/main/' 
--include='10.2-gcc3.3/stable/main/finkinfo/' 
--include='10.2-gcc3.3/stable/main/finkinfo/*/' 
--include='10.2-gcc3.3/stable/main/finkinfo/*' 
--include='10.2-gcc3.3/stable/main/finkinfo/**/*' 
--include='10.2-gcc3.3/' --include='10.2-gcc3.3/stable/' 
--include='10.2-gcc3.3/stable/crypto/' 
--include='10.2-gcc3.3/stable/crypto/finkinfo/' 
--include='10.2-gcc3.3/stable/crypto/finkinfo/*/' 
--include='10.2-gcc3.3/stable/crypto/finkinfo/*' 
--include='10.2-gcc3.3/stable/crypto/finkinfo/**/*' 
--include='10.2-gcc3.3/' --include='10.2-gcc3.3/unstable/' 
--include='10.2-gcc3.3/unstable/crypto/' 
--include='10.2-gcc3.3/unstable/crypto/finkinfo/' 
--include='10.2-gcc3.3/unstable/crypto/finkinfo/*/' 
--include='10.2-gcc3.3/unstable/crypto/finkinfo/*' 
--include='10.2-gcc3.3/unstable/crypto/finkinfo/**/*' 
--include='10.2-gcc3.3/' --include='10.2-gcc3.3/unstable/' 
--include='10.2-gcc3.3/unstable/main/' 
--include='10.2-gcc3.3/unstable/main/finkinfo/' 
--include='10.2-gcc3.3/unstable/main/finkinfo/*/' 
--include='10.2-gcc3.3/unstable/main/finkinfo/*' 
--include='10.2-gcc3.3/unstable/main/finkinfo/**/*' --include='VERSION' 
--include='DISTRIBUTION' --include='README' --exclude='**' 
'rsync://msn.wi.us.finkmirrors.net/finkinfo' '/sw/fink/'
/usr/bin/find '/sw/fink/10.2-gcc3.3/stable/main' -name CVS -type d 
-print0 | xargs -0 /bin/rm -rf
/usr/bin/find '/sw/fink/10.2-gcc3.3/stable/crypto' -name CVS -type d 
-print0 | xargs -0 /bin/rm -rf
/usr/bin/find '/sw/fink/10.2-gcc3.3/unstable/crypto' -name CVS -type d 
-print0 | xargs -0 /bin/rm -rf
/usr/bin/find '/sw/fink/10.2-gcc3.3/unstable/main' -name CVS -type d 
-print0 | xargs -0 /bin/rm -rf
Downloading the indexes of available packages in the binary distribution.
/sw/bin/apt-get -qq update
Reading package info...
Failed: Can't use an undefined value as filehandle reference at 
/sw/lib/perl5/Fink/Package.pm line 360.
Fink has detected that your package index cache is missing or out of 
date, but does not have privileges to modify it. Re-run fink as root, 
for example with a "fink index" command,
to update the cache.
Reading package info...
Failed: Can't use an undefined value as filehandle reference at 
/sw/lib/perl5/Fink/Package.pm line 360.
gcc (GCC) 3.3 20030304 (Apple Computer, Inc. build 1493)
Package manager version: 0.24.0
Distribution version: 0.6.3.rsync
ProductName:Mac OS X
ProductVersion: 10.2.8
BuildVersion:   6R73
Power Macintosh
Thu Feb 24 21:35:55 CST 2005
bash-2.05b$ fink index
Reading package info...
Failed: Can't use an undefined value as filehandle reference at 
/sw/lib/perl5/Fink/Package.pm line 360.
bash-2.05b$
--
Martin

---
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
___
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-devel