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

Comparing COMP/SCRAM/src/Scram/ScramFunctions.pm (file contents):
Revision 1.11 by sashby, Wed May 30 12:47:01 2001 UTC vs.
Revision 1.16 by sashby, Wed Nov 7 19:49:38 2001 UTC

# Line 86 | Line 86 | sub setuptoolsinarea {
86          my $self=shift;
87          my $area=shift;
88  
89 <        # -- initialise
89 >        # -- initialise
90 >        print "Initialising setup procedure......","\n";
91          $self->_allprojectinitsearcher();
92  
93          # -- create a new toolbox object
# Line 136 | Line 137 | sub satellite {
137          my $area=$relarea->satellite($installarea,$areaname);
138          $area->archname($self->arch());
139  
139        # -- copy setup info - deprecated by toolbox copy method
140        #$relarea->copysetup($area->location());
141
140          # -- copy toolbox
141          my $rtb=$self->areatoolbox($relarea);
142          my $tb=$self->areatoolbox($area);
# Line 241 | Line 239 | sub addareatoDB {
239          $self->scramprojectdb()->addarea($tagname,$version,$area);
240   }
241  
244 sub spawnversion {
245        my $self=shift;
246        my $version=shift;
242  
243 <        my $rv=0;
244 <        my $thisversion=$self->getversion();
245 <        if ( defined $version ) {
246 <          if ( $version ne $thisversion ) {
247 <              # first try to use the correct version
248 <              if ( -d $self->{scram_top}."/".$version ) {
249 <                $ENV{SCRAM_HOME}=$self->{scram_top}."/".$version;
250 <                $ENV{TOOL_HOME}="$ENV{SCRAM_HOME}/src";
251 <                $self->verbose("Spawning SCRAM version $version");
252 <                my $rv=system("scram", @_)/256;
253 <                exit $rv;
254 <              }
255 <              else { # if not then simply warn
256 <               print "******* Warning : scram version inconsistent ********\n";
257 <               print "This version: $thisversion; Required version: $version\n";
258 <               print "*****************************************************\n";
259 <               print "\n";
260 <              }
261 <           }
262 <        }
263 <        else {
264 <           $self->error("Undefined value for version requested");
265 <           $rv=1;
266 <        }
267 <        return $rv;
268 < }
243 > sub removeareafromDB
244 >   {
245 >   ###############################################################
246 >   # removearefromDB()                                           #
247 >   ###############################################################
248 >   # modified : Thu Jun 14 10:46:22 2001 / SFA                   #
249 >   # params   : projectname, projectversion                      #
250 >   #          :                                                  #
251 >   #          :                                                  #
252 >   #          :                                                  #
253 >   # function : Remove project <projectname> from DB file.       #
254 >   #          :                                                  #
255 >   #          :                                                  #
256 >   ###############################################################
257 >   my $self=shift;
258 >   my $projname=shift;
259 >   my $version=shift;
260 >  
261 >   # -- Remove from the DB:
262 >   $self->scramprojectdb()->removearea($projname,$version);
263 >   }
264 >
265 >
266 > sub spawnversion
267 >   {
268 >   ###############################################################
269 >   # spawnversion                                                #
270 >   ###############################################################
271 >   # modified : Fri Aug 10 15:42:08 2001 / SFA                   #
272 >   # params   :                                                  #
273 >   #          :                                                  #
274 >   #          :                                                  #
275 >   #          :                                                  #
276 >   # function : Check for version of scram to run, and run it.   #
277 >   #          :                                                  #
278 >   #          :                                                  #
279 >   ###############################################################
280 >
281 >   my $self=shift;
282 >   my $version=shift;
283 >   my $rv=0;
284 >  
285 >   my $thisversion=$self->getversion();
286 >
287 >   if ( defined $version )
288 >      {
289 >      if ( $version ne $thisversion )
290 >         {
291 >         # first try to use the correct version
292 >         if ( -d $self->{scram_top}."/".$version )
293 >            {
294 >            $ENV{SCRAM_HOME}=$self->{scram_top}."/".$version;
295 >            $ENV{TOOL_HOME}="$ENV{SCRAM_HOME}/src";
296 >            $self->verbose("Spawning SCRAM version $version");
297 >            #print "######### SCRAM version control: ";
298 >            #print "ARGS: ",@_,"\n\n";
299 >            my $rv=system("scram", @_)/256;
300 >            exit $rv;
301 >            }
302 >         else
303 >            { # if not then simply warn
304 >            print "******* Warning : scram version inconsistent ********\n";
305 >            print "This version: $thisversion; Required version: $version\n";
306 >            print "*****************************************************\n";
307 >            print "\n";
308 >            }
309 >         }
310 >      }
311 >   else
312 >      {
313 >      $self->error("Undefined value for version requested");
314 >      $rv=1;
315 >      }
316 >   return $rv;
317 >   }
318  
319   sub globalcache {
320          my $self=shift;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines