Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 280460 - sys-apps/portage-2.2_rc36 UnicodeDecodeError with regular emerge
Summary: sys-apps/portage-2.2_rc36 UnicodeDecodeError with regular emerge
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: x86 Linux
: High critical (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2009-08-05 14:21 UTC by Rémi Cardona (RETIRED)
Modified: 2010-07-15 07:58 UTC (History)
10 users (show)

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


Attachments
Fix UnicodeDecodeError in env_update() (env_update_unicode.patch,852 bytes, patch)
2009-08-05 18:11 UTC, Zac Medico
Details | Diff
fix unicode handling in elog messages (elog_unicode.patch,1.27 KB, patch)
2009-08-09 20:57 UTC, Zac Medico
Details | Diff
unicode wrappers for 2.2_rc38 (unicode_wrappers.patch,2.97 KB, patch)
2009-08-10 21:31 UTC, Zac Medico
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rémi Cardona (RETIRED) gentoo-dev 2009-08-05 14:21:24 UTC
Opening a new bug to stop spamming people in bug 280392.

Bug happens with every ebuild I try to update.

Thanks


# emerge -DuN @world @system
Calculating dependencies... done!

>>> Verifying ebuild manifests

>>> Starting parallel fetch

>>> Emerging (1 of 13) app-admin/eselect-python-20090804
>>> Downloading 'ftp://ftp.proxad.net/mirrors/ftp.gentoo.org/distfiles/eselect-python-20090804.tar.bz2'
--2009-08-05 16:15:56--  ftp://ftp.proxad.net/mirrors/ftp.gentoo.org/distfiles/eselect-python-20090804.tar.bz2
           => `/home/portage/distfiles/eselect-python-20090804.tar.bz2'
Resolving ftp.proxad.net... 212.27.60.27
Connecting to ftp.proxad.net|212.27.60.27|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD /mirrors/ftp.gentoo.org/distfiles ... done.
==> SIZE eselect-python-20090804.tar.bz2 ... 3890
==> PASV ... done.    ==> RETR eselect-python-20090804.tar.bz2 ... done.
Length: 3890 (3.8K)

100%[======================================>] 3,890       --.-K/s   in 0.03s   

2009-08-05 16:15:57 (125 KB/s) - `/home/portage/distfiles/eselect-python-20090804.tar.bz2' saved [3890]

 * eselect-python-20090804.tar.bz2 RMD160 SHA1 SHA256 size ;-) ...       [ ok ]
 * checking ebuild checksums ;-) ...                                     [ ok ]
 * checking auxfile checksums ;-) ...                                    [ ok ]
 * checking miscfile checksums ;-) ...                                   [ ok ]
>>> Unpacking source...
>>> Unpacking eselect-python-20090804.tar.bz2 to /var/tmp/portage/app-admin/eselect-python-20090804/work
>>> Source unpacked in /var/tmp/portage/app-admin/eselect-python-20090804/work
>>> Compiling source in /var/tmp/portage/app-admin/eselect-python-20090804/work/eselect-python-20090804 ...
python.c: In function ‘main’:
python.c:178: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result
>>> Source compiled.
>>> Test phase [not enabled]: app-admin/eselect-python-20090804

>>> Install eselect-python-20090804 into /var/tmp/portage/app-admin/eselect-python-20090804/image/ category app-admin
>>> Completed installing eselect-python-20090804 into /var/tmp/portage/app-admin/eselect-python-20090804/image/

strip: i686-pc-linux-gnu-strip --strip-unneeded -R .comment
   usr/bin/python-wrapper

>>> Installing (1 of 13) app-admin/eselect-python-20090804
Traceback (most recent call last):
  File "/usr/bin/emerge", line 40, in <module>
    retval = emerge_main()
  File "/usr/lib/portage/pym/_emerge/main.py", line 1397, in emerge_main
    myopts, myaction, myfiles, spinner)
  File "/usr/lib/portage/pym/_emerge/actions.py", line 464, in action_build
    retval = mergetask.merge()
  File "/usr/lib/portage/pym/_emerge/Scheduler.py", line 817, in merge
    rval = self._merge()
  File "/usr/lib/portage/pym/_emerge/Scheduler.py", line 1121, in _merge
    self._main_loop()
  File "/usr/lib/portage/pym/_emerge/Scheduler.py", line 1251, in _main_loop
    self._poll_loop()
  File "/usr/lib/portage/pym/_emerge/PollScheduler.py", line 127, in _poll_loop
    handler(f, event)
  File "/usr/lib/portage/pym/_emerge/SpawnProcess.py", line 197, in _output_handler
    self._unregister_if_appropriate(event)
  File "/usr/lib/portage/pym/_emerge/AbstractPollTask.py", line 27, in _unregister_if_appropriate
    self.wait()
  File "/usr/lib/portage/pym/_emerge/AsynchronousTask.py", line 42, in wait
    self._wait_hook()
  File "/usr/lib/portage/pym/_emerge/AsynchronousTask.py", line 115, in _wait_hook
    self._exit_listener_stack.pop()(self)
  File "/usr/lib/portage/pym/_emerge/EbuildPhase.py", line 76, in _post_phase_exit
    self.wait()
  File "/usr/lib/portage/pym/_emerge/AsynchronousTask.py", line 42, in wait
    self._wait_hook()
  File "/usr/lib/portage/pym/_emerge/AsynchronousTask.py", line 115, in _wait_hook
    self._exit_listener_stack.pop()(self)
  File "/usr/lib/portage/pym/_emerge/TaskSequence.py", line 43, in _task_exit_handler
    self.wait()
  File "/usr/lib/portage/pym/_emerge/AsynchronousTask.py", line 42, in wait
    self._wait_hook()
  File "/usr/lib/portage/pym/_emerge/AsynchronousTask.py", line 115, in _wait_hook
    self._exit_listener_stack.pop()(self)
  File "/usr/lib/portage/pym/_emerge/CompositeTask.py", line 105, in _default_final_exit
    return self.wait()
  File "/usr/lib/portage/pym/_emerge/AsynchronousTask.py", line 42, in wait
    self._wait_hook()
  File "/usr/lib/portage/pym/_emerge/AsynchronousTask.py", line 115, in _wait_hook
    self._exit_listener_stack.pop()(self)
  File "/usr/lib/portage/pym/_emerge/EbuildBuild.py", line 182, in _build_exit
    self.wait()
  File "/usr/lib/portage/pym/_emerge/AsynchronousTask.py", line 42, in wait
    self._wait_hook()
  File "/usr/lib/portage/pym/_emerge/AsynchronousTask.py", line 115, in _wait_hook
    self._exit_listener_stack.pop()(self)
  File "/usr/lib/portage/pym/_emerge/CompositeTask.py", line 105, in _default_final_exit
    return self.wait()
  File "/usr/lib/portage/pym/_emerge/AsynchronousTask.py", line 42, in wait
    self._wait_hook()
  File "/usr/lib/portage/pym/_emerge/AsynchronousTask.py", line 115, in _wait_hook
    self._exit_listener_stack.pop()(self)
  File "/usr/lib/portage/pym/_emerge/Scheduler.py", line 1100, in _build_exit
    self._schedule()
  File "/usr/lib/portage/pym/_emerge/PollScheduler.py", line 43, in _schedule
    return self._schedule_tasks()
  File "/usr/lib/portage/pym/_emerge/Scheduler.py", line 1280, in _schedule_tasks
    if q.schedule():
  File "/usr/lib/portage/pym/_emerge/SequentialTaskQueue.py", line 55, in schedule
    task.start()
  File "/usr/lib/portage/pym/_emerge/AsynchronousTask.py", line 24, in start
    self._start()
  File "/usr/lib/portage/pym/_emerge/PackageMerge.py", line 44, in _start
    self.returncode = self.merge.merge()
  File "/usr/lib/portage/pym/_emerge/MergeListItem.py", line 148, in merge
    retval = self._install_task.install()
  File "/usr/lib/portage/pym/_emerge/EbuildBuild.py", line 272, in install
    rval = merge.execute()
  File "/usr/lib/portage/pym/_emerge/EbuildMerge.py", line 32, in execute
    blockers=self.find_blockers)
  File "/usr/lib/portage/pym/portage/__init__.py", line 6829, in merge
    mydbapi=mydbapi, prev_mtimes=prev_mtimes)
  File "/usr/lib/portage/pym/portage/dbapi/vartree.py", line 4004, in merge
    mydbapi=mydbapi, prev_mtimes=prev_mtimes)
  File "/usr/lib/portage/pym/portage/dbapi/vartree.py", line 4014, in _merge
    cleanup=cleanup, mydbapi=mydbapi, prev_mtimes=prev_mtimes)
  File "/usr/lib/portage/pym/portage/dbapi/vartree.py", line 3571, in treewalk
    ldpath_mtimes=prev_mtimes, others_in_slot=others_in_slot)
  File "/usr/lib/portage/pym/portage/dbapi/vartree.py", line 2233, in unmerge
    writemsg_level=self._display_merge)
  File "/usr/lib/portage/pym/portage/__init__.py", line 883, in env_update
    outfile.write("export %s='%s'\n" % (k, v))
  File "/usr/lib/python2.6/codecs.py", line 686, in write
    return self.writer.write(data)
  File "/usr/lib/python2.6/codecs.py", line 351, in write
    data, consumed = self.encode(object, self.errors)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 25: ordinal not in range(128)
Comment 1 Zac Medico gentoo-dev 2009-08-05 18:11:17 UTC
Created attachment 200277 [details, diff]
Fix UnicodeDecodeError in env_update()

If this patch is saved as /tmp/env_update_unicode.patch, then it can be applied as follows:

 patch /usr/lib/portage/pym/portage/__init__.py /tmp/env_update_unicode.patch
Comment 2 Rémi Cardona (RETIRED) gentoo-dev 2009-08-06 09:28:06 UTC
Patch works great.

Thanks Zac :)
Comment 3 Morgan Wesström 2009-08-06 09:52:01 UTC
I ran into this with rc34, upgraded to rc36 yesterday and let the machine do an emerge -e @world over night. It apparently stopped with sys-apps/nettools and now I can't emerge anything. Applying the patch makes no difference. I can't even reemerge portage. How do I get out of this?

# emerge -1pv portage

These are the packages that would be merged, in order:

Calculating dependencies  Traceback (most recent call last):
  File "/usr/bin/emerge", line 40, in <module>
    retval = emerge_main()
  File "//usr/lib/portage/pym/_emerge/main.py", line 1397, in emerge_main
    myopts, myaction, myfiles, spinner)
  File "//usr/lib/portage/pym/_emerge/actions.py", line 307, in action_build
    settings, trees, myopts, myparams, myaction, myfiles, spinner)
  File "//usr/lib/portage/pym/_emerge/depgraph.py", line 4967, in backtrack_depgraph
    myopts, spinner)
  File "//usr/lib/portage/pym/_emerge/depgraph.py", line 87, in __init__
    pkg_cache=self._pkg_cache)
  File "//usr/lib/portage/pym/_emerge/FakeVartree.py", line 81, in __init__
    real_dbapi.flush_cache()
  File "//usr/lib/portage/pym/portage/dbapi/vartree.py", line 1045, in flush_cache
    self._owners.populate() # index any unindexed contents
  File "//usr/lib/portage/pym/portage/dbapi/vartree.py", line 1449, in populate
    self._populate()
  File "//usr/lib/portage/pym/portage/dbapi/vartree.py", line 1475, in _populate
    owners_cache.add(cpv)
  File "//usr/lib/portage/pym/portage/dbapi/vartree.py", line 1403, in add
    self._add_path(x[root_len:], pkg_hash)
  File "//usr/lib/portage/pym/portage/dbapi/vartree.py", line 1416, in _add_path
    name_hash = self._hash_str(name)
  File "//usr/lib/portage/pym/portage/dbapi/vartree.py", line 1428, in _hash_str
    h.update(s)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-1: ordinal not in range(128)
Comment 4 Christian Ruppert (idl0r) gentoo-dev 2009-08-06 10:10:38 UTC
(In reply to comment #3)
> I ran into this with rc34, upgraded to rc36 yesterday and let the machine do an
> emerge -e @world over night. It apparently stopped with sys-apps/nettools and
> now I can't emerge anything. Applying the patch makes no difference. I can't
> even reemerge portage. How do I get out of this?
> 

ebuild /usr/portage/sys-apps/portage/portage-2.2_rc33.ebuild clean install qmerge

Maybe run it twice if the first try fails, you may have to remove /usr/share/doc/portage-2.2_rc33 also.
Or even move the cache away? (not tested)
Comment 5 Morgan Wesström 2009-08-06 10:40:23 UTC
Thanks Christian. Yes, I had to issue the command twice but now I'm on rc33 again and things seem to work. I think I'll stay here for a while. This was a horrifying experience. :-)
Comment 6 Till Schäfer 2009-08-09 03:10:59 UTC
> ebuild /usr/portage/sys-apps/portage/portage-2.2_rc33.ebuild clean install
> qmerge
> 
> Maybe run it twice if the first try fails, you may have to remove
> /usr/share/doc/portage-2.2_rc33 also.
> Or even move the cache away? (not tested)

I can confirm the bug and the above solution woked also for me.

Comment 7 Till Schäfer 2009-08-09 16:57:27 UTC
(In reply to comment #6)
> > ebuild /usr/portage/sys-apps/portage/portage-2.2_rc33.ebuild clean install
> > qmerge
> > 
> > Maybe run it twice if the first try fails, you may have to remove
> > /usr/share/doc/portage-2.2_rc33 also.
> > Or even move the cache away? (not tested)
> 
> I can confirm the bug and the above solution worked also for me.
> 
The solution was only for a short time. Now the Bug appears again in a different way. Last time the Bug appears every time i start emerge, even before i can see the packages emerge wants to emerge. Now it shows up after a package collision, when portage installes the files.


...
>>> Installing (1 of 123) sys-apps/kbd-1.13-r1
 * checking 667 files for package collisions  
 * This package will overwrite one or more files that may belong to other
 * packages (see list below). You can use a command such as `portageq    
 * owners / <filename>` to identify the installed package that owns a    
 * file. If portageq reports that only one package owns a file then do   
 * NOT file a bug report. A bug report is only useful if it identifies at
 * least two or more packages that are known to install the same file(s).
 * If a collision occurs and you can not explain where the file came from
 * then you should simply ignore the collision since there is not enough 
 * information to determine if a real problem exists. Please do NOT file 
 * a bug report at http://bugs.gentoo.org unless you report exactly which
 * two packages install the same file(s). Once again, please do NOT file 
 * a bug report unless you have completely understood the above message. 
 *                                                                       
 * Detected file collision(s):                                           
 *                                                                       

 * Messages for package sys-apps/kbd-1.13-r1:

 * This package will overwrite one or more files that may belong to other
 * packages (see list below). You can use a command such as `portageq    
 * owners / <filename>` to identify the installed package that owns a    
 * file. If portageq reports that only one package owns a file then do   
 * NOT file a bug report. A bug report is only useful if it identifies at
 * least two or more packages that are known to install the same file(s).
 * If a collision occurs and you can not explain where the file came from
 * then you should simply ignore the collision since there is not enough 
 * information to determine if a real problem exists. Please do NOT file 
 * a bug report at http://bugs.gentoo.org unless you report exactly which
 * two packages install the same file(s). Once again, please do NOT file 
 * a bug report unless you have completely understood the above message. 
 *                                                                       
 * Detected file collision(s):                                           
 *                                                                       
Traceback (most recent call last):                                       
  File "/usr/bin/emerge", line 40, in <module>                           
    retval = _emerge.emerge_main()                                       
  File "/usr/lib64/portage/pym/_emerge/__init__.py", line 16305, in emerge_main
    myopts, myaction, myfiles, spinner)                                        
  File "/usr/lib64/portage/pym/_emerge/__init__.py", line 15200, in action_build
    retval = mergetask.merge()                                                  
  File "/usr/lib64/portage/pym/_emerge/__init__.py", line 10891, in merge       
    rval = self._merge()                                                        
  File "/usr/lib64/portage/pym/_emerge/__init__.py", line 11192, in _merge      
    self._main_loop()                                                           
  File "/usr/lib64/portage/pym/_emerge/__init__.py", line 11322, in _main_loop  
    self._poll_loop()                                                           
  File "/usr/lib64/portage/pym/_emerge/__init__.py", line 9683, in _poll_loop   
    handler(f, event)                                                           
  File "/usr/lib64/portage/pym/_emerge/__init__.py", line 2493, in _output_handler
    self._unregister_if_appropriate(event)                                        
  File "/usr/lib64/portage/pym/_emerge/__init__.py", line 1973, in _unregister_if_appropriate
    self.wait()                                                                              
  File "/usr/lib64/portage/pym/_emerge/__init__.py", line 1878, in wait                      
    self._wait_hook()                                                                        
  File "/usr/lib64/portage/pym/_emerge/__init__.py", line 1951, in _wait_hook                
    self._exit_listener_stack.pop()(self)                                                    
  File "/usr/lib64/portage/pym/_emerge/__init__.py", line 3297, in _post_phase_exit          
    self.wait()                                                                              
  File "/usr/lib64/portage/pym/_emerge/__init__.py", line 1878, in wait                      
    self._wait_hook()                                                                        
  File "/usr/lib64/portage/pym/_emerge/__init__.py", line 1951, in _wait_hook                
    self._exit_listener_stack.pop()(self)                                                    
  File "/usr/lib64/portage/pym/_emerge/__init__.py", line 2214, in _task_exit_handler        
    self.wait()                                                                              
  File "/usr/lib64/portage/pym/_emerge/__init__.py", line 1878, in wait                      
    self._wait_hook()                                                                        
  File "/usr/lib64/portage/pym/_emerge/__init__.py", line 1951, in _wait_hook                
    self._exit_listener_stack.pop()(self)                                                    
  File "/usr/lib64/portage/pym/_emerge/__init__.py", line 2165, in _default_final_exit       
    return self.wait()                                                                       
  File "/usr/lib64/portage/pym/_emerge/__init__.py", line 1878, in wait                      
    self._wait_hook()                                                                        
  File "/usr/lib64/portage/pym/_emerge/__init__.py", line 1951, in _wait_hook                
    self._exit_listener_stack.pop()(self)                                                    
  File "/usr/lib64/portage/pym/_emerge/__init__.py", line 2894, in _build_exit               
    self.wait()                                                                              
  File "/usr/lib64/portage/pym/_emerge/__init__.py", line 1878, in wait
    self._wait_hook()
  File "/usr/lib64/portage/pym/_emerge/__init__.py", line 1951, in _wait_hook
    self._exit_listener_stack.pop()(self)
  File "/usr/lib64/portage/pym/_emerge/__init__.py", line 2165, in _default_final_exit
    return self.wait()
  File "/usr/lib64/portage/pym/_emerge/__init__.py", line 1878, in wait
    self._wait_hook()
  File "/usr/lib64/portage/pym/_emerge/__init__.py", line 1951, in _wait_hook
    self._exit_listener_stack.pop()(self)
  File "/usr/lib64/portage/pym/_emerge/__init__.py", line 11171, in _build_exit
    self._schedule()
  File "/usr/lib64/portage/pym/_emerge/__init__.py", line 9599, in _schedule
    return self._schedule_tasks()
  File "/usr/lib64/portage/pym/_emerge/__init__.py", line 11351, in _schedule_tasks
    if q.schedule():
  File "/usr/lib64/portage/pym/_emerge/__init__.py", line 9468, in schedule
    task.start()
  File "/usr/lib64/portage/pym/_emerge/__init__.py", line 1860, in start
    self._start()
  File "/usr/lib64/portage/pym/_emerge/__init__.py", line 4117, in _start
    self.returncode = self.merge.merge()
  File "/usr/lib64/portage/pym/_emerge/__init__.py", line 4077, in merge
    retval = self._install_task.install()
  File "/usr/lib64/portage/pym/_emerge/__init__.py", line 2983, in install
    rval = merge.execute()
  File "/usr/lib64/portage/pym/_emerge/__init__.py", line 3356, in execute
    blockers=self.find_blockers)
  File "/usr/lib64/portage/pym/portage/__init__.py", line 6780, in merge
    mydbapi=mydbapi, prev_mtimes=prev_mtimes)
  File "/usr/lib64/portage/pym/portage/dbapi/vartree.py", line 3943, in merge
    mydbapi=mydbapi, prev_mtimes=prev_mtimes)
  File "/usr/lib64/portage/pym/portage/dbapi/vartree.py", line 3953, in _merge
    cleanup=cleanup, mydbapi=mydbapi, prev_mtimes=prev_mtimes)
  File "/usr/lib64/portage/pym/portage/dbapi/vartree.py", line 3295, in treewalk
    eerror(msg)
  File "/usr/lib64/portage/pym/portage/dbapi/vartree.py", line 3113, in eerror
    self._eerror("preinst", lines)
  File "/usr/lib64/portage/pym/portage/dbapi/vartree.py", line 3037, in _eerror
    phase, _eerror, lines)
  File "/usr/lib64/portage/pym/_emerge/__init__.py", line 10581, in _dblink_elog
    func(msg, phase=phase, key=pkg_dblink.mycpv, out=out)
  File "/usr/lib64/portage/pym/portage/elog/messages.py", line 127, in _elog
    _elog_base(level, msg,  phase=phase, key=key, color=color, out=out)
  File "/usr/lib64/portage/pym/portage/elog/messages.py", line 89, in _elog_base
    out.write(formatted_msg)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 59-60: ordinal not in range(128)




# emerge --info
Portage 2.2_rc33 (default/linux/amd64/2008.0, gcc-4.3.2, glibc-2.9_p20081201-r2, 2.6.30-gentoo-r4 x86_64)
=================================================================
System uname: Linux-2.6.30-gentoo-r4-x86_64-Intel-R-_Pentium-R-_D_CPU_2.66GHz-with-gentoo-1.12.11.1
Timestamp of tree: Sun, 09 Aug 2009 02:30:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p39
dev-java/java-config: 2.1.8-r1
dev-lang/python:     2.5.4-r3, 2.6.2-r1
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.6.4
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=nocona -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks fixpackages parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="de_DE.utf8"
LDFLAGS="-Wl,-O1"
LINGUAS="de"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 arts audacious bash-completion berkdb bluetooth bzip2 cddb cli cracklib crypt css cups dbus doc dri dts dvd dvdr dvdread encode exif ffmpeg flac fortran gdbm gif gpm hal iconv ipv4 ipv6 isdnlog java jpeg jpeg2k kde latex mmx mp3 mp4 mpeg mudflap multilib ncurses nls nptl nptlonly nsplugin ogg opengl openmp pam pcre pdf perl png pppd python qt3 quicktime readline reflection samba session spell spl sse sse2 ssl svg sysfs tcpd tiff truetype unicode usb vcd vorbis wavpack wma wmf x264 xinerama xml xorg xulrunner xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" USERLAND="GNU" VIDEO_CARDS="nvidia vesa"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 8 Christian Ruppert (idl0r) gentoo-dev 2009-08-09 17:05:02 UTC
Hm, did you run emerge --resume?
If so please try a new merge.
Comment 9 Zac Medico gentoo-dev 2009-08-09 20:57:24 UTC
Created attachment 200723 [details, diff]
fix unicode handling in elog messages

