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']:
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
'prune', 'unmerge') or not \
(fetchonly or \
(buildpkgonly and secpass >= 1) or \
- myaction in ("metadata", "regen") or \
- (myaction == "sync" and os.access(settings["PORTDIR"], os.W_OK)))
+ myaction in ("metadata", "regen", "sync"))
if portage.secpass < 1 or \
need_superuser:
if need_superuser: