Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: pym/_emerge/
Date: Wed, 25 Feb 2015 08:34:46
Message-Id: 1424853202.0b453300f4da44a8a32e05f6d75da18847806739.zmedico@gentoo
1 commit: 0b453300f4da44a8a32e05f6d75da18847806739
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Wed Feb 25 06:31:22 2015 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Wed Feb 25 08:33:22 2015 +0000
6 URL: http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=0b453300
7
8 actions.py: fix missing localization import (bug 541302)
9
10 Since commit 206efe5f6341bce99a5e9994a0458c304513b2c3, FEATURES=buildpkg
11 triggers a NameError due to a missing localization import. Fix the
12 NameError, and also allow read-only PKGDIR if the --usepkgonly option
13 is enabled.
14
15 Fixes: 206efe5f6341 ("emerge: check for writable PKGDIR (490732)")
16 X-Gentoo-Bug: 541302
17 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=541302
18 Acked-by: Brian Dolbec <dolsen <AT> gentoo.org>
19
20 ---
21 pym/_emerge/actions.py | 4 +++-
22 1 file changed, 3 insertions(+), 1 deletion(-)
23
24 diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py
25 index fa4fe19..b667537 100644
26 --- a/pym/_emerge/actions.py
27 +++ b/pym/_emerge/actions.py
28 @@ -63,6 +63,7 @@ from portage.util._async.SchedulerInterface import SchedulerInterface
29 from portage.util._eventloop.global_event_loop import global_event_loop
30 from portage._global_updates import _global_updates
31 from portage.sync.old_tree_timestamp import old_tree_timestamp_warn
32 +from portage.localization import _
33 from portage.metadata import action_metadata
34
35 from _emerge.clear_caches import clear_caches
36 @@ -433,7 +434,8 @@ def action_build(settings, trees, mtimedb,
37 _opts_no_self_update.intersection(myopts)
38
39 need_write_bindb = not any(x in myopts for x in
40 - ("--fetchonly", "--fetch-all-uri", "--pretend")) and \
41 + ("--fetchonly", "--fetch-all-uri",
42 + "--pretend", "--usepkgonly")) and \
43 (any("buildpkg" in trees[eroot]["root_config"].
44 settings.features for eroot in trees) or
45 any("buildsyspkg" in trees[eroot]["root_config"].