Gentoo Archives: gentoo-portage-dev

From: Zac Medico <zmedico@g.o>
To: gentoo-portage-dev@l.g.o
Cc: Zac Medico <zmedico@g.o>
Subject: [gentoo-portage-dev] [PATCH] Allow read-only PKGDIR if no ebuilds will be built (bug 549072)
Date: Wed, 13 May 2015 01:15:42
Message-Id: 1431479714-3209-1-git-send-email-zmedico@gentoo.org
1 X-Gentoo-Bug: 549072
2 X-Gentoo-Bug-url: https://bugs.gentoo.org/show_bug.cgi?id=549072
3 ---
4 pym/_emerge/actions.py | 5 ++++-
5 1 file changed, 4 insertions(+), 1 deletion(-)
6
7 diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py
8 index b667537..92d1f2e 100644
9 --- a/pym/_emerge/actions.py
10 +++ b/pym/_emerge/actions.py
11 @@ -444,9 +444,12 @@ def action_build(settings, trees, mtimedb,
12 if need_write_bindb or need_write_vardb:
13
14 eroots = set()
15 + ebuild_eroots = set()
16 for x in mydepgraph.altlist():
17 if isinstance(x, Package) and x.operation == "merge":
18 eroots.add(x.root)
19 + if x.type_name == "ebuild":
20 + ebuild_eroots.add(x.root)
21
22 for eroot in eroots:
23 if need_write_vardb and \
24 @@ -457,7 +460,7 @@ def action_build(settings, trees, mtimedb,
25 level=logging.ERROR, noiselevel=-1)
26 return 1
27
28 - if need_write_bindb and \
29 + if need_write_bindb and eroot in ebuild_eroots and \
30 ("buildpkg" in trees[eroot]["root_config"].
31 settings.features or
32 "buildsyspkg" in trees[eroot]["root_config"].
33 --
34 2.3.5