From: Zac Medico Date: Tue, 17 Sep 2013 23:32:17 +0000 (-0700) Subject: Handle newline in symlink target for bug #485226. X-Git-Tag: v2.2.7~7 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b7c7b359af59d857c0c0c64e99cec623df97c137;p=portage.git Handle newline in symlink target for bug #485226. --- diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index cbdf75bf9..ed62323f5 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -3753,6 +3753,13 @@ class dblink(object): # to an infinite recursion loop. mylinklist.append(relative_path) + myto = _unicode_decode( + _os.readlink(_unicode_encode(fpath, + encoding=_encodings['merge'], errors='strict')), + encoding=_encodings['merge'], errors='replace') + if line_ending_re.search(myto) is not None: + paths_with_newlines.append(relative_path) + if unicode_error: break