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

Comparing COMP/SCRAM/src/Configuration/ConfigArea.pm (file contents):
Revision 1.11 by williamc, Thu Feb 24 14:24:29 2000 UTC vs.
Revision 1.13 by williamc, Mon Mar 13 10:23:19 2000 UTC

# Line 23 | Line 23
23   # restore(location)             : restore data from file location
24   # meta()                        : return a description string of the area
25   # addconfigitem(url)            : add a new item to the area
26 + # storeconfigobject(confiItemobj) : store a ready made ConfigItem in the local
27 + #                                       area
28   # configitem(@keys)             : return a list of fig items that match
29   #                                 the keys - all if left blank
30   # parentstore()                 : set/return the parent ObjectStore
# Line 73 | Line 75 | sub init {
75          $self->addtag("download","use",\&Use_download_Start,$self,
76                                                  "", $self, "",$self);
77          $self->addurltags("setup");
78 +        $self->addurltags("setup_tools");
79          $self->addtag("setup_tools","use",\&Use_Start,$self, "", $self, "",$self);
80          $self->addtag("setup","structure",\&Structure_Start,$self,
81                           "", $self, "",$self);
# Line 90 | Line 93 | sub basearea {
93            $self->config()->store($area,"BaseArea");
94          }
95          else {
96 <          ($area)=$self->config()->restore("BaseArea");
96 >          ($area)=$self->config()->find("BaseArea");
97          }
98          return $area;
99   }
# Line 180 | Line 183 | sub bootstrapfromlocation {
183          if ( ! defined $self->location(@_) ) {
184            $self->error("Unable to locate the top of local configuration area");
185          }
186 <        print "Found top ".$self->location()."\n";
186 >        $self->verbose("Found top ".$self->location());
187          $self->_setupstore();
188 <        $self->restore($self->location()."/".$self->{admindir}.
189 <                                                "/ConfigArea.dat");
188 >        my $infofile=$self->location()."/".$self->{admindir}."/ConfigArea.dat";
189 >        if ( -e $infofile ) {
190 >             $self->restore($infofile);
191 >        }
192 >        else {
193 >             $self->error("Area corrupted - cannot find $infofile");
194 >        }
195   }
196  
197   sub parentconfig {
# Line 334 | Line 342 | sub addconfigitem {
342   #       $self->config()->storepolicy("local");
343   }
344  
345 + sub storeconfigobject {
346 +        my $self=shift;
347 +        my $obj=shift;
348 +        $obj->save($self->config());
349 + }
350 +
351   sub downloadtotop {
352          my $self=shift;
353          my $url=shift;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines