Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.bugs.dist > #1224709
| From | Chris Hofstaedtler <zeha@debian.org> |
|---|---|
| Newsgroups | linux.debian.bugs.dist |
| Subject | Bug#1090358: sbuild: please pre-set config variables with their defaults |
| Date | 2024-12-18 09:20 +0100 |
| Message-ID | <JUXrH-ryV-1@gated-at.bofh.it> (permalink) |
| References | (3 earlier) <JUN90-iMd-9@gated-at.bofh.it> <JUORr-jTd-1@gated-at.bofh.it> <JUX8l-raq-1@gated-at.bofh.it> <JUFO9-e8g-3@gated-at.bofh.it> <JUX8l-raq-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
* Chris Hofstaedtler <zeha@debian.org> [241218 08:48]:
> * Johannes Schauer Marin Rodrigues <josch@debian.org> [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
Back to linux.debian.bugs.dist | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Bug#1090358: sbuild: please pre-set config variables with their defaults Chris Hofstaedtler <zeha@debian.org> - 2024-12-17 14:30 +0100
Bug#1090358: sbuild: please pre-set config variables with their defaults Chris Hofstaedtler <zeha@debian.org> - 2024-12-17 15:10 +0100
Bug#1090358: sbuild: please pre-set config variables with their defaults Chris Hofstaedtler <zeha@debian.org> - 2024-12-17 15:30 +0100
Bug#1090358: sbuild: please pre-set config variables with their defaults Johannes Schauer Marin Rodrigues <josch@debian.org> - 2024-12-17 15:30 +0100
Bug#1090358: sbuild: please pre-set config variables with their defaults Chris Hofstaedtler <zeha@debian.org> - 2024-12-17 16:00 +0100
Bug#1090358: sbuild: please pre-set config variables with their defaults Chris Hofstaedtler <zeha@debian.org> - 2024-12-17 22:20 +0100
Bug#1090358: sbuild: please pre-set config variables with their defaults Johannes Schauer Marin Rodrigues <josch@debian.org> - 2024-12-18 00:10 +0100
Bug#1090358: sbuild: please pre-set config variables with their defaults Chris Hofstaedtler <zeha@debian.org> - 2024-12-18 09:00 +0100
Bug#1090358: sbuild: please pre-set config variables with their defaults Chris Hofstaedtler <zeha@debian.org> - 2024-12-18 09:20 +0100
Bug#1090358: sbuild: please pre-set config variables with their defaults Johannes Schauer Marin Rodrigues <josch@debian.org> - 2024-12-18 17:10 +0100
csiph-web