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.15 by sashby, Wed Aug 22 12:40:13 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 241 | Line 242 | sub addareatoDB {
242          $self->scramprojectdb()->addarea($tagname,$version,$area);
243   }
244  
244 sub spawnversion {
245        my $self=shift;
246        my $version=shift;
245  
246 <        my $rv=0;
247 <        my $thisversion=$self->getversion();
248 <        if ( defined $version ) {
249 <          if ( $version ne $thisversion ) {
250 <              # first try to use the correct version
251 <              if ( -d $self->{scram_top}."/".$version ) {
252 <                $ENV{SCRAM_HOME}=$self->{scram_top}."/".$version;
253 <                $ENV{TOOL_HOME}="$ENV{SCRAM_HOME}/src";
254 <                $self->verbose("Spawning SCRAM version $version");
255 <                my $rv=system("scram", @_)/256;
256 <                exit $rv;
257 <              }
258 <              else { # if not then simply warn
259 <               print "******* Warning : scram version inconsistent ********\n";
260 <               print "This version: $thisversion; Required version: $version\n";
261 <               print "*****************************************************\n";
262 <               print "\n";
263 <              }
264 <           }
265 <        }
266 <        else {
267 <           $self->error("Undefined value for version requested");
268 <           $rv=1;
269 <        }
270 <        return $rv;
271 < }
246 > sub removeareafromDB
247 >   {
248 >   ###############################################################
249 >   # removearefromDB()                                           #
250 >   ###############################################################
251 >   # modified : Thu Jun 14 10:46:22 2001 / SFA                   #
252 >   # params   : projectname, projectversion                      #
253 >   #          :                                                  #
254 >   #          :                                                  #
255 >   #          :                                                  #
256 >   # function : Remove project <projectname> from DB file.       #
257 >   #          :                                                  #
258 >   #          :                                                  #
259 >   ###############################################################
260 >   my $self=shift;
261 >   my $projname=shift;
262 >   my $version=shift;
263 >  
264 >   # -- Remove from the DB:
265 >   $self->scramprojectdb()->removearea($projname,$version);
266 >   }
267 >
268 >
269 > sub spawnversion
270 >   {
271 >   ###############################################################
272 >   # spawnversion                                                #
273 >   ###############################################################
274 >   # modified : Fri Aug 10 15:42:08 2001 / SFA                   #
275 >   # params   :                                                  #
276 >   #          :                                                  #
277 >   #          :                                                  #
278 >   #          :                                                  #
279 >   # function : Check for version of scram to run, and run it.   #
280 >   #          :                                                  #
281 >   #          :                                                  #
282 >   ###############################################################
283 >
284 >   my $self=shift;
285 >   my $version=shift;
286 >   my $rv=0;
287 >  
288 >   my $thisversion=$self->getversion();
289 >
290 >   if ( defined $version )
291 >      {
292 >      if ( $version ne $thisversion )
293 >         {
294 >         # first try to use the correct version
295 >         if ( -d $self->{scram_top}."/".$version )
296 >            {
297 >            $ENV{SCRAM_HOME}=$self->{scram_top}."/".$version;
298 >            $ENV{TOOL_HOME}="$ENV{SCRAM_HOME}/src";
299 >            $self->verbose("Spawning SCRAM version $version");
300 >            my $rv=system("scram", @_)/256;
301 >            exit $rv;
302 >            }
303 >         else
304 >            { # if not then simply warn
305 >            print "******* Warning : scram version inconsistent ********\n";
306 >            print "This version: $thisversion; Required version: $version\n";
307 >            print "*****************************************************\n";
308 >            print "\n";
309 >            }
310 >         }
311 >      }
312 >   else
313 >      {
314 >      $self->error("Undefined value for version requested");
315 >      $rv=1;
316 >      }
317 >   return $rv;
318 >   }
319  
320   sub globalcache {
321          my $self=shift;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines