Just to reiterate:

It's

#export PERL5LIB=$PERL5LIB:"/opt/oscar/lib/"

and *not* what you tried.

 -- Abhishek

On Mon, Sep 1, 2008 at 1:39 AM, Munkhzorig Gankhuyag <[EMAIL PROTECTED]>wrote:

> I tried that.
> #export PERL5LIB=$PERL5LIB:"/opt/oscar/lib/OSCAR"
> same again...
>
>
>
>
> =============================================================================
> == Running OSCAR install_cluster script    Mon Sep  1 15:28:18 ULAT 2008
>
> =============================================================================
>
> --> Checking if this is a supported platform
> --> Running: "cd /opt/oscar/scripts && ./wizard_prep"
>
>
> =============================================================================
> == Running OSCAR wizard_prep script
>
> =============================================================================
>
> --> Bootstrapping OSCAR smart package manager
> Undefined subroutine &OSCAR::PackageSmart::prepare_pools called at
> ./wizard_prep line 200.
> eval require PackageSmart returned No such file or directory
> --> Checking OSCAR repositories existence.
> Oscar Wizard preparation script failed to complete (cd /opt/oscar/scripts
> && ./wizard_prep) at ./install_cluster line 275.
>
> in log message "No such file or directory"... I think any file required? or
> scripts have any mistake...?
>
> In the wizard_prep:200
>
> my $pm = OSCAR::PackageSmart::prepare_pools(($verbose?1:0),
>                                                         $lrepo);
>
> In PackageSmart.pm
>
> package OSCAR::PackageSmart;
>
> use strict;
> use vars qw(@EXPORT);
> use base qw(Exporter);
> use OSCAR::OCA::OS_Detect;
> use OSCAR::PackMan;           # this only works when PackMan has arrived!
> use File::Basename;
> use Switch;
> use Cwd;
> use Carp;
>
> our @EXPORT = qw(
>              prepare_pools
>              checksum_write
>              checksum_needed
>              checksum_files
>              );
>
> sub prepare_pools {
>     my ($verbose,@pargs) = @_;
>
>     $verbose = 1;
>     # demultiplex pool arguments
>     my @pools;
>     print "Preparing pools: " if $verbose;
>     for my $p (@pargs) {
>         print "$p " if $verbose;
>         push @pools, split(",",$p);
>     }
>     print "\n" if $verbose;
>
>     my $prev_format = "";
>     my $binaries = "rpms|debs";
>     my $archs = "i386|x86_64|ia64|ppc|ppc64";
>     # List of all supported distros. May be nice if we can get this list
>     # from OS_Detect.
>     my $distros = "debian|fc|fedora|mdv|rhel|suse|redhat|yellowdog|ydl";
> #    Take out the solution using a little smarter way until we figure out
> #    implemeting XML::Simple in a proper time.
> #    Coordinated with Geoffroy.
> #    # List of all supported distros.
> #    my @distros_list = OSCAR::Distro::get_list_of_supported_distros_id();
> #    my $distros = "";
> #    for (my $i=0; $i<scalar(@distros_list)-1; $i++) {
> #        $distros .= @distros_list[$i] . "|";
> #    }
> #    $distros .= $distros_list[scalar(@distros_list)-1];
>     my $format = "";
>     # Before to prepare a pool, we try to detect the binary package format
>     # associated Not that for a specific pool or set of pools, it is not
>     # possible to mix deb and rpm based pools.
>     for my $pool (@pools) {
>         $format = "";
>         print "Analysing $pool\n" if $verbose;
>         # Online repo
>         if ($pool =~ m,^(http|https|ftp|mirror):,) {
>             print "This is an online repository ($pool)\n" if $verbose;
>             my $url;
>             if ( $pool =~ /\/$/ ) {
>                 $url = $pool . "repodata/repomd.xml";
>             } else {
>                 $url = $pool . "/repodata/repomd.xml";
>             }
> my $cmd = "wget -S --delete-after -q $url";
>             print "Testing remote repository type by using command: $cmd...
> " if $verbose;
>             if (!system("wget -S --delete-after -q $url")) {
>                 print "[yum]\n" if $verbose;
>                 $format = "rpms";
>             } else {
>                 # if the repository is not a yum repository, we assume this
> is
>                 # a Debian repo. Therefore we assume that all specified
> repo
>                 # are valid.
>                 print "[deb]\n" if $verbose;
>                 $format = "debs";
>             }
>             if ($prev_format ne "" && $prev_format ne $format) {
>                 die ("ERROR: Mix of RPM and Deb pools ($prev_format vs.
> $2),".
>                       " we do not know how to deal with that!");
>             }
>         } elsif ($pool =~ m,^(file:|/),) {
>             $pool =~ s,^file:,,;
>             # Local pools
>             print "$pool is a local pool ($distros, $binaries)\n" if
> $verbose;
>             # we then check pools for common RPMs and common debs
> if ( ($pool =~ /(.*)\-($binaries)$/) ) {
>                 if ($prev_format ne "" && $prev_format ne $2) {
>                     die ("ERROR: Mix of RPM and Deb pools ($prev_format vs.
> ".
>                           "$2), we do not know how to deal with that!");
>                 }
>                 $format = $2;
>                 print "Pool format: $format\n" if $verbose;
>             } else {
>                 # Finally we check pools in tftpboot for specific distros
>                 if ( ($pool =~ /($distros)/) ) {
>                     print ("Pool associated to distro $1\n") if $verbose;
>                     switch ($1) {
>                         case "debian" { $format = "debs" }
>                         else { $format = "rpms" }
>                     }
>                 } else {
>                     die ("ERROR: Impossible to detect the distro ".
>                          "associated to the pool $pool");
>                 }
>                 print "Pool format: $format\n";
>                 if ($prev_format ne "" && $prev_format ne $format) {
>                     die ("ERROR: Mix of RPM and Deb pools ($prev_format vs.
> ".
>                      "$1), we do not know how to deal with that!");
>                 }
>             }
>             $prev_format = $format;
>         } else {
>             die "ERROR: Impossible to recognize pool $pool";
>         }
>     }
>     print "Binary package format for the image: $format\n" if $verbose;
>
>     # check if pool update is needed
>     my $perr = 0;
>     my $pm;
>     if ($format eq "rpms") {
>         $pm = PackMan::RPM->new;
>     } elsif ($format eq "debs") {
>         $pm = PackMan::DEB->new;
>     } else {
>         # if the binary package format of the pool was not previously
> detected,
>         # we fall back to the PackMan mode by default.
>         $pm = PackMan->new;
>     }
>     return undef if (!$pm);
> # follow output of smart installer
>     if ($verbose) {
>         $pm->output_callback(\&print_output);
>     }
>
>     for my $pool (@pools) {
>         print "--- checking md5sum for $pool" if $verbose;
>         if ($pool =~ /^(http|ftp|mirror)/) {
>            print " ... remote repo, no check needed.\n" if $verbose;
>             next;
>         }
>         print "\n" if $verbose;
>
>         my $cfile = "$ENV{OSCAR_HOME}/tmp/pool_".basename(dirname($pool)).
>                     "_".basename($pool).".md5";
>         my $md5 = &checksum_needed($pool,$cfile,"*.rpm","*.deb");
>         if ($md5) {
>             my $err = &pool_gencache($pm,$pool);
>             if ($err) {
>                $perr++;
>             } else {
>                 &checksum_write($cfile,$md5);
>             }
>          }
>     }
>     if ($perr) {
>         undefine $pm;
>         print "Error: could not setup or generate package pool metadata\n";
>         return undef;
>     }
>
>     # prepare for smart installs
>     $pm->repo(@pools);
>     return $pm;
> }
>
> this section is prepare_pools section...
>
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Oscar-users mailing list
> Oscar-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/oscar-users
>
>
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Oscar-users mailing list
Oscar-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oscar-users

Reply via email to