Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 604730 - app-portage/gentoolkit-0.3.2-r1: revdep-rebuild: Could not save cache: write() argument 1 must be unicode, not str
Summary: app-portage/gentoolkit-0.3.2-r1: revdep-rebuild: Could not save cache: write(...
Status: RESOLVED DUPLICATE of bug 589130
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-05 10:20 UTC by Elmar Haag
Modified: 2017-01-12 17:28 UTC (History)
6 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Elmar Haag 2017-01-05 10:20:51 UTC
Error Message:
Could not save cache: write() argument 1 must be unicode, not str

This is displayed on only one of my 5 systems.

Could be a buffer overrun?

hp Desktop # revdep-rebuild
 * This is the new python coded version
 * Please report any bugs found using it.
 * The original revdep-rebuild script is installed as revdep-rebuild.sh
 * Please file bugs at: https://bugs.gentoo.org/
 * Collecting system binaries and libraries
	Could not save cache: write() argument 1 must be unicode, not str
 * Checking dynamic linking consistency

Your system is consistent
hp Desktop # 


Reproducible: Always

Steps to Reproduce:
1. Run: emerge --update --deep --with-bdeps=y --newuse --backtrack=300 --changed-deps=y --keep-going=y @world -va 

2. Run: emerge --depclean

3. Run: revdep-rebuild

Actual Results:  
hp Desktop # revdep-rebuild
 * This is the new python coded version
 * Please report any bugs found using it.
 * The original revdep-rebuild script is installed as revdep-rebuild.sh
 * Please file bugs at: https://bugs.gentoo.org/
 * Collecting system binaries and libraries
	Could not save cache: write() argument 1 must be unicode, not str
 * Checking dynamic linking consistency

Your system is consistent
hp Desktop # 

Expected Results:  
hp Desktop # revdep-rebuild
 * This is the new python coded version
 * Please report any bugs found using it.
 * The original revdep-rebuild script is installed as revdep-rebuild.sh
 * Please file bugs at: https://bugs.gentoo.org/
 * Collecting system binaries and libraries
 * Checking dynamic linking consistency

Your system is consistent
hp Desktop #
Comment 1 Elmar Haag 2017-01-05 10:25:32 UTC
I have 5 Gentoo systems. Only one shows this error message.
Comment 2 Rafael Miranda 2017-01-05 14:40:09 UTC
The same case for me:
 # revdep-rebuild
 * This is the new python coded version
 * Please report any bugs found using it.
 * The original revdep-rebuild script is installed as revdep-rebuild.sh
 * Please file bugs at: https://bugs.gentoo.org/
 * Collecting system binaries and libraries
	Could not save cache: write() argument 1 must be unicode, not str
 * Checking dynamic linking consistency

Your system is consistent
Comment 3 Tianon 2017-01-05 22:01:36 UTC
This appears to be a python2 vs python3 issue -- if I run the revdep-rebuild script explicitly with python3 (python3 /usr/bin/revdep-rebuild), the error does _not_ appear, but running it normally (presumably thus via /usr/bin/python or python eclass shebang rewriting) or via an explicit python2 spits out this error consistently.
Comment 4 Volker Eckert 2017-01-06 18:47:31 UTC
I've also seen:
" * Collecting system binaries and libraries
	Could not save cache: write() argument 1 must be unicode, not str"
with gentoolkit-0.3.2-r1 and python2 but not with python3.

As suggested in https://bugs.gentoo.org/show_bug.cgi?id=572116,
I've tried gentoolkit-0.3.3:

#  revdep-rebuild -V
revdep-rebuild 0.3.3
#  python2 /usr/bin/revdep-rebuild -- -p
 * This is the new python coded version
 * Please report any bugs found using it.
 * The original revdep-rebuild script is installed as revdep-rebuild.sh
 * Please file bugs at: https://bugs.gentoo.org/
 * Checking dynamic linking consistency

Your system is consistent
#  python3 /usr/bin/revdep-rebuild -- -p
 * This is the new python coded version
 * Please report any bugs found using it.
 * The original revdep-rebuild script is installed as revdep-rebuild.sh
 * Please file bugs at: https://bugs.gentoo.org/
 * Checking dynamic linking consistency

Your system is consistent


-> gentoolkit-0.3.3 seems to contain a fix for that.
Comment 5 Randall Wald 2017-01-08 00:13:10 UTC
I can confirm that I have this error with the revdep-rebuild associated with app-portage/gentoolkit-0.3.2-r1, but using the version from app-portage/gentoolkit-0.3.3 makes the error go away. I also am using python2.7, not python3.4, as my default Python interpreter.
Comment 6 Brian Dolbec (RETIRED) gentoo-dev 2017-01-11 17:26:35 UTC

*** This bug has been marked as a duplicate of bug 589130 ***
Comment 7 Paul Varner (RETIRED) gentoo-dev 2017-01-12 17:28:58 UTC
Updating the title so hopefully more searches find a bug.

In summary the bug is fixed in gentoolkit-0.3.3 and the bug does not impact the ability of revdep-rebuild to work correctly. It just causes the cache to not be written, so no speedup will occur from being able to use the cache.