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] actions.py: fix missing localization import (bug 541302)
Date: Wed, 25 Feb 2015 06:32:22
Message-Id: 1424845925-6587-1-git-send-email-zmedico@gentoo.org
1 Since commit 206efe5f6341bce99a5e9994a0458c304513b2c3, FEATURES=buildpkg
2 triggers a NameError due to a missing localization import. Fix the
3 NameError, and also allow read-only PKGDIR if the --usepkgonly option
4 is enabled.
5
6 Fixes: 206efe5f6341 ("emerge: check for writable PKGDIR (490732)")
7 X-Gentoo-Bug: 541302
8 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=541302
9 ---
10 pym/_emerge/actions.py | 4 +++-
11 1 file changed, 3 insertions(+), 1 deletion(-)
12
13 diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py
14 index fa4fe19..b667537 100644
15 --- a/pym/_emerge/actions.py
16 +++ b/pym/_emerge/actions.py
17 @@ -63,6 +63,7 @@ from portage.util._async.SchedulerInterface import SchedulerInterface
18 from portage.util._eventloop.global_event_loop import global_event_loop
19 from portage._global_updates import _global_updates
20 from portage.sync.old_tree_timestamp import old_tree_timestamp_warn
21 +from portage.localization import _
22 from portage.metadata import action_metadata
23
24 from _emerge.clear_caches import clear_caches
25 @@ -433,7 +434,8 @@ def action_build(settings, trees, mtimedb,
26 _opts_no_self_update.intersection(myopts)
27
28 need_write_bindb = not any(x in myopts for x in
29 - ("--fetchonly", "--fetch-all-uri", "--pretend")) and \
30 + ("--fetchonly", "--fetch-all-uri",
31 + "--pretend", "--usepkgonly")) and \
32 (any("buildpkg" in trees[eroot]["root_config"].
33 settings.features for eroot in trees) or
34 any("buildsyspkg" in trees[eroot]["root_config"].
35 --
36 2.0.5

Replies