commit:     ddf341ef86c0939026818a231f79086f0ae2ecfe
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Wed May 13 01:14:38 2015 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed May 13 01:21:57 2015 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=ddf341ef

Allow read-only PKGDIR if no ebuilds will be built (bug 549072)

X-Gentoo-Bug: 549072
X-Gentoo-Bug-url: https://bugs.gentoo.org/show_bug.cgi?id=549072
Acked-by: Brian Dolbec <dolsen <AT> gentoo.org>

 pym/_emerge/actions.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py
index b667537..92d1f2e 100644
--- a/pym/_emerge/actions.py
+++ b/pym/_emerge/actions.py
@@ -444,9 +444,12 @@ def action_build(settings, trees, mtimedb,
                if need_write_bindb or need_write_vardb:
 
                        eroots = set()
+                       ebuild_eroots = set()
                        for x in mydepgraph.altlist():
                                if isinstance(x, Package) and x.operation == 
"merge":
                                        eroots.add(x.root)
+                                       if x.type_name == "ebuild":
+                                               ebuild_eroots.add(x.root)
 
                        for eroot in eroots:
                                if need_write_vardb and \
@@ -457,7 +460,7 @@ def action_build(settings, trees, mtimedb,
                                                level=logging.ERROR, 
noiselevel=-1)
                                        return 1
 
-                               if need_write_bindb and \
+                               if need_write_bindb and eroot in ebuild_eroots 
and \
                                        ("buildpkg" in 
trees[eroot]["root_config"].
                                        settings.features or
                                        "buildsyspkg" in 
trees[eroot]["root_config"].

Reply via email to