Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 607236 - sys-apps/portage TypeError: Can't convert 'bool' object to str implicitly
Summary: sys-apps/portage TypeError: Can't convert 'bool' object to str implicitly
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
Keywords: InVCS
Depends on:
Blocks: 611328
  Show dependency tree
Reported: 2017-01-26 02:54 UTC by Mike Gilbert
Modified: 2017-03-03 04:57 UTC (History)
0 users

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


Note You need to log in before you can comment on or make changes to this bug.
Description Mike Gilbert gentoo-dev 2017-01-26 02:54:04 UTC
With current master (23f239134b0290cbe0435e13d8f1b1757c6d8524):

>>> Jobs: 1 of 1 complete                           Load avg: 2.07, 1.66, 0.89
>>> Auto-cleaning packages...

>>> No outdated packages were found on your system.

 * GNU info directory index is up-to-date.
Traceback (most recent call last):
  File "/home/floppym/src/portage/bin/emerge", line 50, in <module>
    retval = emerge_main()
  File "/home/floppym/src/portage/pym/_emerge/", line 1224, in emerge_main
    return run_action(emerge_config)
  File "/home/floppym/src/portage/pym/_emerge/", line 3262, in run_action
    emerge_config.trees, emerge_config.target_config.mtimedb, retval)
  File "/home/floppym/src/portage/pym/_emerge/", line 164, in post_emerge
  File "/home/floppym/src/portage/pym/_emerge/", line 36, in clean_logs
  File "/home/floppym/src/portage/pym/portage/", line 585, in eerror
    self._write(out, colorize("BAD", " * ") + msg + "\n")
TypeError: Can't convert 'bool' object to str implicitly
Comment 1 Mike Gilbert gentoo-dev 2017-01-26 03:01:16 UTC
I bisected this to the following commit.

commit f143e58dd3fd80ab67121e7a62e8cf47151d3907
Author: Alexandru Elisei <>
Date:   Wed Jan 18 19:15:54 2017 +0200

    emaint: exit with non-zero status code when module fails (bug 567478)
    Module functions currently return a message to emaint after invocation.
    Emaint prints this message then exits normally (with a success return
    code) even if the module encountered an error. This patch aims to
    change this by having each module public function return a tuple of
    (returncode, message), where returncode is boolean True if the function
    was successful or False otherwise. Emaint will inspect the return codes
    and exit unsuccessfully if necessary.
    The variable PORT_LOGDIR was added to the test environment to prevent
    CleanLogs.clean() from failing when the variable isn't set or not a
Comment 2 Mike Gilbert gentoo-dev 2017-01-26 03:23:52 UTC
I sent a patch to the list for review.