diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-11-19 10:57:35 -0800 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-11-23 18:04:42 -0800 |
commit | 224fa08d85288248d5c4a7bfab2937d5a00d9dc3 (patch) | |
tree | 38b89e8a5833ad46602872cb70ffd016bf1771cb /pym/_emerge/actions.py | |
parent | c5c4523f16a99b1b65330ddbcf8bace310431c46 (diff) | |
download | portage-224fa08d85288248d5c4a7bfab2937d5a00d9dc3.tar.gz portage-224fa08d85288248d5c4a7bfab2937d5a00d9dc3.tar.bz2 portage-224fa08d85288248d5c4a7bfab2937d5a00d9dc3.zip |
Fix emerge --sync PORTDIR creation.
Diffstat (limited to 'pym/_emerge/actions.py')
-rw-r--r-- | pym/_emerge/actions.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py index 1d334bde7..fc2048ab3 100644 --- a/pym/_emerge/actions.py +++ b/pym/_emerge/actions.py @@ -1888,6 +1888,12 @@ def action_sync(settings, trees, mtimedb, myopts, myaction): emergelog(xterm_titles, " === sync") portdb = trees[settings["ROOT"]]["porttree"].dbapi myportdir = portdb.porttree_root + if not myportdir: + myportdir = settings.get('PORTDIR', '') + if myportdir and myportdir.strip(): + myportdir = os.path.realpath(myportdir) + else: + myportdir = None out = portage.output.EOutput() global_config_path = GLOBAL_CONFIG_PATH if settings['EPREFIX']: @@ -1905,7 +1911,7 @@ def action_sync(settings, trees, mtimedb, myopts, myaction): st = None if st is None: print(">>>",myportdir,"not found, creating it.") - os.makedirs(myportdir,0o755) + portage.util.ensure_dirs(myportdir, mode=0o755) st = os.stat(myportdir) usersync_uid = None |