Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 548856 - sys-fs/zfs: arc_summary.py utility complaining about wrong python syntax with python 3.x as default
Summary: sys-fs/zfs: arc_summary.py utility complaining about wrong python syntax with...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 2 votes (vote)
Assignee: Richard Yao (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-07 16:48 UTC by Konstantin (elxa)
Modified: 2019-03-31 03:53 UTC (History)
1 user (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 Konstantin (elxa) 2015-05-07 16:48:28 UTC
When python 3.3 or 3.4 are the default "arc_summary.py" will print this error

  File "/bin/arc_summary.py", line 1139
    except IndexError, e:
                     ^
SyntaxError: invalid syntax

Reproducible: Always

Steps to Reproduce:
1. emerge sys-fs/zfs
2. eselect python set python3.3
3. arc_summary.py
Actual Results:  
Errors about wrong python syntax.

Expected Results:  
The script should work regardless of the default python version.

Changing the shebang of /bin/arc_summary.py

#!/usr/bin/python

to

#!/usr/bin/python2

fixes the problem.
Comment 1 Larry the Git Cow gentoo-dev 2019-03-31 03:53:58 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b0c6076e0f64f1a8a798b1f7b2b74a180f7eb5e8

commit b0c6076e0f64f1a8a798b1f7b2b74a180f7eb5e8
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2019-03-23 04:52:57 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2019-03-31 03:53:42 +0000

    sys-fs/zfs: rework live ebuild
    
    major rework
    bump eapi to 7
    add multi-python pyzfs installation behind python useflag
    use provided systemd unit, since upstream systemd handling changed
    use upstream bash-completion (with local patch)
    fix sed->zed typo in postinst code
    
    Closes: https://bugs.gentoo.org/548856
    Package-Manager: Portage-2.3.62, Repoman-2.3.12
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 sys-fs/zfs/files/bash-completion-sudo.patch |  35 ++++++
 sys-fs/zfs/zfs-9999.ebuild                  | 185 ++++++++++++++++------------
 2 files changed, 138 insertions(+), 82 deletions(-)