From b30bb192825fbc4f35225aa2334655b4ba7329f5 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 28 Oct 2011 20:20:29 -0700 Subject: Use EROOT to validate path arguments. --- pym/_emerge/actions.py | 2 +- pym/_emerge/depgraph.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'pym/_emerge') diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py index 88f595866..d482e0ba1 100644 --- a/pym/_emerge/actions.py +++ b/pym/_emerge/actions.py @@ -2559,7 +2559,7 @@ def action_uninstall(settings, trees, ldpath_mtimes, elif x.startswith(os.sep): if not x.startswith(eroot): writemsg_level(("!!! '%s' does not start with" + \ - " $ROOT.\n") % x, level=logging.ERROR, noiselevel=-1) + " $EROOT.\n") % x, level=logging.ERROR, noiselevel=-1) return 1 # Queue these up since it's most efficient to handle # multiple files in a single iter_owners() call. diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index fc65f6140..fcdcc6c4e 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -2045,9 +2045,9 @@ class depgraph(object): args.append(PackageArg(arg=x, package=pkg, root_config=root_config)) elif x.startswith(os.path.sep): - if not x.startswith(root): + if not x.startswith(eroot): portage.writemsg(("\n\n!!! '%s' does not start with" + \ - " $ROOT.\n") % x, noiselevel=-1) + " $EROOT.\n") % x, noiselevel=-1) self._dynamic_config._skip_restart = True return 0, [] # Queue these up since it's most efficient to handle @@ -2056,9 +2056,9 @@ class depgraph(object): elif x.startswith("." + os.sep) or \ x.startswith(".." + os.sep): f = os.path.abspath(x) - if not f.startswith(root): + if not f.startswith(eroot): portage.writemsg(("\n\n!!! '%s' (resolved from '%s') does not start with" + \ - " $ROOT.\n") % (f, x), noiselevel=-1) + " $EROOT.\n") % (f, x), noiselevel=-1) self._dynamic_config._skip_restart = True return 0, [] lookup_owners.append(f) -- cgit v1.2.3-1-g7c22