If I install package with symlink in /etc directory. (At example net-mail/mailbase-1.1), I remove symlink (/etc/pam.d/pop3s). Then emerge net-mail/mailbase-1.1. Portage creates symlink /etc/pam.d/._cfg0000_pop3s. I emerge net-mail/mailbase-1.1 again and catch Traceback. Reproducible: Always Steps to Reproduce: 1. emerge package with symlink in etc 2. remove this installed symlink 3. remerge this package with symlink in etc (traceback may appear this) 4. remerge this package with symlink in etc Actual Results: Traceback (most recent call last): ... TypeError: _unicode_decode() takes at least 1 argument (2 given) Expected Results: Install success. Traceback (most recent call last): File "/usr/lib64/python2.7/site-packages/portage/dbapi/_MergeProcess.py", line 234, in _spawn prev_mtimes=self.prev_mtimes, counter=counter) File "/usr/lib64/python2.7/site-packages/portage/dbapi/vartree.py", line 4985, in merge counter=counter) File "/usr/lib64/python2.7/site-packages/portage/dbapi/vartree.py", line 4146, in treewalk rval = self._merge_contents(srcroot, destroot, cfgfiledict) File "/usr/lib64/python2.7/site-packages/portage/dbapi/vartree.py", line 4424, in _merge_contents self.settings["EPREFIX"].lstrip(os.sep), cfgfiledict, mymtime): File "/usr/lib64/python2.7/site-packages/portage/dbapi/vartree.py", line 4616, in mergeme myrealdest, mydmode, destmd5, mydest_link) File "/usr/lib64/python2.7/site-packages/portage/dbapi/vartree.py", line 4918, in _protect force=force) File "/usr/lib64/python2.7/site-packages/portage/util/__init__.py", line 1704, in new_protect_filename encoding=_encodings['merge'], errors='replace') TypeError: _unicode_decode() takes at least 1 argument (2 given)
Created attachment 400960 [details, diff] Fix May be missing "old_pfile" as first param for _unicode_decode.
Your patch is in the following branch: https://github.com/zmedico/portage/tree/bug_546176 I've posted it for review here: http://thread.gmane.org/gmane.linux.gentoo.portage.devel/5440/focus=5441
This is in the master branch: https://gitweb.gentoo.org/proj/portage.git/commit/?id=43e23d69fe2eab78295807afc159715bef74fa19
Released in portage-2.2.19
*** Bug 552104 has been marked as a duplicate of this bug. ***