* Chris Hofstaedtler <[email protected]> [241218 08:48]: > * 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.
It is. Not sure why my config still evaluates at all. It it was just about BUILD_DIR, maybe we can get away with ignoring vars that have IGNORE_DEFAULT => 1? Chris

