ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/BuildSystem/ToolBox.pm
(Generate patch)

Comparing COMP/SCRAM/src/BuildSystem/ToolBox.pm (file contents):
Revision 1.4 by williamc, Fri Sep 22 08:42:49 2000 UTC vs.
Revision 1.5 by williamc, Tue Nov 14 15:18:41 2000 UTC

# Line 52 | Line 52 | sub init {
52          my $config=$top."/".$area->configurationdir();
53  
54          my $cache=$area->cache();
55 <        if ( defined $cache ) {
56 <          $self->{urlhandler}=URL::URLhandler->new($cache);
57 <        }
55 >        if ( defined $cache ) {
56 >          $self->{urlhandler}=URL::URLhandler->new($cache);
57 >        }
58          $self->{toolfiledir}="$top/.SCRAM/ToolFiles";
59          $self->{datastore}=$top."/.SCRAM/".$self->{arch};
60          #$self->{datastore}=$area->archdir();
# Line 67 | Line 67 | sub init {
67           # do we have toolfile dir and no admin? if so maybe its an old
68           # area and we can attempt to get something from the filenames
69           if ( -d $self->{datastore} ) {
70 <          my $dh=FileHandle->new();
70 >          my $dh=DirHandle->new();
71            opendir $dh, $self->{datastore};
72            my @files=grep /.*_.*/, readdir $dh;
73            undef $dh;
# Line 231 | Line 231 | sub gettool {
231            return undef, if ( ! defined $version );
232          }
233          my ($tool,$rv)=$self->_toolobject($product,$version);
234 +        if ( $rv != 0 ) {
235 +          delete $self->{tools}{$product}{$version};
236 +        }
237          return ( $rv==0?$tool:undef ); # only return if already set up
238   }
239  
# Line 345 | Line 348 | sub _toolobject {
348          my $rv=0;
349  
350          if ( ! exists $self->{tools}{$product}{$version} ) {
351 <           $self->verbose("$product $version being Intitialised");
351 >           $self->verbose("$product $version being Initialised");
352             $self->{tools}{$product}{$version}=BuildSystem::Tool->new();
353             my $file=$self->_toolfile($product,$version);
354             if ( -f $file ) { # restore it from disk

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines