From: Zac Medico Date: Fri, 28 Dec 2007 16:00:16 +0000 (-0000) Subject: In getconfig(), pass the infile attribute into the shlex X-Git-Tag: v2.1.4~53 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=11bd215c8cc81d07cceaf20a2a7fd167278b71e1;p=portage.git In getconfig(), pass the infile attribute into the shlex constructor so that shlex.sourcehook() properly joins relative paths. (trunk r9054) svn path=/main/branches/2.1.2/; revision=9071 --- diff --git a/pym/portage_util.py b/pym/portage_util.py index b615108c3..db93a042a 100644 --- a/pym/portage_util.py +++ b/pym/portage_util.py @@ -300,7 +300,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: