summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-10-28 20:20:29 -0700
committerZac Medico <zmedico@gentoo.org>2011-10-28 20:20:29 -0700
commitb30bb192825fbc4f35225aa2334655b4ba7329f5 (patch)
tree5f3674a825f724520e261a1a798b045a50878c3f
parentf935a5e7eb8e96adceaea78c29874e83f6c9ec15 (diff)
downloadportage-b30bb192825fbc4f35225aa2334655b4ba7329f5.tar.gz
portage-b30bb192825fbc4f35225aa2334655b4ba7329f5.tar.bz2
portage-b30bb192825fbc4f35225aa2334655b4ba7329f5.zip
Use EROOT to validate path arguments.
-rwxr-xr-xbin/portageq2
-rw-r--r--pym/_emerge/actions.py2
-rw-r--r--pym/_emerge/depgraph.py8
3 files changed, 6 insertions, 6 deletions
diff --git a/bin/portageq b/bin/portageq
index 40cc21d27..66f6509d7 100755
--- a/bin/portageq
+++ b/bin/portageq
@@ -271,7 +271,7 @@ def owners(argv):
return 2
f = os.path.join(cwd, f)
f = portage.normalize_path(f)
- if not is_basename and not f.startswith(root):
+ if not is_basename and not f.startswith(eroot):
sys.stderr.write("ERROR: file paths must begin with <root>!\n")
sys.stderr.flush()
return 2
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)