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.16 by williamc, Thu Sep 21 13:52:07 2000 UTC vs.
Revision 1.36 by muzaffar, Fri Jan 14 17:36:42 2011 UTC

# Line 1 | Line 1
1 #
2 # ConfigArea.pm
3 #
4 # Written by Christopher Williams
5 #
6 # Description
7 # -----------
8 # creates and manages a configuration area
9 #
10 # Notes
11 # -------
12 # Persistency - remember to call the save method to make changes persistent
13 #
14 # Interface
15 # ---------
16 # new()                         : A new ConfigArea object
17 # name()                        : get/set project name
18 # setup(dir[,areaname])         : setup a fresh area in dir
19 # satellite(dir[,areaname])     : setup a satellite area in dir
20 # version()                     : get/set project version
21 # location([dir])               : set/return the location of the work area
22 # bootstrapfromlocation([location]) : bootstrap the object based on location.
23 #                                     no location specified - cwd used
24 #                                     return 0 if succesful 1 otherwise
25 # requirementsdoc()             : get set the requirements doc
26 # searchlocation([startdir])    : returns the location directory. search starts
27 #                                 from cwd if not specified
28 # scramversion()                : return the scram version associated with
29 #                                 area
30 # configurationdir()            : return the location of the project
31 #                                 configuration directory
32 # copy(location)                : copy a configuration
33 # copysetup(location)           : copy the architecture specific tool setup
34 #                                 returns 0 if successful, 1 otherwise
35 # copyenv($ref)                 : copy the areas environment into the hashref
36 # toolbox()                     : return the areas toolbox object
37 # save()                        : save changes permanently
38 # linkto(location)              : link the current area to that at location
39 # unlinkarea()                  : destroy link (autosave)
40 # linkarea([ConfigArea])        : get/set a link from the current area to the apec Area Object
41 # archname()            : get/set a string to indicate architecture
42 # archdir()             : return the location of the administration arch dep
43 #                         directory
44 # objectstore(["<"])            : return the objectStore object of the area
45 #                                 if called with temp - will set as undef
46 #                                 if it dosnt already exist - otherwise will
47 #                                 attempt to create it.
48 # - temporary
49 # align()                       : adjust hard paths to suit local loaction
50
1   package Configuration::ConfigArea;
2   require 5.004;
53 use URL::URLcache;
3   use Utilities::AddDir;
4   use Utilities::Verbose;
56 use ObjectUtilities::ObjectStore;
5   use Cwd;
6   @ISA=qw(Utilities::Verbose);
7  
# Line 61 | Line 9 | sub new {
9          my $class=shift;
10          my $self={};
11          bless $self, $class;
64
65        # data init
12          $self->{admindir}=".SCRAM";
13 <        $self->{cachedir}="cache";
14 <        $self->{dbdir}="ObjectDB";
69 <        undef $self->{linkarea};
70 <
13 >        $self->{configurationdir} = "config";
14 >        $self->archname(shift || $ENV{SCRAM_ARCH});
15          return $self;
16   }
17  
18 < sub cache {
19 <        my $self=shift;
20 <
21 <        my $exist=0;
22 <        if ( @_ ) {
23 <          my $cache=shift;
24 <          if ( $cache!~/^</ ) {
25 <            $self->{cache}=$cache;
26 <          }
27 <          $exist=1;
28 <        }
29 <        elsif ( ! defined $self->{cache} ) {
30 <          my $loc=$self->location()."/".$self->{admindir}."/".$self->{cachedir};
31 <          if ( ! $exist ) {
32 <            $self->{cache}=URL::URLcache->new($loc);
33 <          }
34 <        }
35 <        return $self->{cache};
18 > sub toolcachename
19 >   {
20 >   my $self=shift;
21 >   return ($self->archdir()."/ToolCache.db.gz");
22 >   }
23 >
24 > sub projectcachename
25 >   {
26 >   my $self=shift;
27 >   return ($self->archdir()."/ProjectCache.db.gz");
28 >   }
29 >
30 > sub symlinks {
31 >        my $self=shift;
32 >        if (@_) {$self->{symlinks}=shift;}
33 >        return $self->{symlinks};
34 > }
35 >
36 > sub calchksum {
37 >        my $self=shift;
38 >        my $dir=$self->location()."/".$self->configurationdir();
39 >        push @INC,$dir;
40 >        require SCRAM::Plugins::ProjectChkSum;
41 >        my $sum=&SCRAM::Plugins::ProjectChkSum::chksum($dir);
42 >        pop @INC;
43 >        return $sum;
44   }
45  
46 < sub objectstore {
46 > sub configchksum {
47          my $self=shift;
48 <
49 <        my $exist="";
98 <        if ( @_ ) {
99 <          my $db=shift;
100 <          if ( $db!~/^</ ) {
101 <            $self->{dbstore}=cache;
102 <          }
103 <          $exist="<";
104 <        }
105 <        elsif ( ! defined $self->{dbstore} ) {
106 <          my $loc=$self->location()."/".$self->{admindir}."/".$self->{dbdir};
107 <          $self->{dbstore}=ObjectUtilities::ObjectStore->new($exist.$loc);
108 <        }
109 <        return $self->{dbstore}
48 >        if (@_) {$self->{configchksum}=shift;}
49 >        return $self->{configchksum};
50   }
51  
52 +
53   sub name {
54          my $self=shift;
55          @_?$self->{name}=shift
# Line 124 | Line 65 | sub version {
65   sub setup {
66          my $self=shift;
67          my $location=shift;
68 <        my $areaname;
69 <
70 <        # -- check we have a project name and version
130 <        my $name=$self->name();
131 <        my $vers=$self->version();
132 <        if ( ( ! defined $name ) && ( ! defined $version )) {
133 <          $self->error("Set ConfigArea name and version before setup");
134 <        }
135 <
136 <        # -- check arguments and set location
137 <        if ( ! defined $location ) {
138 <          $self->error("ConfigArea: Cannot setup new area without a location");
139 <        }
140 <        if ( @_ ) {
141 <          $areaname=shift;
142 <        }
68 >        my $areaname=shift  || undef;
69 >        my $symlinks=shift  || 0;
70 >        my $locarea = shift || undef;
71          if ( (! defined $areaname) || ( $areaname eq "" ) ) {
72 <          # -- make up a name from the project name and version
73 <          $vers=~s/^$name\_//;
74 <          $areaname=$name."_".$vers;
75 <        }
76 <        my $arealoc=$location."/".$areaname;
77 <        my $workloc=$arealoc."/".$self->{admindir};
78 <        $self->verbose("Building at $arealoc");
79 <        $self->location($arealoc);
80 <
81 <        # -- create top level structure and work area
82 <        AddDir::adddir($workloc);
83 <
84 <        # -- add a cache
85 <        $self->cache();
86 <
87 <        # -- Save Environment File
88 <        $self->_SaveEnvFile();
89 <
72 >          $areaname=$self->version();
73 >        }
74 >        $self->location($location."/".$areaname);
75 >        $self->symlinks($symlinks);
76 >        if ($self->configchksum() ne "")
77 >           {
78 >           if ((!-defined $locarea) && (-f "${location}/${areaname}/".$self->admindir()."/Environment"))
79 >              {
80 >              $locarea=Configuration::ConfigArea->new($self->arch());
81 >              $locarea->bootstrapfromlocation("${location}/${areaname}");
82 >              }
83 >           if ((defined $locarea) && ($locarea->configchksum() != $self->configchksum()))
84 >              {
85 >              print "ERROR: Can not setup your current working area for SCRAM_ARCH:".$self->arch().".\n",
86 >                    "Your current development area ${location}/${areaname}\n",
87 >                    "is using a different ${areaname}/config then the one used for\n",
88 >                    $self->releasetop(),".\n";
89 >              exit 1;
90 >              }
91 >           }
92 >        Utilities::AddDir::adddir($self->archdir());
93   }
94  
95   sub configurationdir {
# Line 169 | Line 100 | sub configurationdir {
100          return (defined $self->{configurationdir})?$self->{configurationdir}:undef;
101   }
102  
103 < sub toolbox {
103 > sub sourcedir {
104          my $self=shift;
105 <        if ( ! defined $self->{toolbox} ) {
106 <          $self->{toolbox}=BuildSystem::ToolBox->new($self);
105 >        if ( @_ ) {
106 >          $self->{sourcedir}=shift;
107          }
108 <        return $self->{toolbox};
108 >        return (defined $self->{sourcedir})?$self->{sourcedir}:undef;
109   }
110  
111 < sub requirementsdoc {
111 > sub releasetop {
112          my $self=shift;
113          if ( @_ ) {
114 <          $self->{reqdoc}=shift;
184 <        }
185 <        if ( defined $self->{reqdoc} ) {
186 <          return $self->location()."/".$self->{reqdoc};
187 <        }
188 <        else {
189 <          return undef;
114 >          $self->{releasetop}=shift;
115          }
116 +        return (defined $self->{releasetop})?$self->{releasetop}:undef;
117   }
118  
119 < sub scramversion {
120 <        my $self=shift;
121 <        if ( ! defined $self->{scramversion} ) {
122 <          my $filename=$self->location()."/".$self->configurationdir()."/".
123 <                                                        "scram_version";
124 <          if ( -f $filename ) {
125 <            use FileHandle;
200 <            $fh=FileHandle->new();
201 <            open ($fh, "<".$filename);
202 <            my $version=<$fh>;
203 <            chomp $version;
204 <            $self->{scramversion}=$version;
205 <            undef $fh;
206 <          }
207 <        }
208 <        return $self->{scramversion};
209 < }
119 > sub admindir()
120 >   {
121 >   my $self=shift;
122 >  
123 >   @_ ? $self->{admindir} = shift
124 >      : $self->{admindir};
125 >   }
126  
127   sub bootstrapfromlocation {
128          my $self=shift;
129 <
129 >        my $location = $self->searchlocation(shift);
130          my $rv=0;
131 <        
216 <        my $location;
217 <        if ( ! defined ($location=$self->searchlocation(@_)) ) {
131 >        if ( ! defined $location) {
132           $rv=1;
219         $self->verbose("Unable to locate the top of local configuration area");
133          }
134          else {
135           $self->location($location);
223         $self->verbose("Found top ".$self->location());
224         my $infofile=$self->location()."/".$self->{admindir}."/ConfigArea.dat";
136           $self->_LoadEnvFile();
137          }
138          return $rv;
# Line 232 | Line 143 | sub location {
143  
144          if ( @_ ) {
145            $self->{location}=shift;
146 +          $self->archname($self->{archname});
147          }
148          elsif ( ! defined $self->{location} ) {
149            # try and find the release location
150            $self->{location}=$self->searchlocation();
151 +          if (defined $self->{location})
152 +             {
153 +             $self->archname($self->{archname});
154 +             }
155          }
156          return  $self->{location};
157   }
158  
159   sub searchlocation {
160          my $self=shift;
161 <
161 >        
162          #start search in current directory if not specified
163          my $thispath;
164          if ( @_ ) {
# Line 251 | Line 167 | sub searchlocation {
167          else {
168            $thispath=cwd();
169          }
170 <
170 >        
171          my $rv=0;
172  
173          # chop off any files - we only want dirs
# Line 267 | Line 183 | sub searchlocation {
183              last Sloop;
184            }
185          } while ( ($thispath=~s/(.*)\/.*/$1/)=~/./ ) };
186 <
186 >      
187          return $rv?$thispath:undef;
188   }
189  
# Line 275 | Line 191 | sub archname {
191          my $self=shift;
192          if ( @_ ) {
193            $self->{archname}=shift;
194 +          if (defined $self->{location}) {
195 +             $self->archdir($self->{location}."/".$self->{admindir}."/".$self->{archname});
196 +          }
197          }
198          return $self->{archname};
199   }
# Line 284 | Line 203 | sub archdir {
203          if ( @_ ) {
204            $self->{archdir}=shift;
205          }
287        if ( ! defined $self->{archdir} ) {
288         if ( defined $self->{archname} ) {
289          $self->{archdir}=$self->location()."/".$self->{admindir}."/".
290                                                        $self->{archname};
291         }
292         else {
293          $self->error("ConfigArea : cannot create arch directory - ".
294                                                "architecture name not set")
295         }
296        }
206          return $self->{archdir};
207   }
208  
209   sub satellite {
210          my $self=shift;
211 <
212 <        # -- create the sat object
304 <        my $sat=Configuration::ConfigArea->new();
211 >        my $relloc = $self->location();
212 >        my $sat=Configuration::ConfigArea->new($self->arch());
213          $sat->name($self->name());
214          $sat->version($self->version());
307        $sat->requirementsdoc($self->{reqdoc});
215          $sat->configurationdir($self->configurationdir());
216 +        $sat->sourcedir($self->sourcedir());
217 +        $sat->releasetop($relloc);
218 +        $sat->configchksum($self->configchksum());
219          $sat->setup(@_);
220 <
221 <        # -- copy across the cache and ObjectStore
222 <        # -- make sure we dont try building new caches in release areas
223 <        my $rcache=$self->cache("<");
224 <        if ( defined $rcache ) {
225 <          copy($rcache->location(),$sat->cache()->location());
226 <        }
227 <
228 <        # -- make sure we dont try building new objectstores in release areas
229 <        my $rostore=$self->objectstore("<");
230 <        if ( defined $rostore ) {
231 <          copy($rostore->location(),$sat->objectstore()->location());
232 <        }
233 <
234 <        # and make sure in reinitialises
235 <        undef ($sat->{cache});
236 <
237 <        # -- link it to this area
328 <        $sat->linkarea($self);
329 <        
330 <        # -- save it
331 <        $sat->save();
332 <
220 >        $self->copywithskip($self->archdir(),$sat->archdir(),["InstalledTools","ProjectCache.db.gz","RuntimeCache.db.gz","DirCache.db.gz","MakeData/DirCache","MakeData/DirCache.mk","MakeData/src.mk"]);
221 >        $envfile = $sat->archdir()."/Environment";
222 >        open ( $fh, "> $envfile" ) or  $sat->error("Cannot Open \"$envfile\" file to Save\n $!");
223 >        print $fh "RELEASETOP=$relloc\n";
224 >        close($fh);
225 >        my $devconf = $sat->location()."/".$sat->configurationdir();
226 >        my $relconf = $self->location()."/".$self->configurationdir();
227 >        if (!-d $devconf)
228 >           {
229 >           $self->copywithskip($relconf,$devconf,['toolbox']);
230 >           }
231 >        $envfile = $sat->location()."/".$self->{admindir}."/Environment";
232 >        if (! -f $envfile)
233 >           {
234 >           $sat->save ();
235 >           }
236 >        Utilities::AddDir::copydir("${relconf}/toolbox/".$self->arch(),"${devconf}/toolbox/".$sat->arch());
237 >        Utilities::AddDir::adddir ($sat->location()."/".$sat->sourcedir());
238          return $sat;
239   }
240  
241 < sub copy {
241 > sub copywithskip {
242          my $self=shift;
243 <        my $destination=shift;
244 <
245 <        # copy across the admin dir
341 <        my $temp=$self->location()."/".$self->{admindir};
342 <        AddDir::copydir($temp,"$destination/".$self->{admindir});
343 < }
344 <
345 < sub align {
346 <        my $self=shift;
347 <        use File::Copy;
348 <
349 <        $self->_LoadEnvFile();
350 <        my $Envfile=$self->location()."/".$self->{admindir}."/Environment";
351 <        my $tmpEnvfile=$Envfile.".bak";
352 <        my $rel=$self->{ENV}{RELEASETOP};
353 <        my $local=$self->location();
354 <
355 <        rename( $Envfile, $tmpEnvfile );
356 <        use FileHandle;
357 <        my $fh=FileHandle->new();
358 <        my $fout=FileHandle->new();
359 <        open ( $fh, "<".$tmpEnvfile ) or
360 <                $self->error("Cannot find Environment file. Area Corrupted? ("
361 <                                .$self->location().")\n $!");
362 <        open ( $fout, ">".$Envfile ) or
363 <                $self->error("Cannot find Environment file. Area Corrupted? ("
364 <                                .$self->location().")\n $!");
365 <        while ( <$fh> ) {
366 <          $_=~s/\Q$rel\L/$local/g;
367 <          print $fout $_;
368 <        }
369 <        undef $fh;
370 <        undef $fout;
371 < }
372 <
373 < sub copysetup {
374 <        my $self=shift;
375 <        my $dest=shift;
376 <
243 >        my $src=shift;
244 >        my $des=shift;
245 >        my $filetoskip=shift || [];
246          my $rv=1;
247 <        # copy across the admin dir
248 <        my $temp=$self->location()."/".$self->{admindir}."/".$self->arch();
249 <        my $temp2=$dest."/".$self->{admindir}."/".$self->arch();
250 <        if ( $temp ne $temp2 ) {
251 <         if ( -d $temp ) {
252 <          AddDir::copydir($temp,$temp2);
253 <          $rv=0;
254 <         }
255 <        }
247 >        if ( $src ne $des )
248 >           {
249 >           if ( -d $src )
250 >              {
251 >              my $fs=[];
252 >              foreach my $f (@$filetoskip) {push @$fs,"${src}/${f}";}
253 >              Utilities::AddDir::copydirwithskip($src,$des,$fs);
254 >              $rv=0;
255 >             }
256 >           }
257          return $rv;
258   }
259  
# Line 398 | Line 268 | sub copyenv {
268  
269   sub arch {
270          my $self=shift;
271 <        return $ENV{SCRAM_ARCH};
402 < }
403 <
404 < sub linkto {
405 <        my $self=shift;
406 <        my $location=shift;
407 <        if ( -d $location ) {
408 <        my $area=Configuration::ConfigArea->new();
409 <        $area->bootstrapfromlocation($location);
410 <        $self->linkarea($area);
411 <        }
412 <        else {
413 <          $self->error("ConfigArea : Unable to link to non existing directory ".
414 <                         $location);
415 <        }
416 < }
417 <
418 < sub unlinkarea {
419 <        my $self=shift;
420 <        undef $self->{linkarea};
421 <        $self->{linkarea}=undef;
422 <        $self->save();
423 < }
424 <
425 < sub linkarea {
426 <        my $self=shift;
427 <        my $area=shift;
428 <        if ( defined $area ) {
429 <          $self->{linkarea}=$area;
430 <        }
431 <        return (defined $self->{linkarea} && $self->{linkarea} ne "")?
432 <                        $self->{linkarea}:undef;
271 >        return $self->{archname};
272   }
273  
274   sub save {
# Line 439 | Line 278 | sub save {
278  
279   # ---- support routines
280  
281 < sub _SaveEnvFile {
282 <        my $self=shift;
283 <        use FileHandle;
284 <        my $fh=FileHandle->new();
285 <        open ( $fh, ">".$self->location()."/".$self->{admindir}."/".
286 <                "Environment" ) or
287 <                $self->error("Cannot Open Environment file to Save ("
449 <                                .$self->location().")\n $!");
281 > sub _SaveEnvFile
282 >   {
283 >   my $self=shift;
284 >  
285 >   my $fh;
286 >   my $envfile = $self->location()."/".$self->{admindir}."/Environment";
287 >   open ( $fh, "> $envfile" ) or  $self->error("Cannot Open \"$envfile\" file to Save\n $!");
288          
289 <        print $fh "SCRAM_PROJECTNAME=".$self->name()."\n";
290 <        print $fh "SCRAM_PROJECTVERSION=".$self->version()."\n";
291 <        print $fh "projconfigdir=".$self->configurationdir()."\n";
292 <        print $fh "SCRAM_ProjReqsDoc=".$self->{reqdoc}."\n";
293 <        if ( defined $self->linkarea() ) {
294 <          my $area=$self->linkarea()->location();
295 <          if ( $area ne "" ) {
296 <          print $fh "RELEASETOP=".$area."\n";
297 <          }
298 <        }
299 <        undef $fh;
300 < }
301 <
302 <
303 < sub _LoadEnvFile {
304 <        my $self=shift;
305 <
306 <        use FileHandle;
307 <        my $fh=FileHandle->new();
308 <        open ( $fh, "<".$self->location()."/".$self->{admindir}."/".
309 <                "Environment" ) or
310 <                $self->error("Cannot find Environment file. Area Corrupted? ("
311 <                                .$self->location().")\n $!");
312 <        while ( <$fh> ) {
313 <           chomp;
314 <           next if /^#/;
315 <           next if /^\s*$/ ;
316 <           ($name, $value)=split /=/;
317 <           eval "\$self->{ENV}{${name}}=\"$value\"";
318 <        }
319 <        undef $fh;
289 >   print $fh "SCRAM_PROJECTNAME=".$self->name()."\n";
290 >   print $fh "SCRAM_PROJECTVERSION=".$self->version()."\n";
291 >   print $fh "SCRAM_CONFIGDIR=".$self->configurationdir()."\n";
292 >   print $fh "SCRAM_SOURCEDIR=".$self->sourcedir()."\n";
293 >   print $fh "SCRAM_SYMLINKS=",$self->symlinks(),"\n";
294 >   print $fh "SCRAM_CONFIGCHKSUM=",$self->configchksum(),"\n";
295 >   close($fh);
296 >
297 >   # Set the default permissions (-rw-r--r--):
298 >   my $filemode = 0644;
299 >   chmod $filemode, $self->location()."/".$self->{admindir}."/Environment";
300 >   }
301 >
302 > sub _LoadEnvFile
303 >   {
304 >   my $self=shift;
305 >
306 >   my $fh;
307 >   my $envfile = $self->location()."/".$self->{admindir}."/Environment";
308 >   open ( $fh, "< $envfile" ) or $self->error("Cannot open \"$envfile\" file for reading.\n $!");
309 >   while ( <$fh> )
310 >      {
311 >      chomp;
312 >      next if /^#/;
313 >      next if /^\s*$/ ;
314 >      ($name, $value)=split /=/;
315 >      eval "\$self->{ENV}{${name}}=\"$value\"";
316 >      }
317 >   close($fh);
318 >   $envfile = $self->archdir()."/Environment";
319 >   if (-f $envfile)
320 >      {
321 >      open ( $fh, "< $envfile" ) or $self->error("Cannot open \"$envfile\" file for reading.\n $!");
322 >      while ( <$fh> )
323 >         {
324 >         chomp;
325 >         next if /^#/;
326 >         next if /^\s*$/ ;
327 >         ($name, $value)=split /=/;
328 >         eval "\$self->{ENV}{${name}}=\"$value\"";
329 >         }
330 >      close($fh);
331 >      }
332          
333 <        # -- set internal variables appropriately
334 <        if ( defined $self->{ENV}{"SCRAM_PROJECTNAME"} ) {
335 <          $self->name($self->{ENV}{"SCRAM_PROJECTNAME"});
336 <        }
337 <        if ( defined $self->{ENV}{"SCRAM_PROJECTVERSION"} ) {
338 <          $self->version($self->{ENV}{"SCRAM_PROJECTVERSION"});
339 <        }
340 <        if ( defined $self->{ENV}{"projconfigdir"} ) {
341 <          $self->configurationdir($self->{ENV}{projconfigdir});
342 <        }
343 <        if ( defined $self->{ENV}{"SCRAM_ProjReqsDoc"} ) {
344 <          $self->requirementsdoc($self->{ENV}{SCRAM_ProjReqsDoc});
345 <        }
346 <        if ( ( defined $self->{ENV}{"RELEASETOP"} ) &&
347 <                        ($self->{ENV}{"RELEASETOP"} ne $self->location())) {
348 <          $self->linkto($self->{ENV}{"RELEASETOP"});
349 <        }
350 <        else {
351 <          $self->{ENV}{"RELEASETOP"}=$self->location();
352 <        }
353 < }
333 >   # -- set internal variables appropriately
334 >   if ( defined $self->{ENV}{"SCRAM_PROJECTNAME"} )
335 >      {
336 >      $self->name($self->{ENV}{"SCRAM_PROJECTNAME"});
337 >      }
338 >   if ( defined $self->{ENV}{"SCRAM_SYMLINKS"} )
339 >      {
340 >      $self->symlinks($self->{ENV}{"SCRAM_SYMLINKS"});
341 >      }
342 >   if ( defined $self->{ENV}{"SCRAM_CONFIGCHKSUM"} )
343 >      {
344 >      $self->configchksum($self->{ENV}{"SCRAM_CONFIGCHKSUM"});
345 >      }
346 >   if ( defined $self->{ENV}{"SCRAM_PROJECTVERSION"} )
347 >      {
348 >      $self->version($self->{ENV}{"SCRAM_PROJECTVERSION"});
349 >      }
350 >   if ( defined $self->{ENV}{"SCRAM_CONFIGDIR"} )
351 >      {
352 >      $self->configurationdir($self->{ENV}{"SCRAM_CONFIGDIR"});
353 >      }
354 >   if ( defined $self->{ENV}{"SCRAM_SOURCEDIR"} )
355 >      {
356 >      $self->sourcedir($self->{ENV}{"SCRAM_SOURCEDIR"});
357 >      }
358 >   if ( defined $self->{ENV}{"RELEASETOP"} )
359 >      {
360 >      $self->releasetop($self->{ENV}{"RELEASETOP"});
361 >      }
362 >   }
363 > 1;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines