Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 417233 - app-portage/gentoolkit - glsa-check --dump does not work with python3
Summary: app-portage/gentoolkit - glsa-check --dump does not work with python3
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage Tools Team
: 444650 (view as bug list)
Depends on:
Blocks: 346443
  Show dependency tree
Reported: 2012-05-23 08:11 UTC by Alexander Zubkov
Modified: 2012-11-26 23:33 UTC (History)
2 users (show)

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 Alexander Zubkov 2012-05-23 08:11:31 UTC
I'm receiving such error when calling "glsa-check --dump affected" and having python-3* selected:

Traceback (most recent call last):
  File "/usr/bin/glsa-check", line 268, in <module>
  File "/usr/lib64/python3.1/site-packages/gentoolkit/glsa/", line 628, in dump
    outstream.write(center("GLSA %s: \n%s" % (, self.title), width)+"\n")
  File "/usr/lib64/python3.1/site-packages/gentoolkit/glsa/", line 64, in center
    rValue = " "*margin
TypeError: can't multiply sequence by non-int of type 'float'

Looks like this line (64) in /usr/lib64/python3.1/site-packages/gentoolkit/glsa/
        margin = (width-len(text))/2
        rValue = " "*margin
Should be changed to something like (not sure in Python syntax):
        margin = int((width-len(text))/2)
Comment 1 Paul Varner (RETIRED) gentoo-dev 2012-05-24 05:47:04 UTC
The fix is to change the line:
margin = (width-len(text))/2
margin = (width-len(text))//2

Python2 did integer floor division by default and Python3 does not.  I'll fix the code and it will be in the next release.
Comment 2 Alexander Zubkov 2012-09-27 03:49:34 UTC
Hi. When the next release will be available?
Comment 3 Marc Schiffbauer gentoo-dev 2012-11-04 23:06:26 UTC
I would consider this a much higher importance because currently glsa-check is broken for all systems that use python3

Or in other words: Gentoo's tool for doing security updates is broken in its current stable version when using a "default" python setup.
Comment 4 Paul Varner (RETIRED) gentoo-dev 2012-11-06 17:27:42 UTC
Released in gentoolkit-
Comment 5 Paul Varner (RETIRED) gentoo-dev 2012-11-26 23:33:39 UTC
*** Bug 444650 has been marked as a duplicate of this bug. ***