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.14 by williamc, Mon Aug 28 08:35:14 2000 UTC vs.
Revision 1.40 by muzaffar, Tue Mar 12 15:19:44 2013 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])        : link 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 # - temporary
46 # align()                       : adjust hard paths to suit local loaction
47
1   package Configuration::ConfigArea;
2   require 5.004;
50 use URL::URLcache;
3   use Utilities::AddDir;
4   use Utilities::Verbose;
53 use ObjectUtilities::ObjectStore;
5   use Cwd;
6   @ISA=qw(Utilities::Verbose);
7  
# Line 58 | Line 9 | sub new {
9          my $class=shift;
10          my $self={};
11          bless $self, $class;
12 <
13 <        # data init
14 <        $self->{admindir}=".SCRAM";
15 <        $self->{cachedir}="cache";
65 <        $self->{dbdir}="ObjectDB";
66 <        undef $self->{linkarea};
67 <
12 >        $self->{admindir}=".SCRAM";
13 >        $self->{configurationdir} = "config";
14 >        $self->{forcearch} = shift || "";
15 >        $self->{arch} = $self->{forcearch} || $ENV{SCRAM_ARCH};
16          return $self;
17   }
18  
19 < sub cache {
20 <        my $self=shift;
21 <        if ( @_ ) {
22 <          $self->{cache}=shift;
23 <        }
24 <        elsif ( ! defined $self->{cache} ) {
25 <          my $loc=$self->location()."/".$self->{admindir}."/".$self->{cachedir};
26 <          $self->{cache}=URL::URLcache->new($loc);
27 <        }
28 <        return $self->{cache};
19 > sub toolcachename
20 >   {
21 >   my $self=shift;
22 >   return ($self->archdir()."/ToolCache.db.gz");
23 >   }
24 >
25 > sub projectcachename
26 >   {
27 >   my $self=shift;
28 >   return ($self->archdir()."/ProjectCache.db.gz");
29 >   }
30 >
31 > sub symlinks {
32 >        my $self=shift;
33 >        if (@_) {$self->{symlinks}=shift;}
34 >        return $self->{symlinks};
35 > }
36 >
37 > sub calchksum {
38 >        my $self=shift;
39 >        my $dir=$self->location()."/".$self->configurationdir();
40 >        my $sum="";
41 >        if (-f "${dir}/config_tag")
42 >           {
43 >           my $ref;
44 >           open ($ref, "${dir}/config_tag");
45 >           $sum=<$ref>;
46 >           close($ref);
47 >           chomp $sum;
48 >           }
49 >        else
50 >           {
51 >           push @INC,$dir;
52 >           require SCRAM::Plugins::ProjectChkSum;
53 >           $sum=&SCRAM::Plugins::ProjectChkSum::chksum($dir);
54 >           pop @INC;
55 >           }
56 >        return $sum;
57   }
58  
59 < sub objectstore {
59 > sub configchksum {
60          my $self=shift;
61 <        if ( @_ ) {
62 <          $self->{dbstore}=shift;
87 <        }
88 <        elsif ( ! defined $self->{dbstore} ) {
89 <          my $loc=$self->location()."/".$self->{admindir}."/".$self->{dbdir};
90 <          $self->{dbstore}=ObjectUtilities::ObjectStore->new($loc);
91 <        }
92 <        return $self->{dbstore}
61 >        if (@_) {$self->{configchksum}=shift;}
62 >        return $self->{configchksum};
63   }
64  
65 +
66   sub name {
67          my $self=shift;
68          @_?$self->{name}=shift
# Line 107 | Line 78 | sub version {
78   sub setup {
79          my $self=shift;
80          my $location=shift;
81 <        my $areaname;
82 <
83 <        # -- check we have a project name and version
113 <        my $name=$self->name();
114 <        my $vers=$self->version();
115 <        if ( ( ! defined $name ) && ( ! defined $version )) {
116 <          $self->error("Set ConfigArea name and version before setup");
117 <        }
118 <
119 <        # -- check arguments and set location
120 <        if ( ! defined $location ) {
121 <          $self->error("ConfigArea: Cannot setup new area without a location");
122 <        }
123 <        if ( @_ ) {
124 <          $areaname=shift;
125 <        }
81 >        my $areaname=shift  || undef;
82 >        my $symlinks=shift  || 0;
83 >        my $locarea = shift || undef;
84          if ( (! defined $areaname) || ( $areaname eq "" ) ) {
85 <          # -- make up a name from the project name and version
86 <          $vers=~s/^$name\_//;
87 <          $areaname=$name."_".$vers;
88 <        }
89 <        my $arealoc=$location."/".$areaname;
90 <        my $workloc=$arealoc."/".$self->{admindir};
91 <        $self->verbose("Building at $arealoc");
92 <        $self->location($arealoc);
93 <
94 <        # -- create top level structure and work area
95 <        AddDir::adddir($workloc);
96 <
97 <        # -- add a cache
98 <        $self->cache();
99 <
100 <        # -- Save Environment File
101 <        $self->_SaveEnvFile();
102 <
85 >          $areaname=$self->version();
86 >        }
87 >        $self->location($location."/".$areaname);
88 >        $self->symlinks($symlinks);
89 >        if ($self->configchksum() ne "")
90 >           {
91 >           if ((!-defined $locarea) && (-f "${location}/${areaname}/".$self->admindir()."/Environment"))
92 >              {
93 >              $locarea=Configuration::ConfigArea->new();
94 >              $locarea->bootstrapfromlocation("${location}/${areaname}");
95 >              }
96 >           if ((defined $locarea) && ($locarea->configchksum() != $self->configchksum()))
97 >              {
98 >              print "ERROR: Can not setup your current working area for SCRAM_ARCH: $ENV{SCRAM_ARCH}\n",
99 >                    "Your current development area ${location}/${areaname}\n",
100 >                    "is using a different ${areaname}/config then the one used for\n",
101 >                    $self->releasetop(),".\n";
102 >              exit 1;
103 >              }
104 >           }
105 >        Utilities::AddDir::adddir($self->archdir());
106   }
107  
108   sub configurationdir {
# Line 152 | Line 113 | sub configurationdir {
113          return (defined $self->{configurationdir})?$self->{configurationdir}:undef;
114   }
115  
116 < sub toolbox {
116 > sub sourcedir {
117          my $self=shift;
118 <        if ( ! defined $self->{toolbox} ) {
119 <          $self->{toolbox}=BuildSystem::ToolBox->new($self);
118 >        if ( @_ ) {
119 >          $self->{sourcedir}=shift;
120          }
121 <        return $self->{toolbox};
121 >        return (defined $self->{sourcedir})?$self->{sourcedir}:undef;
122   }
123  
124 < sub requirementsdoc {
124 > sub releasetop {
125          my $self=shift;
126          if ( @_ ) {
127 <          $self->{reqdoc}=shift;
167 <        }
168 <        if ( defined $self->{reqdoc} ) {
169 <          return $self->location()."/".$self->{reqdoc};
170 <        }
171 <        else {
172 <          return undef;
127 >          $self->{releasetop}=shift;
128          }
129 +        return (defined $self->{releasetop})?$self->{releasetop}:undef;
130   }
131  
132 < sub scramversion {
133 <        my $self=shift;
134 <        if ( ! defined $self->{scramversion} ) {
135 <          my $filename=$self->location()."/".$self->configurationdir()."/".
136 <                                                        "scram_version";
137 <          if ( -f $filename ) {
138 <            use FileHandle;
183 <            $fh=FileHandle->new();
184 <            open ($fh, "<".$filename);
185 <            my $version=<$fh>;
186 <            chomp $version;
187 <            $self->{scramversion}=$version;
188 <            undef $fh;
189 <          }
190 <        }
191 <        return $self->{scramversion};
192 < }
132 > sub admindir()
133 >   {
134 >   my $self=shift;
135 >  
136 >   @_ ? $self->{admindir} = shift
137 >      : $self->{admindir};
138 >   }
139  
140   sub bootstrapfromlocation {
141          my $self=shift;
142 <
142 >        my $location = $self->searchlocation(shift);
143          my $rv=0;
144 <        
199 <        my $location;
200 <        if ( ! defined ($location=$self->searchlocation(@_)) ) {
144 >        if ( ! defined $location) {
145           $rv=1;
202         $self->verbose("Unable to locate the top of local configuration area");
146          }
147          else {
148           $self->location($location);
206         $self->verbose("Found top ".$self->location());
207         my $infofile=$self->location()."/".$self->{admindir}."/ConfigArea.dat";
149           $self->_LoadEnvFile();
150          }
151          return $rv;
# Line 215 | Line 156 | sub location {
156  
157          if ( @_ ) {
158            $self->{location}=shift;
159 +          delete $self->{archs};
160 +          $self->_setAreaArch();
161          }
162          elsif ( ! defined $self->{location} ) {
163            # try and find the release location
164            $self->{location}=$self->searchlocation();
165 +          if (defined $self->{location})
166 +             {
167 +             $self->_setAreaArch()
168 +             }
169          }
170          return  $self->{location};
171   }
172  
173   sub searchlocation {
174          my $self=shift;
175 <
175 >        
176          #start search in current directory if not specified
177          my $thispath;
178          if ( @_ ) {
# Line 234 | Line 181 | sub searchlocation {
181          else {
182            $thispath=cwd();
183          }
184 <
184 >        
185          my $rv=0;
186  
187          # chop off any files - we only want dirs
# Line 250 | Line 197 | sub searchlocation {
197              last Sloop;
198            }
199          } while ( ($thispath=~s/(.*)\/.*/$1/)=~/./ ) };
200 <
200 >      
201          return $rv?$thispath:undef;
202   }
203  
204   sub archname {
205          my $self=shift;
206          if ( @_ ) {
207 <          $self->{archname}=shift;
207 >          $self->{arch} = shift;
208 >          if (defined $self->{location}) {
209 >             $self->archdir($self->{location}."/".$self->{admindir}."/".$self->{arch});
210 >          }
211          }
212 <        return $self->{archname};
212 >        return $self->{arch};
213   }
214  
215   sub archdir {
# Line 267 | Line 217 | sub archdir {
217          if ( @_ ) {
218            $self->{archdir}=shift;
219          }
270        if ( ! defined $self->{archdir} ) {
271         if ( defined $self->{archname} ) {
272          $self->{archdir}=$self->location()."/".$self->{admindir}."/".
273                                                        $self->{archname};
274         }
275         else {
276          $self->error("ConfigArea : cannot create arch directory - ".
277                                                "architecture name not set")
278         }
279        }
220          return $self->{archdir};
221   }
222  
223   sub satellite {
224          my $self=shift;
225 <
226 <        # -- create the sat object
287 <        my $sat=Configuration::ConfigArea->new();
225 >        my $relloc = $self->location();
226 >        my $sat=Configuration::ConfigArea->new($ENV{SCRAM_ARCH});
227          $sat->name($self->name());
228          $sat->version($self->version());
290        $sat->requirementsdoc($self->{reqdoc});
229          $sat->configurationdir($self->configurationdir());
230 +        $sat->sourcedir($self->sourcedir());
231 +        $sat->releasetop($relloc);
232 +        $sat->configchksum($self->configchksum());
233          $sat->setup(@_);
234 <
235 <        # -- copy across the cache and ObjectStore
236 <        copy($self->cache()->location(),$sat->cache()->location());
237 <        copy($self->objectstore()->location(),$sat->objectstore()->location());
238 <
239 <        # and make sure in reinitialises
240 <        undef ($sat->{cache});
241 <
242 <        # -- link it to this area
243 <        $sat->linkarea($self);
244 <        
245 <        # -- save it
246 <        $sat->save();
247 <
234 >        $self->copywithskip($self->archdir(),$sat->archdir(),["InstalledTools","ProjectCache.db.gz","RuntimeCache.db.gz","DirCache.db.gz","MakeData/DirCache","MakeData/DirCache.mk","MakeData/src.mk"]);
235 >        $envfile = $sat->archdir()."/Environment";
236 >        open ( $fh, "> $envfile" ) or  $sat->error("Cannot Open \"$envfile\" file to Save\n $!");
237 >        print $fh "RELEASETOP=$relloc\n";
238 >        close($fh);
239 >        my $devconf = $sat->location()."/".$sat->configurationdir();
240 >        my $relconf = $self->location()."/".$self->configurationdir();
241 >        if (!-d $devconf)
242 >           {
243 >           $self->copywithskip($relconf,$devconf,['toolbox']);
244 >           }
245 >        $envfile = $sat->location()."/".$self->{admindir}."/Environment";
246 >        if (! -f $envfile)
247 >           {
248 >           $sat->save ();
249 >           }
250 >        Utilities::AddDir::copydir("${relconf}/toolbox/".$self->{arch},"${devconf}/toolbox/".$self->{arch});
251 >        Utilities::AddDir::adddir ($sat->location()."/".$sat->sourcedir());
252          return $sat;
253   }
254  
255 < sub copy {
311 <        my $self=shift;
312 <        my $destination=shift;
313 <
314 <        # copy across the admin dir
315 <        my $temp=$self->location()."/".$self->{admindir};
316 <        AddDir::copydir($temp,"$destination/".$self->{admindir});
317 < }
318 <
319 < sub align {
255 > sub copywithskip {
256          my $self=shift;
257 <        use File::Copy;
258 <
259 <        $self->_LoadEnvFile();
324 <        my $Envfile=$self->location()."/".$self->{admindir}."/Environment";
325 <        my $tmpEnvfile=$Envfile.".bak";
326 <        my $rel=$self->{ENV}{RELEASETOP};
327 <        my $local=$self->location();
328 <
329 <        rename( $Envfile, $tmpEnvfile );
330 <        use FileHandle;
331 <        my $fh=FileHandle->new();
332 <        my $fout=FileHandle->new();
333 <        open ( $fh, "<".$tmpEnvfile ) or
334 <                $self->error("Cannot find Environment file. Area Corrupted? ("
335 <                                .$self->location().")\n $!");
336 <        open ( $fout, ">".$Envfile ) or
337 <                $self->error("Cannot find Environment file. Area Corrupted? ("
338 <                                .$self->location().")\n $!");
339 <        while ( <$fh> ) {
340 <          $_=~s/\Q$rel\L/$local/g;
341 <          print $fout $_;
342 <        }
343 <        undef $fh;
344 <        undef $fout;
345 < }
346 <
347 < sub copysetup {
348 <        my $self=shift;
349 <        my $dest=shift;
350 <
257 >        my $src=shift;
258 >        my $des=shift;
259 >        my $filetoskip=shift || [];
260          my $rv=1;
261 <        # copy across the admin dir
262 <        my $temp=$self->location()."/".$self->{admindir}."/".$self->arch();
263 <        my $temp2=$dest."/".$self->{admindir}."/".$self->arch();
264 <        if ( $temp ne $temp2 ) {
265 <         if ( -d $temp ) {
266 <          AddDir::copydir($temp,$temp2);
267 <          $rv=0;
268 <         }
269 <        }
261 >        if ( $src ne $des )
262 >           {
263 >           if ( -d $src )
264 >              {
265 >              my $fs=[];
266 >              foreach my $f (@$filetoskip) {push @$fs,"${src}/${f}";}
267 >              Utilities::AddDir::copydirwithskip($src,$des,$fs);
268 >              $rv=0;
269 >             }
270 >           }
271          return $rv;
272   }
273  
# Line 372 | Line 282 | sub copyenv {
282  
283   sub arch {
284          my $self=shift;
285 <        return $ENV{SCRAM_ARCH};
376 < }
377 <
378 < sub linkto {
379 <        my $self=shift;
380 <        my $location=shift;
381 <        if ( -d $location ) {
382 <        my $area=Configuration::ConfigArea->new();
383 <        $area->bootstrapfromlocation($location);
384 <        $self->linkarea($area);
385 <        }
386 <        else {
387 <          $self->error("ConfigArea : Unable to link to non existing directory ".
388 <                         $location);
389 <        }
390 < }
391 <
392 < sub unlinkarea {
393 <        my $self=shift;
394 <        undef $self->{linkarea};
395 <        $self->{linkarea}=undef;
396 <        $self->save();
397 < }
398 <
399 < sub linkarea {
400 <        my $self=shift;
401 <        my $area=shift;
402 <        if ( defined $area ) {
403 <          $self->{linkarea}=$area;
404 <        }
405 <        return (defined $self->{linkarea} && $self->{linkarea} ne "")?
406 <                        $self->{linkarea}:undef;
285 >        return $self->{arch};
286   }
287  
288   sub save {
# Line 413 | Line 292 | sub save {
292  
293   # ---- support routines
294  
295 < sub _SaveEnvFile {
296 <        my $self=shift;
297 <        use FileHandle;
298 <        my $fh=FileHandle->new();
299 <        open ( $fh, ">".$self->location()."/".$self->{admindir}."/".
300 <                "Environment" ) or
301 <                $self->error("Cannot Open Environment file to Save ("
302 <                                .$self->location().")\n $!");
303 <        
304 <        print $fh "SCRAM_PROJECTNAME=".$self->name()."\n";
305 <        print $fh "SCRAM_PROJECTVERSION=".$self->version()."\n";
306 <        print $fh "projconfigdir=".$self->configurationdir()."\n";
307 <        print $fh "SCRAM_ProjReqsDoc=".$self->{reqdoc}."\n";
308 <        if ( defined $self->linkarea() ) {
309 <          my $area=$self->linkarea()->location();
310 <          if ( $area ne "" ) {
311 <          print $fh "RELEASETOP=".$area."\n";
312 <          }
313 <        }
314 <        undef $fh;
295 > sub _setAreaArch {
296 >  my ($self) = @_;
297 >  my $arch = $self->{forcearch};
298 >  if ($arch eq "")
299 >  {
300 >    if (!exists $self->{archs})
301 >    {
302 >      $self->{archs}=[];
303 >      my $toolbox = $self->{location}.'/'.$self->{configurationdir}.'/toolbox';
304 >      foreach my $arch (glob("${toolbox}/*")) {
305 >        if (-d "${arch}/tools") {
306 >          $arch=~s/^$toolbox\///;
307 >          push @{$self->{archs}},$arch;
308 >        }
309 >      }
310 >    }
311 >    if ((!-d "${toolbox}/".$self->{arch}) && (scalar(@{$self->{archs}})==1)) { $arch = $self->{archs}[0]; }
312 >  }
313 >  $self->archname($arch || $self->{arch});
314 >  return;
315   }
316  
317 <
318 < sub _LoadEnvFile {
319 <        my $self=shift;
320 <
321 <        use FileHandle;
322 <        my $fh=FileHandle->new();
323 <        open ( $fh, "<".$self->location()."/".$self->{admindir}."/".
445 <                "Environment" ) or
446 <                $self->error("Cannot find Environment file. Area Corrupted? ("
447 <                                .$self->location().")\n $!");
448 <        while ( <$fh> ) {
449 <           chomp;
450 <           next if /^#/;
451 <           next if /^\s*$/ ;
452 <           ($name, $value)=split /=/;
453 <           eval "\$self->{ENV}{${name}}=\"$value\"";
454 <        }
455 <        undef $fh;
317 > sub _SaveEnvFile
318 >   {
319 >   my $self=shift;
320 >  
321 >   my $fh;
322 >   my $envfile = $self->location()."/".$self->{admindir}."/Environment";
323 >   open ( $fh, "> $envfile" ) or  $self->error("Cannot Open \"$envfile\" file to Save\n $!");
324          
325 <        # -- set internal variables appropriately
326 <        if ( defined $self->{ENV}{"SCRAM_PROJECTNAME"} ) {
327 <          $self->name($self->{ENV}{"SCRAM_PROJECTNAME"});
328 <        }
329 <        if ( defined $self->{ENV}{"SCRAM_PROJECTVERSION"} ) {
330 <          $self->version($self->{ENV}{"SCRAM_PROJECTVERSION"});
331 <        }
332 <        if ( defined $self->{ENV}{"projconfigdir"} ) {
333 <          $self->configurationdir($self->{ENV}{projconfigdir});
334 <        }
335 <        if ( defined $self->{ENV}{"SCRAM_ProjReqsDoc"} ) {
336 <          $self->requirementsdoc($self->{ENV}{SCRAM_ProjReqsDoc});
337 <        }
338 <        if ( ( defined $self->{ENV}{"RELEASETOP"} ) &&
339 <                        ($self->{ENV}{"RELEASETOP"} ne $self->location())) {
340 <          $self->linkto($self->{ENV}{"RELEASETOP"});
341 <        }
342 <        else {
343 <          $self->{ENV}{"RELEASETOP"}=$self->location();
344 <        }
345 < }
325 >   print $fh "SCRAM_PROJECTNAME=".$self->name()."\n";
326 >   print $fh "SCRAM_PROJECTVERSION=".$self->version()."\n";
327 >   print $fh "SCRAM_CONFIGDIR=".$self->configurationdir()."\n";
328 >   print $fh "SCRAM_SOURCEDIR=".$self->sourcedir()."\n";
329 >   print $fh "SCRAM_SYMLINKS=",$self->symlinks(),"\n";
330 >   print $fh "SCRAM_CONFIGCHKSUM=",$self->configchksum(),"\n";
331 >   close($fh);
332 >
333 >   # Set the default permissions (-rw-r--r--):
334 >   my $filemode = 0644;
335 >   chmod $filemode, $self->location()."/".$self->{admindir}."/Environment";
336 >   }
337 >
338 > sub _LoadEnvFile
339 >   {
340 >   my $self=shift;
341 >
342 >   my $fh;
343 >   my $envfile = $self->location()."/".$self->{admindir}."/Environment";
344 >   open ( $fh, "< $envfile" ) or $self->error("Cannot open \"$envfile\" file for reading.\n $!");
345 >   while ( <$fh> )
346 >      {
347 >      chomp;
348 >      next if /^#/;
349 >      next if /^\s*$/ ;
350 >      ($name, $value)=split /=/;
351 >      eval "\$self->{ENV}{${name}}=\"$value\"";
352 >      }
353 >   close($fh);
354 >   $envfile = $self->archdir()."/Environment";
355 >   if (-f $envfile)
356 >      {
357 >      open ( $fh, "< $envfile" ) or $self->error("Cannot open \"$envfile\" file for reading.\n $!");
358 >      while ( <$fh> )
359 >         {
360 >         chomp;
361 >         next if /^#/;
362 >         next if /^\s*$/ ;
363 >         ($name, $value)=split /=/;
364 >         eval "\$self->{ENV}{${name}}=\"$value\"";
365 >         }
366 >      close($fh);
367 >      }
368 >        
369 >   # -- set internal variables appropriately
370 >   if ( defined $self->{ENV}{"SCRAM_PROJECTNAME"} )
371 >      {
372 >      $self->name($self->{ENV}{"SCRAM_PROJECTNAME"});
373 >      }
374 >   if ( defined $self->{ENV}{"SCRAM_SYMLINKS"} )
375 >      {
376 >      $self->symlinks($self->{ENV}{"SCRAM_SYMLINKS"});
377 >      }
378 >   if ( defined $self->{ENV}{"SCRAM_CONFIGCHKSUM"} )
379 >      {
380 >      $self->configchksum($self->{ENV}{"SCRAM_CONFIGCHKSUM"});
381 >      }
382 >   if ( defined $self->{ENV}{"SCRAM_PROJECTVERSION"} )
383 >      {
384 >      $self->version($self->{ENV}{"SCRAM_PROJECTVERSION"});
385 >      }
386 >   if ( defined $self->{ENV}{"SCRAM_CONFIGDIR"} )
387 >      {
388 >      $self->configurationdir($self->{ENV}{"SCRAM_CONFIGDIR"});
389 >      }
390 >   if ( defined $self->{ENV}{"SCRAM_SOURCEDIR"} )
391 >      {
392 >      $self->sourcedir($self->{ENV}{"SCRAM_SOURCEDIR"});
393 >      }
394 >   if ( defined $self->{ENV}{"RELEASETOP"} )
395 >      {
396 >      $self->releasetop($self->{ENV}{"RELEASETOP"});
397 >      }
398 >   }
399 > 1;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines