Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 607236

Summary: sys-apps/portage TypeError: Can't convert 'bool' object to str implicitly
Product: Portage Development Reporter: Mike Gilbert <floppym>
Component: CoreAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: normal Keywords: InVCS
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 611328    

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/main.py", line 1224, in emerge_main
    return run_action(emerge_config)
  File "/home/floppym/src/portage/pym/_emerge/actions.py", line 3262, in run_action
    emerge_config.trees, emerge_config.target_config.mtimedb, retval)
  File "/home/floppym/src/portage/pym/_emerge/post_emerge.py", line 164, in post_emerge
    clean_logs(settings)
  File "/home/floppym/src/portage/pym/_emerge/post_emerge.py", line 36, in clean_logs
    out.eerror(msg)
  File "/home/floppym/src/portage/pym/portage/output.py", 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 <alexandru.elisei@gmail.com>
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
    directory.
Comment 2 Mike Gilbert gentoo-dev 2017-01-26 03:23:52 UTC
I sent a patch to the list for review.