diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 13:47:24 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 13:47:24 +0000 |
commit | 046f5fb765312e9ca387a2642099d4f5ec0f4eaa (patch) | |
tree | 192457ff422b24b0c57333cc75dba80ca79fa50c /lib/Sbuild/Build.pm | |
parent | Adding upstream version 0.85.6. (diff) | |
download | sbuild-046f5fb765312e9ca387a2642099d4f5ec0f4eaa.tar.xz sbuild-046f5fb765312e9ca387a2642099d4f5ec0f4eaa.zip |
Adding upstream version 0.85.7.upstream/0.85.7
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'lib/Sbuild/Build.pm')
-rw-r--r-- | lib/Sbuild/Build.pm | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/lib/Sbuild/Build.pm b/lib/Sbuild/Build.pm index cca1c89..7a23a85 100644 --- a/lib/Sbuild/Build.pm +++ b/lib/Sbuild/Build.pm @@ -640,13 +640,6 @@ END debug("Error run_chroot_session(): $@") if $@; - if ($self->get('Pkg Status') ne "successful") { - if(!$self->run_external_commands("post-build-failed-commands")) { - Sbuild::Exception::Build->throw(error => "Failed to execute post-build-commands", - failstage => "run-post-build-failed-commands"); - } - } - # End chroot session my $session = $self->get('Session'); if (defined $session) { @@ -833,6 +826,9 @@ sub run_fetch_install_packages { $self->set('Install Start Time', time); $self->set('Install End Time', $self->get('Install Start Time')); my @coredeps = @{$self->get_conf('CORE_DEPENDS')}; + if ($self->get_conf('CHROOT_MODE') eq 'unshare') { + push(@coredeps, 'dumb-init'); + } if ($self->get('Host Arch') ne $self->get('Build Arch')) { my $crosscoredeps = $self->get_conf('CROSSBUILD_CORE_DEPENDS'); if (defined($crosscoredeps->{$self->get('Host Arch')})) { @@ -1010,6 +1006,13 @@ sub run_fetch_install_packages { } } + if ($self->get('Pkg Status') ne "successful") { + if(!$self->run_external_commands("post-build-failed-commands")) { + Sbuild::Exception::Build->throw(error => "Failed to execute post-build-commands", + failstage => "run-post-build-failed-commands"); + } + } + $self->log_subsection("Cleanup"); my $session = $self->get('Session'); my $resolver = $self->get('Dependency Resolver'); @@ -2593,7 +2596,8 @@ sub build { PRIORITY => 0, DIR => $dscdir, STREAMERR => \*STDOUT, - DISABLE_NETWORK => 1, + ENABLE_NETWORK => $self->get_conf('ENABLE_NETWORK'), + BUILD_INSIDE_INIT => 1, }; my $pipe = $session->pipe_command($command); |