Gentoo Archives: gentoo-commits

From: Thomas Sachau <tommy@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:multilib commit in: pym/_emerge/
Date: Sun, 06 Feb 2011 13:16:09
Message-Id: dfcef19feff049004e0a7043fb980ecdc711a930.tommy@gentoo
1 commit: dfcef19feff049004e0a7043fb980ecdc711a930
2 Author: Sebastian Luther <SebastianLuther <AT> gmx <DOT> de>
3 AuthorDate: Mon Jan 31 17:40:08 2011 +0000
4 Commit: Thomas Sachau <tommy <AT> gentoo <DOT> org>
5 CommitDate: Mon Jan 31 21:04:50 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=dfcef19f
7
8 Allow relative paths (starting with ./) on the cmd line
9
10 bug 352208
11
12 ---
13 pym/_emerge/depgraph.py | 7 +++++++
14 1 files changed, 7 insertions(+), 0 deletions(-)
15
16 diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
17 index a927222..4f60a3a 100644
18 --- a/pym/_emerge/depgraph.py
19 +++ b/pym/_emerge/depgraph.py
20 @@ -1634,6 +1634,13 @@ class depgraph(object):
21 # Queue these up since it's most efficient to handle
22 # multiple files in a single iter_owners() call.
23 lookup_owners.append(x)
24 + elif x.startswith("." + os.path.sep):
25 + f = os.path.abspath(x)
26 + if not f.startswith(myroot):
27 + portage.writemsg(("\n\n!!! '%s' (resolved from '%s') does not start with" + \
28 + " $ROOT.\n") % (f, x), noiselevel=-1)
29 + return 0, []
30 + lookup_owners.append(f)
31 else:
32 if x in ("system", "world"):
33 x = SETPREFIX + x