Title: repo(), output_callback()
Hi Ted:
 
Perhaps you can post the full oscarinstall.log (or host it somewhere if it's too big) so that we can see the context of the problem.  It's possible that something went wrong before the errors you're seeing which are causing the problem.
 
BTW, it might be a good idea to update to the latest revision, as Erich has checked in a bunch of x86_64 RPMs for Fedora Core 5.
 
Cheers,
 
Bernard


From: Ted Powell on behalf of Ted Powell
Sent: Sat 06/05/2006 22:06
To: Bernard Li
Cc: OSCAR Devel; [EMAIL PROTECTED]
Subject: repo(), output_callback()

On Wed, May 03, 2006 at 02:51:58PM -0700, Bernard Li wrote:
> [...]
> BTW, just so you know, I think Erich is also working on porting trunk to
> Fedora Core 5 x86_64, just so you guys don't duplicate any efforts ;-)
>
> How's that coming along?

I'm currently working with trunk rev 4701.

I've hit a snag part way through install_cluster.


If I simply run it, I get a bunch of
    Copying to OSCAR package pool: /tftpboot/oscar/fc-5-x86_64
    (other lines omitted for brevity)
output, from scripts/generic-setup, which is called from
scripts/install_prereq(62..74)

That output is followed by:
    PackMan::RPM=HASH(0x80e940) does not understand PackMan::RPM::repo
    ERROR: Prerequisites install failure! at ./wizard_prep line 184.
    Oscar Wizard preparation script failed to complete at ./install_cluster line 226.


If I run: OSCAR_VERBOSE=1 ./install_cluster eth0
I get more verbose output from generic-setup, followed by:
    PackMan::RPM=HASH(0x80fac0) does not understand PackMan::RPM::output_callback
    ERROR: Prerequisites install failure! at ./wizard_prep line 184.
    Oscar Wizard preparation script failed to complete at ./install_cluster line 226.


In both cases, the failure is triggered by code in
OSCAR::PackageSmart::prepare_pools, which is called from
scripts/install_prereq(83), just after the loop calling
scripts/generic-setup.

PackageSmart is at /opt/oscar/lib/OSCAR/PackageSmart.pm

The failure occurs earlier when OSCAR_VERBOSE is set because lines
(53..55):
    if ($verbose) {
        $pm->output_callback(\&print_output);
    }
simply occur earlier in prepare_pools than line (91):
    $pm->repo(@pools);
which is the cause of failure in the non-verbose case.

$pm is set at line (49) with:
    my $pm = PackMan->new;
This returns a blessed object of class PackMan::RPM.

PackMan.pm includes an AUTOLOAD sub, but it is unable to come up with either repo() or
output_callback(). The two lines quoted above:
    PackMan::RPM=HASH(0x80e940) does not understand PackMan::RPM::repo
    PackMan::RPM=HASH(0x80fac0) does not understand PackMan::RPM::output_callback
are output by PackMan::AUTOLOAD, at line (98).

Here is the AUTOLOAD function, PackMan.pm lines (84..100):

    # AUTOLOAD named constructors for the concrete modules
    # Makes PackMan->RPM (<root dir>) do the same as PackMan::RPM->new (<root dir>)
    sub AUTOLOAD {
      no strict 'refs';
      our $AUTOLOAD;
      if ($AUTOLOAD =~ m/::(\w+)$/ and grep $1 eq $_, keys %concrete) {
        my $module = $concrete{$1}; # uninitialized hash element error otherwise
        *{$1} = sub {
          ref (shift) and croak $1 . " constructor is a class method";
          return ("$module"->new (@_))
        };
        die $@ if $@;
        goto &$1;
      } else {
        die "$_[0] does not understand $AUTOLOAD\n";
      }
    }

As far as I can tell, it's only designed to do what the second line of
the comment says (implement PackMan::RPM->new (<root dir>)), and not to
come up with methods like repo() or output_callback().


In search of a clue, I went looking for a Perl module that _did_ define
repo() and/or output_callback():
    find / -type f -name '*.pm' -print | xargs egrep -nw 'repo|output_callback'
Nada. The only hits on the entire hard drive were from the offending
code in PackageSmart.

Where do you suggest I go from here?


--
Ted Powell <[EMAIL PROTECTED]>   http://psg.com/~ted/
"If you don't look, you don't know."
    Dr. Sam Ting, Nobel laureate experimental physicist.

Reply via email to