Currently, chpathtool.py does not work with python3 because it tries to compare a byte string with and integer, which always returns files. The following change fixes the problem, and works with both python2 and python3: diff --git a/bin/chpathtool.py b/bin/chpathtool.py index 73c7a5f..fbd18b9 100755 --- a/bin/chpathtool.py +++ b/bin/chpathtool.py @@ -89,7 +89,7 @@ def chpath_inplace(filename, is_text_file, old, new): if not in_byte: break - if in_byte == old[matched_byte_count]: + if in_byte == old[matched_byte_count:matched_byte_count+1]: matched_byte_count += 1 if matched_byte_count == len_old: modified = True
This is fixed in the master branch: https://gitweb.gentoo.org/proj/portage.git/commit/?id=8781a2a86b05cf2bc522fca9a22883844a64fdf6
Fixed in portage-2.3.3.