Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 546176 - break package merging: crash on creating ._cfg0000 symlink
Summary: break package merging: crash on creating ._cfg0000 symlink
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: Normal major (vote)
Assignee: Portage team
Keywords: InVCS
: 552104 (view as bug list)
Depends on:
Blocks: 484436
  Show dependency tree
Reported: 2015-04-10 12:58 UTC by Mike Hiretsky
Modified: 2015-06-14 16:27 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---

Fix (portage.patch,505 bytes, patch)
2015-04-10 12:59 UTC, Mike Hiretsky
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Hiretsky 2015-04-10 12:58:04 UTC
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/", line 234, in _spawn
    prev_mtimes=self.prev_mtimes, counter=counter)
  File "/usr/lib64/python2.7/site-packages/portage/dbapi/", line 4985, in merge
  File "/usr/lib64/python2.7/site-packages/portage/dbapi/", line 4146, in treewalk
    rval = self._merge_contents(srcroot, destroot, cfgfiledict)
  File "/usr/lib64/python2.7/site-packages/portage/dbapi/", line 4424, in _merge_contents
    self.settings["EPREFIX"].lstrip(os.sep), cfgfiledict, mymtime):
  File "/usr/lib64/python2.7/site-packages/portage/dbapi/", line 4616, in mergeme
    myrealdest, mydmode, destmd5, mydest_link)
  File "/usr/lib64/python2.7/site-packages/portage/dbapi/", line 4918, in _protect
  File "/usr/lib64/python2.7/site-packages/portage/util/", line 1704, in new_protect_filename
    encoding=_encodings['merge'], errors='replace')
TypeError: _unicode_decode() takes at least 1 argument (2 given)
Comment 1 Mike Hiretsky 2015-04-10 12:59:21 UTC
Created attachment 400960 [details, diff]

May be missing "old_pfile" as first param for _unicode_decode.
Comment 2 Zac Medico gentoo-dev 2015-04-10 17:20:28 UTC
Your patch is in the following branch:

I've posted it for review here:
Comment 4 Brian Dolbec gentoo-dev 2015-05-19 19:40:13 UTC
Released in portage-2.2.19
Comment 5 Mike Gilbert gentoo-dev 2015-06-14 16:27:57 UTC
*** Bug 552104 has been marked as a duplicate of this bug. ***