(In reply to comment #7)
This patch fixes that particular error. If it is saved as /tmp/elog_unicode.patch, then it can be applied as follows:

  patch /usr/lib/portage/pym/portage/elog/messages.py /tmp/elog_unicode.patch
Comment 10 Till Schäfer 2009-08-09 23:54:23 UTC
(In reply to comment #9)
> Created an attachment (id=200723) [edit]
> fix unicode handling in elog messages
> 
> (In reply to comment #7)
> This patch fixes that particular error. If it is saved as
> /tmp/elog_unicode.patch, then it can be applied as follows:
> 
>   patch /usr/lib/portage/pym/portage/elog/messages.py /tmp/elog_unicode.patch
> 


i got further with the patch, but there is still an error:

>>> Installing (1 of 123) sys-apps/kbd-1.13-r1
 * checking 667 files for package collisions
...
...
many files ...
...
...
>>> /usr/bin/mapscrn                                                
--- /bin/                                                           
>>> /bin/setfont                                                    
>>> /bin/loadkeys                                                   
Traceback (most recent call last):                                  
  File "/usr/bin/emerge", line 40, in <module>                      
    retval = emerge_main()                                          
  File "/usr/lib64/portage/pym/_emerge/main.py", line 1397, in emerge_main
    myopts, myaction, myfiles, spinner)                                   
  File "/usr/lib64/portage/pym/_emerge/actions.py", line 446, in action_build
    retval = mergetask.merge()                                               
  File "/usr/lib64/portage/pym/_emerge/Scheduler.py", line 817, in merge     
    rval = self._merge()                                                     
  File "/usr/lib64/portage/pym/_emerge/Scheduler.py", line 1121, in _merge   
    self._main_loop()                                                        
  File "/usr/lib64/portage/pym/_emerge/Scheduler.py", line 1251, in _main_loop
    self._poll_loop()                                                         
  File "/usr/lib64/portage/pym/_emerge/PollScheduler.py", line 127, in _poll_loop
    handler(f, event)                                                            
  File "/usr/lib64/portage/pym/_emerge/SpawnProcess.py", line 197, in _output_handler
    self._unregister_if_appropriate(event)                                           
  File "/usr/lib64/portage/pym/_emerge/AbstractPollTask.py", line 27, in _unregister_if_appropriate
    self.wait()                                                                                    
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 42, in wait                      
    self._wait_hook()                                                                              
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 115, in _wait_hook               
    self._exit_listener_stack.pop()(self)                                                          
  File "/usr/lib64/portage/pym/_emerge/EbuildPhase.py", line 76, in _post_phase_exit               
    self.wait()                                                                                    
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 42, in wait                      
    self._wait_hook()                                                                              
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 115, in _wait_hook               
    self._exit_listener_stack.pop()(self)                                                          
  File "/usr/lib64/portage/pym/_emerge/TaskSequence.py", line 43, in _task_exit_handler            
    self.wait()                                                                                    
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 42, in wait                      
    self._wait_hook()                                                                              
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 115, in _wait_hook               
    self._exit_listener_stack.pop()(self)                                                          
  File "/usr/lib64/portage/pym/_emerge/CompositeTask.py", line 105, in _default_final_exit         
    return self.wait()                                                                             
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 42, in wait                      
    self._wait_hook()                                                                              
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 115, in _wait_hook               
    self._exit_listener_stack.pop()(self)                                                          
  File "/usr/lib64/portage/pym/_emerge/EbuildBuild.py", line 182, in _build_exit                   
    self.wait()                                                                                    
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 42, in wait                      
    self._wait_hook()                                                                              
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 115, in _wait_hook               
    self._exit_listener_stack.pop()(self)                                                          
  File "/usr/lib64/portage/pym/_emerge/CompositeTask.py", line 105, in _default_final_exit         
    return self.wait()                                                                             
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 42, in wait
    self._wait_hook()
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 115, in _wait_hook
    self._exit_listener_stack.pop()(self)
  File "/usr/lib64/portage/pym/_emerge/Scheduler.py", line 1100, in _build_exit
    self._schedule()
  File "/usr/lib64/portage/pym/_emerge/PollScheduler.py", line 43, in _schedule
    return self._schedule_tasks()
  File "/usr/lib64/portage/pym/_emerge/Scheduler.py", line 1280, in _schedule_tasks
    if q.schedule():
  File "/usr/lib64/portage/pym/_emerge/SequentialTaskQueue.py", line 55, in schedule
    task.start()
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 24, in start
    self._start()
  File "/usr/lib64/portage/pym/_emerge/PackageMerge.py", line 44, in _start
    self.returncode = self.merge.merge()
  File "/usr/lib64/portage/pym/_emerge/MergeListItem.py", line 148, in merge
    retval = self._install_task.install()
  File "/usr/lib64/portage/pym/_emerge/EbuildBuild.py", line 272, in install
    rval = merge.execute()
  File "/usr/lib64/portage/pym/_emerge/EbuildMerge.py", line 32, in execute
    blockers=self.find_blockers)
  File "/usr/lib64/portage/pym/portage/__init__.py", line 6841, in merge
    mydbapi=mydbapi, prev_mtimes=prev_mtimes)
  File "/usr/lib64/portage/pym/portage/dbapi/vartree.py", line 4004, in merge
    mydbapi=mydbapi, prev_mtimes=prev_mtimes)
  File "/usr/lib64/portage/pym/portage/dbapi/vartree.py", line 4014, in _merge
    cleanup=cleanup, mydbapi=mydbapi, prev_mtimes=prev_mtimes)
  File "/usr/lib64/portage/pym/portage/dbapi/vartree.py", line 3534, in treewalk
    linkmap._needed_aux_key))
  File "/usr/lib64/portage/pym/portage/dbapi/vartree.py", line 2596, in _linkmap_rebuild
    self.vartree.dbapi.linkmap.rebuild(**kwargs)
  File "/usr/lib64/portage/pym/portage/dbapi/vartree.py", line 290, in rebuild
    self._dbapi.flush_cache()
  File "/usr/lib64/portage/pym/portage/dbapi/vartree.py", line 1045, in flush_cache
    self._owners.populate() # index any unindexed contents
  File "/usr/lib64/portage/pym/portage/dbapi/vartree.py", line 1449, in populate
    self._populate()
  File "/usr/lib64/portage/pym/portage/dbapi/vartree.py", line 1475, in _populate
    owners_cache.add(cpv)
  File "/usr/lib64/portage/pym/portage/dbapi/vartree.py", line 1403, in add
    self._add_path(x[root_len:], pkg_hash)
  File "/usr/lib64/portage/pym/portage/dbapi/vartree.py", line 1416, in _add_path
    name_hash = self._hash_str(name)
  File "/usr/lib64/portage/pym/portage/dbapi/vartree.py", line 1428, in _hash_str
    h.update(s)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-1: ordinal not in range(128)
Comment 11 Zac Medico gentoo-dev 2009-08-10 00:26:36 UTC
This is fixed in 2.2_rc37.

(In reply to comment #10)
That's also fixed in 2.2_rc37.
Comment 12 Till Schäfer 2009-08-10 11:24:08 UTC
Please Reopen!
I have installed the latest Portage 2.2_rc38 and the Bug still exsists for some packages.

-- kbd compiles completly without errors, but the install failed:

>>> Installing (1 of 1) sys-apps/kbd-1.13-r1
Traceback (most recent call last):          
  File "/usr/bin/emerge", line 40, in <module>
    retval = emerge_main()                    
  File "/usr/lib64/portage/pym/_emerge/main.py", line 1397, in emerge_main
    myopts, myaction, myfiles, spinner)                                   
  File "/usr/lib64/portage/pym/_emerge/actions.py", line 463, in action_build
    retval = mergetask.merge()                                               
  File "/usr/lib64/portage/pym/_emerge/Scheduler.py", line 821, in merge     
    rval = self._merge()                                                     
  File "/usr/lib64/portage/pym/_emerge/Scheduler.py", line 1125, in _merge   
    self._main_loop()                                                        
  File "/usr/lib64/portage/pym/_emerge/Scheduler.py", line 1262, in _main_loop
    self._poll_loop()                                                         
  File "/usr/lib64/portage/pym/_emerge/PollScheduler.py", line 127, in _poll_loop
    handler(f, event)                                                            
  File "/usr/lib64/portage/pym/_emerge/SpawnProcess.py", line 197, in _output_handler
    self._unregister_if_appropriate(event)                                           
  File "/usr/lib64/portage/pym/_emerge/AbstractPollTask.py", line 27, in _unregister_if_appropriate
    self.wait()                                                                                    
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 42, in wait                      
    self._wait_hook()                                                                              
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 115, in _wait_hook               
    self._exit_listener_stack.pop()(self)                                                          
  File "/usr/lib64/portage/pym/_emerge/EbuildPhase.py", line 76, in _post_phase_exit               
    self.wait()                                                                                    
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 42, in wait                      
    self._wait_hook()                                                                              
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 115, in _wait_hook               
    self._exit_listener_stack.pop()(self)                                                          
  File "/usr/lib64/portage/pym/_emerge/TaskSequence.py", line 43, in _task_exit_handler            
    self.wait()                                                                                    
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 42, in wait                      
    self._wait_hook()                                                                              
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 115, in _wait_hook               
    self._exit_listener_stack.pop()(self)                                                          
  File "/usr/lib64/portage/pym/_emerge/CompositeTask.py", line 105, in _default_final_exit         
    return self.wait()                                                                             
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 42, in wait                      
    self._wait_hook()                                                                              
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 115, in _wait_hook               
    self._exit_listener_stack.pop()(self)                                                          
  File "/usr/lib64/portage/pym/_emerge/EbuildBuild.py", line 182, in _build_exit                   
    self.wait()                                                                                    
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 42, in wait                      
    self._wait_hook()                                                                              
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 115, in _wait_hook               
    self._exit_listener_stack.pop()(self)                                                          
  File "/usr/lib64/portage/pym/_emerge/CompositeTask.py", line 105, in _default_final_exit         
    return self.wait()                                                                             
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 42, in wait                      
    self._wait_hook()                                                                              
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 115, in _wait_hook               
    self._exit_listener_stack.pop()(self)                                                          
  File "/usr/lib64/portage/pym/_emerge/Scheduler.py", line 1104, in _build_exit                    
    self._schedule()                                                                               
  File "/usr/lib64/portage/pym/_emerge/PollScheduler.py", line 43, in _schedule                    
    return self._schedule_tasks()                                                                  
  File "/usr/lib64/portage/pym/_emerge/Scheduler.py", line 1284, in _schedule_tasks                
    if q.schedule():                                                                               
  File "/usr/lib64/portage/pym/_emerge/SequentialTaskQueue.py", line 55, in schedule               
    task.start()                                                                                   
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 24, in start                     
    self._start()                                                                                  
  File "/usr/lib64/portage/pym/_emerge/PackageMerge.py", line 44, in _start                        
    self.returncode = self.merge.merge()                                                           
  File "/usr/lib64/portage/pym/_emerge/MergeListItem.py", line 148, in merge                       
    retval = self._install_task.install()
  File "/usr/lib64/portage/pym/_emerge/EbuildBuild.py", line 272, in install
    rval = merge.execute()
  File "/usr/lib64/portage/pym/_emerge/EbuildMerge.py", line 32, in execute
    blockers=self.find_blockers)
  File "/usr/lib64/portage/pym/portage/__init__.py", line 6865, in merge
    mydbapi=mydbapi, prev_mtimes=prev_mtimes)
  File "/usr/lib64/portage/pym/portage/dbapi/vartree.py", line 4037, in merge
    mydbapi=mydbapi, prev_mtimes=prev_mtimes)
  File "/usr/lib64/portage/pym/portage/dbapi/vartree.py", line 4047, in _merge
    cleanup=cleanup, mydbapi=mydbapi, prev_mtimes=prev_mtimes)
  File "/usr/lib64/portage/pym/portage/dbapi/vartree.py", line 3230, in treewalk
    retval = self._security_check(others_in_slot)
  File "/usr/lib64/portage/pym/portage/dbapi/vartree.py", line 3066, in _security_check
    s = os.lstat(path)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 36-37: ordinal not in range(128)




