diff options
Diffstat (limited to 'iurt')
-rwxr-xr-x | iurt | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -503,7 +503,7 @@ my %config_usage = ( }, use_netns => { desc => 'Create a separate network namespace for each chroot to prevent builds from accessing the network', - default => 1 + default => { default => 1 } }, ); @@ -720,17 +720,20 @@ sub rebuild_one { retry: $urpmi->clean_urpmi_process; + $srpm =~ /(.*)-[^-]+-[^-]+\.src\.rpm$/ or return $srpm; + my $srpm_name = $1; + if (!$run{use_old_chroot}) { plog('DEBUG', 'Not reusing old chroot'); + my $use_netns = defined($config->{use_netns}{$srpm_name}) ? $config->{use_netns}{$srpm_name} : $config->{use_netns}{default}; $chroot_tmp = create_temp_chroot(\%run, $config, - $chroot_tmp, $chroot_ref) or return $srpm; + $chroot_tmp, $chroot_ref, $use_netns) or return $srpm; } if (!$urpmi->urpmi_command($chroot_tmp)) { plog('ERROR', "Creating chroot failed.\nCommand was: $chroot_tmp"); return $srpm; } - $srpm =~ /(.*)-[^-]+-[^-]+\.src\.rpm$/ or return $srpm; my ($maintainer, $cc); if (!$run{warn}) { ($maintainer) = get_maint(\%run, $srpm); |