From: Zac Medico Date: Tue, 25 Dec 2007 05:41:06 +0000 (-0000) Subject: In getconfig(), pass the infile attribute into the shlex X-Git-Tag: v2.2_pre1~114 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9f19bafd76cbbf0d1ace2b2243cd7434ed30cbbf;p=portage.git In getconfig(), pass the infile attribute into the shlex constructor so that shlex.sourcehook() properly joins relative paths. svn path=/main/trunk/; revision=9054 --- diff --git a/pym/portage/util.py b/pym/portage/util.py index fa816d728..83d3fb430 100644 --- a/pym/portage/util.py +++ b/pym/portage/util.py @@ -314,7 +314,10 @@ def getconfig(mycfg, tolerant=0, allow_sourcing=False, expand=True): raise return None try: - lex = shlex.shlex(f, posix=True) + # The default shlex.sourcehook() implementation + # only joins relative paths when the infile + # attribute is properly set. + lex = shlex.shlex(f, infile=mycfg, posix=True) lex.wordchars=string.digits+string.letters+"~!@#$%*_\:;?,./-+{}" lex.quotes="\"'" if allow_sourcing: