Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 643126 - media-gfx/xdot-0.8: version bump
Summary: media-gfx/xdot-0.8: version bump
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Austin English (RETIRED)
URL:
Whiteboard:
Keywords: EBUILD, PATCH
Depends on:
Blocks:
 
Reported: 2018-01-02 16:12 UTC by gerion
Modified: 2018-09-05 22:06 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
xdot-0.8.ebuild (xdot-0.8.ebuild,853 bytes, text/plain)
2018-01-02 16:12 UTC, gerion
Details
xdot-0.8.ebuild (xdot-0.8.ebuild,853 bytes, text/plain)
2018-01-03 15:34 UTC, gerion
Details

Note You need to log in before you can comment on or make changes to this bug.
Description gerion 2018-01-02 16:12:34 UTC
Created attachment 512726 [details]
xdot-0.8.ebuild

xdot was released in version 0.8 some time ago. An ebuild is attached.
Comment 1 Jonas Stein gentoo-dev 2018-01-03 08:25:54 UTC
Thank you for your contribution. I had a short look on the ebuild. 
Here a few ideas:

* Please test the ebuild with repoman full -x https://wiki.gentoo.org/wiki/Repoman
* Please remove obsolete lines
* please fix the header. (see /usr/portage/skel.ebuild and https://devmanual.gentoo.org/ebuild-writing/eapi/)

What did you change? Was it a simple copy?
Comment 2 gerion 2018-01-03 14:33:48 UTC
Here is a diff:

% diff -u /usr/portage/media-gfx/xdot/xdot-0.7.ebuild /usr/local/portage/media-gfx/xdot/xdot-0.8.ebuild 
--- /usr/portage/media-gfx/xdot/xdot-0.7.ebuild 2017-02-28 20:50:50.000000000 +0100
+++ /usr/local/portage/media-gfx/xdot/xdot-0.8.ebuild   2018-01-02 17:02:35.847416216 +0100
@@ -2,7 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
-PYTHON_COMPAT=( python2_7 )
+PYTHON_COMPAT=( python3_4 python3_5 python3_6 )
 
 inherit distutils-r1
 
@@ -19,10 +19,17 @@
 
 DEPEND="
        dev-python/pycairo[${PYTHON_USEDEP}]
-       >=dev-python/pygtk-2.10:2[${PYTHON_USEDEP}]
+       dev-python/pygobject:3[${PYTHON_USEDEP}]
        dev-python/setuptools[${PYTHON_USEDEP}]
-       media-gfx/graphviz[${PYTHON_USEDEP}]
+       media-gfx/graphviz
 "
 RDEPEND="${DEPEND}"
 
 S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+       eapply_user
+       # searches for graphviz python, which is not packaged, but also not needed
+       # only 'dot' is invoked and covered by DEPEND
+       sed -i '/install_requires/d' setup.py
+}
Comment 3 gerion 2018-01-03 15:33:13 UTC
repoman full -x does not seem to find something (I copied the ebuild in the main tree and run repoman in the xdot directory).

What do you mean with opsolete lines? I've adjusted the year in the header.
Comment 4 gerion 2018-01-03 15:34:00 UTC
Created attachment 513058 [details]
xdot-0.8.ebuild
Comment 5 Austin English (RETIRED) gentoo-dev 2018-02-05 20:02:07 UTC
Hi; sorry for delay, was on holiday.

(In reply to gerion from comment #2)
> Here is a diff:
> 
> % diff -u /usr/portage/media-gfx/xdot/xdot-0.7.ebuild
> /usr/local/portage/media-gfx/xdot/xdot-0.8.ebuild 
> --- /usr/portage/media-gfx/xdot/xdot-0.7.ebuild 2017-02-28
> 20:50:50.000000000 +0100
> +++ /usr/local/portage/media-gfx/xdot/xdot-0.8.ebuild   2018-01-02
> 17:02:35.847416216 +0100
> @@ -2,7 +2,7 @@
>  # Distributed under the terms of the GNU General Public License v2
>  
>  EAPI=6
> -PYTHON_COMPAT=( python2_7 )
> +PYTHON_COMPAT=( python3_4 python3_5 python3_6 )
>  
>  inherit distutils-r1
>  
> @@ -19,10 +19,17 @@
>  
>  DEPEND="
>         dev-python/pycairo[${PYTHON_USEDEP}]
> -       >=dev-python/pygtk-2.10:2[${PYTHON_USEDEP}]
> +       dev-python/pygobject:3[${PYTHON_USEDEP}]
>         dev-python/setuptools[${PYTHON_USEDEP}]
> -       media-gfx/graphviz[${PYTHON_USEDEP}]
> +       media-gfx/graphviz
>  "
>  RDEPEND="${DEPEND}"
>  
>  S="${WORKDIR}/${MY_P}"
> +
> +src_prepare() {
> +       eapply_user
> +       # searches for graphviz python, which is not packaged, but also not
> needed
> +       # only 'dot' is invoked and covered by DEPEND
> +       sed -i '/install_requires/d' setup.py
> +}

I'm not sure about this approach. graphiz ships python support (currently only python 2), but their repo has support for python3 from a quick glance:

austin@austin2:/tmp/graphviz$ git grep -i python | wc -l
427
austin@austin2:/tmp/graphviz$ git grep -i python2 | wc -l
120
austin@austin2:/tmp/graphviz$ git grep -i python3 | wc -l
96

I think fixing graphviz is the better long term solution.

Aside from that, that sed is dangerous IMO. It could easily break things in a future release if that line changes. It needs to be more restrictive if we do use that approach.
Comment 6 gerion 2018-02-05 21:41:37 UTC
The Python part of graphviz is not needed, the setup.py is kind of wrong here.

So maybe we can restrict the sed, but waiting that graphviz is providing support for Python 3 is not necessary.