diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:24:54 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:24:54 +0000 |
commit | 7f129f5a8f509124d9b7d289832862a3145a123c (patch) | |
tree | 83e966af75055ef2f7ec34ec160304d459a989ac /lib/Sbuild/Conf.pm | |
parent | Releasing progress-linux version 0.85.8-0.0~progress7.99u1. (diff) | |
download | sbuild-7f129f5a8f509124d9b7d289832862a3145a123c.tar.xz sbuild-7f129f5a8f509124d9b7d289832862a3145a123c.zip |
Merging upstream version 0.85.9.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'lib/Sbuild/Conf.pm')
-rw-r--r-- | lib/Sbuild/Conf.pm | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/lib/Sbuild/Conf.pm b/lib/Sbuild/Conf.pm index d0e3f6f..ffe56d1 100644 --- a/lib/Sbuild/Conf.pm +++ b/lib/Sbuild/Conf.pm @@ -249,16 +249,18 @@ sub setup ($) { }, 'SCHROOT' => { TYPE => 'STRING', - GROUP => '__INTERNAL', + VARNAME => 'schroot', + GROUP => 'Programs', CHECK => sub { my $conf = shift; my $entry = shift; my $key = $entry->{'NAME'}; # Only validate if needed. - if ($conf->get('CHROOT_MODE') eq 'schroot') { - $validate_program->($conf, $entry); - } + if (defined $conf->_get('CHROOT_MODE') + && $conf->_get('CHROOT_MODE') eq 'schroot') { + $validate_program->($conf, $entry); + } }, DEFAULT => 'schroot', HELP => 'Path to schroot binary' @@ -734,7 +736,13 @@ sub setup ($) { if !isin($conf->get('CHROOT_MODE'), qw(schroot sudo autopkgtest unshare)); }, - DEFAULT => 'schroot', + DEFAULT => undef, + GET => sub { + my $conf = shift; + my $entry = shift; + + return ($conf->_get($entry->{'NAME'}) // 'schroot'); + }, HELP => 'Mechanism to use for chroot virtualisation. Possible value are "schroot" (default), "sudo", "autopkgtest" and "unshare".', CLI_OPTIONS => ['--chroot-mode'] }, |