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