Summary: | net-mgmt/flow-tools: Fails to run with Python 3.x | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Andrew <andrew.hotlab> | ||||||||
Component: | Individual Port(s) | Assignee: | Muhammad Moinur Rahman <bofh> | ||||||||
Status: | Closed FIXED | ||||||||||
Severity: | Affects Some People | CC: | bofh, lcook | ||||||||
Priority: | --- | Keywords: | buildisok | ||||||||
Version: | Latest | Flags: | bugzilla:
maintainer-feedback?
(bofh) lcook: merge-quarterly? |
||||||||
Hardware: | Any | ||||||||||
OS: | Any | ||||||||||
Attachments: |
|
Description
Andrew
2020-06-20 10:48:48 UTC
Created attachment 215810 [details]
Unuseful patch to flow-rptfmt
Helping myself with a Python code checker, I managed to create the attached patch, which however does not seems to fully solve the problems yet. I ended up with this new error:
Traceback (most recent call last):
File "/usr/local/bin/flow-rptfmt", line 533, in <module>
rpt.load(sys.stdin, opt_sort_field, opt_max_lines, opt_percent)
File "/usr/local/bin/flow-rptfmt", line 297, in load
splt = string.split(line2,',')
AttributeError: module 'string' has no attribute 'split'
flow-report: pclose(flow-rptfmt -f ascii): failed exit code=1.
If the software doesn't support Python 3.* (or 3.7 specifically), the current USES=python:<version-spec> should be corrected. A cursory search of the flow-tools codebase didnt identify an explicit claim or declaration on what versions it *should* support. That the code base is close to 12 years old with only minor changes in the fork, its pretty safe to say this should be USES=python:2.7. If it supports some Python 3.x versions but not others, it would be good to obtain explicit verification of this, and which versions they are, so that those specific issues can be isolated and addressed upstream Created attachment 215815 [details]
Makefile patch to depend on Python 2.7
Ok, I just tested this patch to the port's Makefile, which makes it dependent on Python 2.7 (still "supported" until the end of 2020).
I guess we might consider the issue solved for now, but the maintainer will likely need to decide if it's sill worth to make net-mgmt/flow-tools alive.
Thanks!
Created attachment 215816 [details]
flow-tools-0.68.6_2.diff
* Explicitly set python version-spec (else fails with python3-*)
* Fix stage-qa message and strip installed library
* pet portclippy
Thought I'd chime in and address some additional issues. :)
QA:
* portlint: OK (looks fine).
* testport: OK (poudriere: 12amd64)
Comment on attachment 215815 [details]
Makefile patch to depend on Python 2.7
Thank you Lewis. I just tested it and it works for me.
Build info is available at https://gitlab.com/swills/freebsd-ports/pipelines/163159618 Will do build test and commit soon. A commit references this bug: Author: bofh Date: Wed Jul 22 06:09:53 UTC 2020 New revision: 542834 URL: https://svnweb.freebsd.org/changeset/ports/542834 Log: net-mgmt/flow-tools: Fix run with python3 - Pet portlint PR: 247437 Submitted by: andrew.hotlab@hotmail.com Changes: head/net-mgmt/flow-tools/Makefile |