diff options
author | Zac Medico <zmedico@gentoo.org> | 2006-06-04 03:29:01 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2006-06-04 03:29:01 +0000 |
commit | 10a1a7aab5c679adfdbd8c8a88ba42991daaef95 (patch) | |
tree | 9270244d344c13c630bd197a5c93a7e377051cc8 | |
parent | 7aecaff7d013c9478fca5892eadd7fb6359bac75 (diff) | |
download | portage-10a1a7aab5c679adfdbd8c8a88ba42991daaef95.tar.gz portage-10a1a7aab5c679adfdbd8c8a88ba42991daaef95.tar.bz2 portage-10a1a7aab5c679adfdbd8c8a88ba42991daaef95.zip |
Raise a ParseError if the profile has a parent file containing anything other than 1 parent.
svn path=/main/trunk/; revision=3454
-rw-r--r-- | pym/portage.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/pym/portage.py b/pym/portage.py index 20ce4224a..da3394b09 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -1025,8 +1025,14 @@ class config: self.profiles = [os.path.realpath(self.profile_path)] mypath = self.profiles[0] while os.path.exists(os.path.join(mypath, "parent")): + parents_file = os.path.join(mypath, "parent") + parents = grabfile(parents_file) + if len(parents) != 1: + raise portage_exception.ParseError( + "Expected 1 parent and got %i: '%s'" % \ + (len(parents), parents_file)) mypath = os.path.normpath(os.path.join( - mypath, grabfile(os.path.join(mypath, "parent"))[0])) + mypath, parents[0])) if os.path.exists(mypath): self.profiles.insert(0, mypath) |