From 428053ee44e4a14b3c74dc8e541bcb062b31a799 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 11 Jul 2011 14:58:09 -0700 Subject: [PATCH] autounmask-write: create /etc/portage if needed --- pym/_emerge/depgraph.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index 549ce7f2e..8219a7738 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -30,6 +30,7 @@ from portage._sets import SETPREFIX from portage._sets.base import InternalPackageSet from portage.util import ConfigProtect, shlex_split, new_protect_filename from portage.util import cmp_sort_key, writemsg, writemsg_stdout +from portage.util import ensure_dirs from portage.util import writemsg_level, write_atomic from portage.util.digraph import digraph from portage.util.listdir import _ignorecvs_dirs @@ -5982,11 +5983,12 @@ class depgraph(object): if userquery(prompt, enter_invalid) == 'No': write_to_file = False - if write_to_file: + if write_to_file and file_to_write_to: for root in roots: settings = self._frozen_config.roots[root].settings abs_user_config = os.path.join( settings["PORTAGE_CONFIGROOT"], USER_CONFIG_PATH) + ensure_dirs(abs_user_config) if root in unstable_keyword_msg: write_changes(root, unstable_keyword_msg[root], -- 2.26.2