Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 413755 - sys-apps/systemd-44: systemd-analyze plot needs dev-lang/python:2.7
Summary: sys-apps/systemd-44: systemd-analyze plot needs dev-lang/python:2.7
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo systemd Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-27 17:29 UTC by Eugene Shatsky
Modified: 2012-05-02 07:55 UTC (History)
0 users

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 Eugene Shatsky 2012-04-27 17:29:55 UTC
Running "systemd-analyze plot" fails with "ValueError: zero length field name in format" error with Python 2.6; that's because of the line 175 in /usr/bin/systemd-analyze:
banner = "{} {} ({} {}) {}".format(osrel, *(os.uname()[1:5]))
Python can handle string formatting with omitted positional argument specifiers in replacement fields since 2.7, but for 2.6 line 175 has to look like
banner = "{0} {1} ({2} {3}) {4}".format(osrel, *(os.uname()[1:5]))
Current systemd ebuild doesn't depend on python, instead it produces elog message about satisfied optional runtime dependency if it's found. I think it needs useflag for analyze with a conditional dependency, or at least check for 2.7 in pkg_postinst to produce valid message.
P.S. older systemd-29 systemd-analyze works well with python 2.6

Reproducible: Always

Steps to Reproduce:
0. emerge systemd-44, boot using it as your init
1. emerge python:2.6 and switch to it via "eselect python"
2. rebuild needed modules (dbus-python, pycairo)
3. run "systemd-analyze plot"
Actual Results:  
Python error

Expected Results:  
SVG boot chart output
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2012-05-02 07:21:55 UTC
Hmm, since it's not python3-capable, I'll mangle the shebang.
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2012-05-02 07:55:05 UTC
/var/cvsroot/gentoo-x86/sys-apps/systemd/systemd-44-r1.ebuild,v  <--  systemd-44-r1.ebuild
initial revision: 1.1

Here you are.