From: Zac Medico Date: Mon, 11 Jul 2011 21:58:09 +0000 (-0700) Subject: autounmask-write: create /etc/portage if needed X-Git-Tag: v2.2.0_alpha44~14 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=428053ee44e4a14b3c74dc8e541bcb062b31a799;p=portage.git autounmask-write: create /etc/portage if needed --- 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],