On 7/29/19 5:39 AM, Ulrich Mueller wrote:
>>>>>> On Sat, 27 Jul 2019, Michał Górny wrote:
> 
>> While at it, could you look into making src_unpack() network-sandbox
>> override apply only to ebuilds with PROPERTIES=live?
> 
> I believe the patch included below would do that.
> 
> Ulrich
> 
> 
> From f4ebd25a04d5eb64504724b711b41141723afcd4 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Ulrich=20M=C3=BCller?= <u...@gentoo.org>
> Date: Mon, 29 Jul 2019 14:22:57 +0200
> Subject: [PATCH] doebuild.py: Override network-sandbox only for live ebuilds.
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
> 
> Suggested-by: Michał Górny <mgo...@gentoo.org>
> Signed-off-by: Ulrich Müller <u...@gentoo.org>
> ---
>  lib/portage/package/ebuild/doebuild.py | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/portage/package/ebuild/doebuild.py 
> b/lib/portage/package/ebuild/doebuild.py
> index 67867d33e..cab838ead 100644
> --- a/lib/portage/package/ebuild/doebuild.py
> +++ b/lib/portage/package/ebuild/doebuild.py
> @@ -156,7 +156,8 @@ def _doebuild_spawn(phase, settings, actionmap=None, 
> **kwargs):
>               phase in _ipc_phases
>       kwargs['mountns'] = 'mount-sandbox' in settings.features
>       kwargs['networked'] = 'network-sandbox' not in settings.features or \
> -             phase in _networked_phases or \
> +             (phase in _networked_phases and \
> +             'live' in settings.configdict['pkg'].get('PROPERTIES', 
> '').split()) or \
>               'network-sandbox' in settings['PORTAGE_RESTRICT'].split()
>       kwargs['pidns'] = ('pid-sandbox' in settings.features and
>               phase not in _global_pid_phases)
> 

This will enable network-sandbox for all of _networked_phases, but
Michał only suggested to do it for src_unpack.
-- 
Thanks,
Zac

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to