From b7c7b359af59d857c0c0c64e99cec623df97c137 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 17 Sep 2013 16:32:17 -0700 Subject: [PATCH] Handle newline in symlink target for bug #485226. --- pym/portage/dbapi/vartree.py | 7 +++++++ 1 file changed, 7 insertions(+) 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 -- 2.26.2