Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: bin/, pym/_emerge/
Date: Sat, 29 Oct 2011 03:20:48
Message-Id: b30bb192825fbc4f35225aa2334655b4ba7329f5.zmedico@gentoo
1 commit: b30bb192825fbc4f35225aa2334655b4ba7329f5
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Sat Oct 29 03:20:29 2011 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Sat Oct 29 03:20:29 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=b30bb192
7
8 Use EROOT to validate path arguments.
9
10 ---
11 bin/portageq | 2 +-
12 pym/_emerge/actions.py | 2 +-
13 pym/_emerge/depgraph.py | 8 ++++----
14 3 files changed, 6 insertions(+), 6 deletions(-)
15
16 diff --git a/bin/portageq b/bin/portageq
17 index 40cc21d..66f6509 100755
18 --- a/bin/portageq
19 +++ b/bin/portageq
20 @@ -271,7 +271,7 @@ def owners(argv):
21 return 2
22 f = os.path.join(cwd, f)
23 f = portage.normalize_path(f)
24 - if not is_basename and not f.startswith(root):
25 + if not is_basename and not f.startswith(eroot):
26 sys.stderr.write("ERROR: file paths must begin with <root>!\n")
27 sys.stderr.flush()
28 return 2
29
30 diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py
31 index 88f5958..d482e0b 100644
32 --- a/pym/_emerge/actions.py
33 +++ b/pym/_emerge/actions.py
34 @@ -2559,7 +2559,7 @@ def action_uninstall(settings, trees, ldpath_mtimes,
35 elif x.startswith(os.sep):
36 if not x.startswith(eroot):
37 writemsg_level(("!!! '%s' does not start with" + \
38 - " $ROOT.\n") % x, level=logging.ERROR, noiselevel=-1)
39 + " $EROOT.\n") % x, level=logging.ERROR, noiselevel=-1)
40 return 1
41 # Queue these up since it's most efficient to handle
42 # multiple files in a single iter_owners() call.
43
44 diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
45 index fc65f61..fcdcc6c 100644
46 --- a/pym/_emerge/depgraph.py
47 +++ b/pym/_emerge/depgraph.py
48 @@ -2045,9 +2045,9 @@ class depgraph(object):
49 args.append(PackageArg(arg=x, package=pkg,
50 root_config=root_config))
51 elif x.startswith(os.path.sep):
52 - if not x.startswith(root):
53 + if not x.startswith(eroot):
54 portage.writemsg(("\n\n!!! '%s' does not start with" + \
55 - " $ROOT.\n") % x, noiselevel=-1)
56 + " $EROOT.\n") % x, noiselevel=-1)
57 self._dynamic_config._skip_restart = True
58 return 0, []
59 # Queue these up since it's most efficient to handle
60 @@ -2056,9 +2056,9 @@ class depgraph(object):
61 elif x.startswith("." + os.sep) or \
62 x.startswith(".." + os.sep):
63 f = os.path.abspath(x)
64 - if not f.startswith(root):
65 + if not f.startswith(eroot):
66 portage.writemsg(("\n\n!!! '%s' (resolved from '%s') does not start with" + \
67 - " $ROOT.\n") % (f, x), noiselevel=-1)
68 + " $EROOT.\n") % (f, x), noiselevel=-1)
69 self._dynamic_config._skip_restart = True
70 return 0, []
71 lookup_owners.append(f)