* Johannes Schauer Marin Rodrigues <[email protected]> [241217 23:59]:
> The patch in this bug report sets the value
> of BUILD_DIR to the unpacked source dir and thus, changing the default of
> BUILD_DIR later on has no effect anymore because the value was already
> set to the default from back then...
> 
> The fix is not trivial considering that we don't want the fix to this to break
> more things...

I haven't yet looked at what code touches BUILD_DIR exactly, but an
interim thing that one could ponder:

  --- a/lib/Sbuild/ConfBase.pm
  +++ b/lib/Sbuild/ConfBase.pm
  @@ -502,7 +502,13 @@ sub read ($$$$) {
          next if $conf->_get_group($key) =~ m/^__/;
  
          my $varname = $conf->_get_varname($key);
  -       $script .= "my \$$varname = undef;\n";
  +        my $vardefault = $conf->_get_default($key);
  +        my $varget = $conf->_get_property_value($key, 'DEFAULT');
  +        if (!defined $varget and defined $vardefault) {
  +            $script .= "my " . Data::Dumper->Dump([$vardefault], [$varname]);
  +        } else {
  +            $script .= "my \$$varname = undef;\n";
  +        }
       }
  
       # For compatibility only.  Non-scalars are deprecated.

This may be wrong for other reasons.

But if that works, afterwards 'GET'-functions could maybe be
deprecated altogether? (This is unfounded speculation; I really need
to look at Conf.pm and see what these things all do.)

Chris
  

Reply via email to