# emerge --info
Portage 2.2_rc38 (default/linux/amd64/2008.0, gcc-4.3.2, glibc-2.9_p20081201-r2, 2.6.30-gentoo-r4 x86_64)
=================================================================                                        
System uname: Linux-2.6.30-gentoo-r4-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q9450_@_2.66GHz-with-gentoo-1.12.11.1
Timestamp of tree: Mon, 10 Aug 2009 10:55:01 +0000                                                           
ccache version 2.4 [enabled]                                                                                 
app-shells/bash:     3.2_p39                                                                                 
dev-java/java-config: 2.1.8-r1                                                                               
dev-lang/python:     2.5.4-r3, 2.6.2-r1                                                                      
dev-util/ccache:     2.4-r7                                                                                  
dev-util/cmake:      2.6.4                                                                                   
sys-apps/baselayout: 1.12.11.1                                                                               
sys-apps/sandbox:    2.0                                                                                     
sys-devel/autoconf:  2.13, 2.63-r1                                                                           
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2                                               
sys-devel/binutils:  2.18-r3                                                                                 
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=core2 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests ccache distlocks fixpackages parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="de_DE.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="de"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/layman/berkano"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 bash-completion berkdb bzip2 cdda cddb cdio cli compiz cracklib crypt cups dbus doc dri dts dvd encode evdev ffmpeg flac fortran gdbm gif glib glibc gpm gtk hal haskell iconv id3tag ieee1394 imagemagick inotify ipv4 ipv6 irc isdnlog jack java java6 jpeg jpeg2k kde kde4 latex mad mmx mmxext mozilla mp3 mpeg mplayer mudflap multilib musicbrainz ncurses nls nptl nptlonly nsplugin ntp ogg opengl openmp oscar otr pam pcre pdf perl plasma png pppd python qt3 qt3support qt4 quicktime rar readline reflection rss rtc samba sdl session spell spl sse sse2 sse3 ssl ssse3 ssse4_1 strigi svg sysfs syslog tcpd threads tiff truetype unicode v41 v412 vcd vdpau vim-syntax visualization vorbis wavpack wlm wma wmf x264 xine xinerama xml xorg xscreensaver xulrunner xv xvid zlib" ALSA_CARDS="hdsp hdspm" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" USERLAND="GNU" VIDEO_CARDS="vesa nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 13 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-08-10 14:44:20 UTC
(In reply to comment #12)

You found a different bug. (The traceback is different.)
Comment 14 Zac Medico gentoo-dev 2009-08-10 21:31:42 UTC
Created attachment 200871 [details, diff]
unicode wrappers for 2.2_rc38

(In reply to comment #12)
This patch applies to 2.2_rc38. If it is saved as /tmp/unicode_wrappers.patch, then it can be applied as follows:

  cd /usr/lib/portage
  patch -p0 < /tmp/unicode_wrappers.patch
Comment 15 Liviu Balan 2009-08-16 22:57:08 UTC
I had same problem with portage-2.2_rc38
It failed few times with that error while running "emerge -e world" but I was able to "emerge --resume" every time.
However, after it happened the 3rd time, I applied the patch.
Now I resumed again.. fingers crossed :)
Comment 16 Liviu Balan 2009-08-16 23:01:10 UTC
Crashed again while running "emerge --resume":

>>> Installing (1 of 570) sys-apps/kbd-1.13-r1
 * checking 667 files for package collisions  
--- /bin/                                     
>>> /bin/loadkeys                             
>>> /bin/setfont                              
--- /usr/                                     
--- /usr/share/                               
--- /usr/share/doc/                           
--- /usr/share/doc/kbd-1.13-r1/               
>>> /usr/share/doc/kbd-1.13-r1/CHANGES.bz2    
>>> /usr/share/doc/kbd-1.13-r1/CREDITS.bz2    
>>> /usr/share/doc/kbd-1.13-r1/README.bz2     
--- /usr/share/doc/kbd-1.13-r1/html/          
--- /usr/share/doc/kbd-1.13-r1/html/utf/      
Traceback (most recent call last):            
  File "/usr/bin/emerge", line 40, in <module>
    retval = emerge_main()                    
  File "/usr/lib64/portage/pym/_emerge/main.py", line 1397, in emerge_main
    myopts, myaction, myfiles, spinner)                                   
  File "/usr/lib64/portage/pym/_emerge/actions.py", line 445, in action_build
    retval = mergetask.merge()                                               
  File "/usr/lib64/portage/pym/_emerge/Scheduler.py", line 821, in merge     
    rval = self._merge()                                                     
  File "/usr/lib64/portage/pym/_emerge/Scheduler.py", line 1125, in _merge   
    self._main_loop()                                                        
  File "/usr/lib64/portage/pym/_emerge/Scheduler.py", line 1255, in _main_loop
    self._poll_loop()                                                         
  File "/usr/lib64/portage/pym/_emerge/PollScheduler.py", line 127, in _poll_loop
    handler(f, event)                                                            
  File "/usr/lib64/portage/pym/_emerge/SpawnProcess.py", line 197, in _output_handler
    self._unregister_if_appropriate(event)                                           
  File "/usr/lib64/portage/pym/_emerge/AbstractPollTask.py", line 27, in _unregister_if_appropriate
    self.wait()                                                                                    
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 42, in wait                      
    self._wait_hook()                                                                              
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 115, in _wait_hook               
    self._exit_listener_stack.pop()(self)                                                          
  File "/usr/lib64/portage/pym/_emerge/EbuildPhase.py", line 76, in _post_phase_exit               
    self.wait()                                                                                    
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 42, in wait                      
    self._wait_hook()                                                                              
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 115, in _wait_hook               
    self._exit_listener_stack.pop()(self)                                                          
  File "/usr/lib64/portage/pym/_emerge/TaskSequence.py", line 43, in _task_exit_handler            
    self.wait()                                                                                    
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 42, in wait                      
    self._wait_hook()                                                                              
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 115, in _wait_hook
    self._exit_listener_stack.pop()(self)
  File "/usr/lib64/portage/pym/_emerge/CompositeTask.py", line 105, in _default_final_exit
    return self.wait()
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 42, in wait
    self._wait_hook()
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 115, in _wait_hook
    self._exit_listener_stack.pop()(self)
  File "/usr/lib64/portage/pym/_emerge/EbuildBuild.py", line 182, in _build_exit
    self.wait()
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 42, in wait
    self._wait_hook()
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 115, in _wait_hook
    self._exit_listener_stack.pop()(self)
  File "/usr/lib64/portage/pym/_emerge/CompositeTask.py", line 105, in _default_final_exit
    return self.wait()
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 42, in wait
    self._wait_hook()
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 115, in _wait_hook
    self._exit_listener_stack.pop()(self)
  File "/usr/lib64/portage/pym/_emerge/Scheduler.py", line 1104, in _build_exit
    self._schedule()
  File "/usr/lib64/portage/pym/_emerge/PollScheduler.py", line 43, in _schedule
    return self._schedule_tasks()
  File "/usr/lib64/portage/pym/_emerge/Scheduler.py", line 1284, in _schedule_tasks
    if q.schedule():
  File "/usr/lib64/portage/pym/_emerge/SequentialTaskQueue.py", line 55, in schedule
    task.start()
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 24, in start
    self._start()
  File "/usr/lib64/portage/pym/_emerge/PackageMerge.py", line 44, in _start
    self.returncode = self.merge.merge()
  File "/usr/lib64/portage/pym/_emerge/MergeListItem.py", line 148, in merge
    retval = self._install_task.install()
  File "/usr/lib64/portage/pym/_emerge/EbuildBuild.py", line 272, in install
    rval = merge.execute()
  File "/usr/lib64/portage/pym/_emerge/EbuildMerge.py", line 32, in execute
    blockers=self.find_blockers)
  File "/usr/lib64/portage/pym/portage/__init__.py", line 6930, in merge
    mydbapi=mydbapi, prev_mtimes=prev_mtimes)
  File "/usr/lib64/portage/pym/portage/dbapi/vartree.py", line 4040, in merge
    mydbapi=mydbapi, prev_mtimes=prev_mtimes)
  File "/usr/lib64/portage/pym/portage/dbapi/vartree.py", line 4050, in _merge
    cleanup=cleanup, mydbapi=mydbapi, prev_mtimes=prev_mtimes)
  File "/usr/lib64/portage/pym/portage/dbapi/vartree.py", line 3512, in treewalk
    if self.mergeme(srcroot, destroot, outfile, secondhand, "", cfgfiledict, mymtime):
  File "/usr/lib64/portage/pym/portage/dbapi/vartree.py", line 3895, in mergeme
    join(offset, x), cfgfiledict, thismtime):
  File "/usr/lib64/portage/pym/portage/dbapi/vartree.py", line 3895, in mergeme
    join(offset, x), cfgfiledict, thismtime):
  File "/usr/lib64/portage/pym/portage/dbapi/vartree.py", line 3895, in mergeme
    join(offset, x), cfgfiledict, thismtime):
  File "/usr/lib64/portage/pym/portage/dbapi/vartree.py", line 3895, in mergeme
    join(offset, x), cfgfiledict, thismtime):
  File "/usr/lib64/portage/pym/portage/dbapi/vartree.py", line 3895, in mergeme
    join(offset, x), cfgfiledict, thismtime):
  File "/usr/lib64/portage/pym/portage/dbapi/vartree.py", line 3895, in mergeme
    join(offset, x), cfgfiledict, thismtime):
  File "/usr/lib64/portage/pym/portage/dbapi/vartree.py", line 3899, in mergeme
    mymd5 = perform_md5(mysrc, calc_prelink=1)
  File "/usr/lib64/portage/pym/portage/checksum.py", line 118, in perform_md5
    return perform_checksum(x, "MD5", calc_prelink)[0]
  File "/usr/lib64/portage/pym/portage/checksum.py", line 232, in perform_checksum
    myhash, mysize = hashfunc_map[hashname](myfilename)
  File "/usr/lib64/portage/pym/portage/checksum.py", line 28, in pyhash
    f = open(filename, 'rb')
