> Douglas Kline <[EMAIL PROTECTED]> said:
> >> Douglas Kline <[EMAIL PROTECTED]> said:
> >> >
> >> > Now I'm getting a different error: The variable basepath is being defin
ed
> > to
> >> > its own name as a value in Engine.pm. When Engine.pm starts, the varia
ble
> > is
> >> > undefined. In the initialize sub-routine in Engine.pm it's defined in t
he
> >> > command
> >> >
> >> > $self->{basepath} = $basepath = $config->param("basepath")
> >> >
> >> > to its own name which, of course, leads to an error.
> >> >
> >> > Earlier tests before I ran into this problem showed that fink was able t
o
> >> > locate the pathnames correctly in at least some cases. Any ideas as to
wha
> > t's
> >> > going wrong here? Should that sub-routine in Engine.pm be getting the c
orr
> > ect
> >> > value from somewhere or should it be set elsewhere?
> >>
> >> I don't understand that analysis. The $config object, which is a
> >> Config not an Engine, was established in Engine::new_with_config().
> >> What's the exact error you're getting? Insert some print statements
> >> there to see what the values are.
> >
> >
> > The error I get is:
> >
> > Failed: Can't cd to basepath/fink: No such file or directory
> >
> > I had already tried the print statements. Near the beginning of Engine.pm,
> > just before the line
> >
> > END { } # module clean-up code here (global destruc
tor)
> [...added...]
> > &print_breaking("ENGINE: basepath is $basepath.");
> [...gives...]
> > Use of uninitialized value in concatenation (.) or string at
> > /a/kodos/DataCenter/FINK/src/fink.build/fink-0.24.10-21/t/basepath/lib/perl
5/Fi
> > nk/Engine.pm line 125.
> > basepath is .
>
> That's not really useful or relevant: the $basepath variable isn't in
> scope there. Well actually it is highly useful, as now I know that
> you're using a fairly old version of fink. And that you're talking
> about a problem that's happening during fink's self-test, not during
> fink runtime?
I downloaded fink-0.8.0-full-XCode-2.1 source from
http://fink.sourceforge.net/download/. It seemed to be the right version for
our system which runs Darwin Kernel Version 8.6.0. Would we be better off
with another version?
The error occurs when I run
src/fink.build/fink-0.24.10-21/fink selfupdate
The error occurs during the Engine.pm execution in the process sub-routine.
The test condition
if ($proc_rc->{'$@'})
seems to give rise to the error and the error message
Failed: Can't cd to basepath/fink: No such file or directory
is output by the command
print "Failed: " . $proc_rc->{'$@'};
So far as I can tell, the process sub-routine isn't called from within
Engine.pm which contains that sub-routine although I can't be sure given the
possibilities of variables' being defined elsewhere and used within Engine.pm.
There are no diagnostic messages indicating that this is a self-test which is
automatically run at the beginning of a selfupdate. Is that in fact what is
happening?
> > Inside the initialize sub-routine, just before the end of the sub-routine,
the
> > output of the same diagnostic command is:
> >
> > basepath is basepath.
> >
> > So now the variable has its own name as a value. Inside the process
> > sub-routine, just before the if-statement that runs restart_as_root which I
've
> > commented out, the output of the diagnostic command is the same as the prev
ious
> > case. Then I get the error message from the cd command.
> >
> > I'll look into the new_with_config sub-routine. However it seems that the
> > commands I've cited show that the variable is being defined in Engine.pm.
>
> Right. In certain subroutines and scopes, based on values passed from
> the callers of those subs. Gotta trace backward to see where it's
> being defined. Carp::cluck is very useful for that. At least at
> certain points in the self-test, "basepath" is a reasonable value for
> $basepath.
Is Carp::cluck part of this distribution? I found mention of Carp in
use Carp;
commands but not of cluck and indeed no calls of Carp.
I think we know where basepath is being defined based on what I've already
found although I don't know the exact site of the error that that definition
causes. So it shouldn't have that definition where it causes the error I'm
getting.
> With the number and types of changes you've made and the amount of
> information we can't see, it's gonna be virtually impossible to lead
> you remotely through solving this:(
I haven't actually made that many changes. It's possible that one or another
might be relevant but I haven't found a connection yet to the error I'm
getting. What do you suggest?
Douglas
========
Douglas Kline
[EMAIL PROTECTED]
_______________________________________________
Fink-beginners mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fink-beginners