UnicodeEncodeError: 'ascii' codec can't encode characters in position 79-80: ordinal not in range(128)

This is an annoying issue.. already resumed like 5 times.. 2 times resumed after applying the patch.. is this a different bug or the fix isn't working properly?
Comment 17 Liviu Balan 2009-08-16 23:02:00 UTC
T61p portage # emerge --info
WARNING: One or more repositories have missing repo_name entries:

        /usr/local/portage/profiles/repo_name

NOTE: Each repo_name entry should be a plain text file containing a
unique name for the repository on the first line.
Portage 2.2_rc38 (default/linux/amd64/2008.0, gcc-4.3.2, glibc-2.9_p20081201-r2, 2.6.30-gentoo-r5 x86_64)
=================================================================
System uname: Linux-2.6.30-gentoo-r5-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T9300_@_2.50GHz-with-gentoo-1.12.11.1
Timestamp of tree: Sun, 16 Aug 2009 18:30:01 +0000
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7-r1, 2.1.8-r1
dev-lang/python:     2.5.4-r3, 2.6.2-r1
dev-util/cmake:      2.6.4-r2
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    2.0
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=nocona"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -pipe -march=nocona"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distlocks fixpackages parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://192.168.2.150/gentoo-portage"
USE="X acl alsa amd64 berkdb bzip2 cdr cli cracklib crypt cups dbus dri dts dv dvd fortran gdbm glib glitz gpm gtk iconv ipv6 isdnlog java jpeg kde midi mmx mng mp2 mp3 mp4 mudflap multilib mysql ncurses nfs nls nptl nptlonly opengl openmp pam pcre perl png pppd python qt3 qt3support qt4 readline reflection samba session spl sql sse sse2 ssl svg symlink sysfs tcpd unicode webkit x264 xcb xorg xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 18 Liviu Balan 2009-08-16 23:06:22 UTC
Seems that I can't get pass "sys-apps/kbd-1.13-r1" ... I'll skip it
Comment 19 Morgan Wesström 2009-08-17 08:35:11 UTC
Before rolling back to rc33 I also had problems with kbd but unmasking version 1.15 helped.
Comment 20 Zac Medico gentoo-dev 2009-08-21 23:17:16 UTC
Hopefully all unicode issues are fixed in 2.2_rc39.