Bug 239576 - devel/py-pyface: Update to 6.1.2
Summary: devel/py-pyface: Update to 6.1.2
Status: In Progress
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Kai Knoblich
URL: https://github.com/enthought/pyface/b...
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-01 12:50 UTC by vladimir.chukharev
Modified: 2019-09-25 18:27 UTC (History)
2 users (show)

See Also:


Attachments
Patch (897 bytes, patch)
2019-08-01 12:50 UTC, vladimir.chukharev
vladimir.chukharev: maintainer-approval+
Details | Diff
py-pyface-6.1.2-with-options.patch (1.99 KB, patch)
2019-08-10 13:29 UTC, Kai Knoblich
vladimir.chukharev: maintainer-approval+
Details | Diff
py-pyface-6.1.2-revised.patch (2.70 KB, patch)
2019-09-10 19:55 UTC, Kai Knoblich
no flags Details | Diff
Patch 4 (2.70 KB, patch)
2019-09-11 11:20 UTC, vladimir.chukharev
vladimir.chukharev: maintainer-approval+
Details | Diff
Patch 5 (2.74 KB, patch)
2019-09-15 09:50 UTC, vladimir.chukharev
vladimir.chukharev: maintainer-approval+
Details | Diff
Patch 6 (2.70 KB, patch)
2019-09-25 14:49 UTC, vladimir.chukharev
vladimir.chukharev: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description vladimir.chukharev 2019-08-01 12:50:29 UTC
Created attachment 206197 [details]
Patch

Update devel/py-pyface from 6.1.1 to 6.1.2.
Comment 1 Kai Knoblich freebsd_committer 2019-08-10 13:29:26 UTC
Created attachment 206417 [details]
py-pyface-6.1.2-with-options.patch
Comment 2 Kai Knoblich freebsd_committer 2019-08-10 13:32:08 UTC
(In reply to vladimir.chukharev from comment #0)

Hi Vladimir,

thanks for the patch. I attached a patch based on your patch with some options for the extra dependencies (like I did already in bug #238469). 

The dependencies are defined in "pyface/__init__.py" and are obtained by setup.py from there.

If you're fine with that patch I'll commit it as soon as possible.
Comment 3 vladimir.chukharev 2019-08-27 18:14:43 UTC
LGTM with one suggestion: put the comment after RUN_DEPENDS, not before it, to silence one FATAL from portlint.

Thanks!
Comment 4 Kai Knoblich freebsd_committer 2019-09-10 19:55:49 UTC
Created attachment 207355 [details]
py-pyface-6.1.2-revised.patch

Hi Vladimir,

at the outset thank you for your maintainer approval for the patch. After bug 238469 was successfully resolved, I used the experience gained from it to revise the patch for devel/py-pyface.

In short it's nearly the same like for graphics/py-traitsui:

- QT5 option (with appropriate comments about wxWidgets)
- Some more Qt5 dependencies that are required for runtime
- Test target with its dependencies to make future testing somewhat easier

The test suite runs fine with Python 2.7 and Python 3.6.

If you're fine with the improved patch, I would open a review at Phabricator anyway to check the usage of the TEST_DEPENDS as it might be a precedent.
Comment 5 vladimir.chukharev 2019-09-11 11:20:25 UTC
Created attachment 207379 [details]
Patch 4

I tested your new patch. There was one typo in TEST_DEPENDS, origin of qt5-test was devel/py-qt5-opengl. That is fixed in the patch I upload.

After this correction I see two problems, both outside of this port itself.

1. 'make test' in an interactive poudriere jail fails. It seem, due to a missing dependency in gstreamer1:
...
[120Ramd64-default] Extracting py36-qt5-test-5.12.2: 100%
===>   py36-pyface-6.1.2 depends on package: py36-qt5-test>0 - found
===>   Returning to build of py36-pyface-6.1.2
===>   py36-pyface-6.1.2 depends on package: py36-qt5-webkit>0 - not found
===>   Installing existing package /packages/All/py36-qt5-webkit-5.12.2.txz
[120Ramd64-default] Installing py36-qt5-webkit-5.12.2...
[120Ramd64-default] `-- Installing qt5-webkit-5.212.0.a2_21...
[120Ramd64-default] |   `-- Installing gstreamer1-1.14.4...
[120Ramd64-default] |   `-- Extracting gstreamer1-1.14.4: 100%
pkg-static: Missing dependency 'gstreamer1-plugins'

Failed to install the following 1 package(s): /packages/All/py36-qt5-webkit-5.12.2.txz
*** Error code 70

Stop.
make: stopped in /usr/ports/devel/py-pyface
...

I'm not sure now what to do with it.

2. Tests leave three files not deleted, /tmp/file0 to /tmp/file2. Because of this, 'make test clean' fails if run after 'sudo make test clean'.
I want to file a bug report upstream for it.


Add me as a subscriber when adding a Diff on Phabricator, please. Thank you!
Comment 6 Kai Knoblich freebsd_committer 2019-09-12 09:57:37 UTC
(In reply to vladimir.chukharev from comment #5)

Oops, sorry about the typo in the TEST_DEPENDS. As for the issue with multimedia/gstreamer:

I had a similar issue sometime ago with an other port and got it solved by forcing a rebuild of it, e.g. poudriere bulk [...] -C multimedia/gstreamer

Thanks for the fixed patch, I'll open soon a review for it.
Comment 7 vladimir.chukharev 2019-09-15 09:50:51 UTC
Created attachment 207505 [details]
Patch 5

Rebuilding all ports from TEST_DEPENDS indeed helped to get further with 'make test' inside a poudriere jail. But I also needed to add one port more to that list, so the new version of the patch.
FWIW, first I added the new item at the end of the list, that did not help. Now it's at the beginning of the TEST_DEPENDS list.
Comment 8 Kai Knoblich freebsd_committer 2019-09-15 11:15:30 UTC
(In reply to vladimir.chukharev from comment #7)

Hmm, that's strange, because qt5-opengl is usually installed with {py27,py36}-qt5-opengl:

> $ pkg info -d py36-qt5-opengl
> py36-qt5-opengl-5.12.2:
>         qt5-widgets-5.12.2_1
>         qt5-gui-5.12.2_1
>         py36-qt5-widgets-5.12.2
>         py36-qt5-gui-5.12.2
>         python36-3.6.9
>         qt5-opengl-5.12.2_1
>         mesa-libs-18.3.2_1
>         qt5-core-5.12.2_2
>         qscintilla2-qt5-2.11.1_1
>         py36-qt5-core-5.12.2

Maybe the {py27,py36}-qt5-opengl packages need also a rebuild? I'll investigate this with another test run.
Comment 9 vladimir.chukharev 2019-09-15 11:45:15 UTC
graphics/qt5-opengl is in LIB_DEPENDS of x11/py-qt5-opengl.

To me this looks like poudriere needs a special mode for running tests. In this mode it should install all types of *_DEPENDS, including TEST_DEPENDS and LIB_DEPENDS. For building ports these two are not necessary, and (I'm guessing now) they are not installed.

Also it would be nice to have a switch to run 'make -C /path/to/cat/port test clean'. It's better if that's not run compulsorily in the above testing mode.

I made a brief search in poudriere issues and found two related (but not exact) issues:
https://github.com/freebsd/poudriere/issues/491
https://github.com/freebsd/poudriere/issues/381
Comment 10 Kai Knoblich freebsd_committer 2019-09-23 22:08:40 UTC
(In reply to vladimir.chukharev from comment #9)

Hrm, I did some more test runs but I wasn't able to reproduce the issue with the missing "graphics/qt5-opengl" dependency so far. The "graphics/qt5-opengl" ports was always installed with "x11/py-qt5-opengl" when running "make test".

Can you please describe me roughly your overall steps to test the port? Maybe then I can pin down the issue with that missing dependency.

Oh, by the way, are you using ports-mgmt/poudriere or ports-mgmt/poudriere-devel to test ports? And does your make.conf have some additional lines?
Comment 11 vladimir.chukharev 2019-09-24 00:08:04 UTC
(In reply to Kai Knoblich from comment #10)

I reliably reproduce it in poudriere:

1. Delete "graphics/qt5-opengl" from TEST_DEPENDS.
2.  sudo DEVELOPER=yes poudriere testport -j 120Ramd64 -o devel/py-pyface -i
 ...(lots of lines ending with the following one)
root@120Ramd64-default:~ #
3.  make -C /usr/ports/devel/py-pyface test
...
===>   py36-pyface-6.1.2 depends on package: py36-qt5-network>0 - found
===>   Returning to build of py36-pyface-6.1.2
===>   py36-pyface-6.1.2 depends on package: py36-qt5-opengl>0 - not found
===>   Installing existing package /packages/All/py36-qt5-opengl-5.12.2.txz
[120Ramd64-default] Installing py36-qt5-opengl-5.12.2...
pkg-static: Missing dependency 'qt5-opengl'

Failed to install the following 1 package(s):
/packages/All/py36-qt5-opengl-5.12.2.txz
*** Error code 70

Stop.
make: stopped in /usr/ports/devel/py-pyface

With the line in TEST_DEPENDS, all the dependencies are installed and
tests started, but tests fail to connect to X.
By the way, the first time the tests even successfully completed.
After the next update of the ports tree and ports, and a reboot, I
could not get successful runs of any tests which use X. The update
changed poudriere port version, among others. Many parts of X also
changed versions.

I made also another check. I expected that 'pkg delete qt5-opengl'
would delete a lot of packages, but it deleted only few. 'make test'
in devel/py-pyface did not rebuild it, and tests failed. Right now I
have not tried to repeat that, though.

$ pkg info -xo poudr
poudriere-3.3.2_1              ports-mgmt/poudriere

$ cat /etc/make.conf
CCACHE_DIR=/ccache
DEVELOPER=yes
#DEFAULT_VERSIONS=python=2.7 python2=2.7 python3=3.6
DEFAULT_VERSIONS=python=3.6 python2=2.7 python3=3.6
#WITH_CCACHE_BUILD=yes
Comment 12 Kai Knoblich freebsd_committer 2019-09-25 10:22:50 UTC
(In reply to vladimir.chukharev from comment #11)

Thank you for the detailed steps and info. By looking at the following lines

> [120Ramd64-default] Installing py36-qt5-opengl-5.12.2...
> pkg-static: Missing dependency 'qt5-opengl'
>
> Failed to install the following 1 package(s):
> /packages/All/py36-qt5-opengl-5.12.2.txz
> *** Error code 70

it seems that the dependency chain for py36-qt5-opengl is still broken at the moment (as like with multimedia/gstreamer1 from comment #5). This can happen due stale entries in pkg's database.

You should be able to reproduce the error from above by issuing the following commands:

# poudriere testport -i -j 120Ramd64 -o devel/py-pyface
root@120Ramd64-default:~ # pkg install -y py36-qt-opengl

Can you please try following steps:

- Remove "graphics/qt5-opengl" from TEST_DEPENDS.
- Rebuild the TEST_DEPENDS with the following command:

> poudriere bulk -t -j 120Ramd64 -C `make -C /path/of/your/portstree/devel/py-pyface test-depends-list | awk -F '/' '{ print $(NF-1)"/"$NF }'`

- Once the rebuild is finished, give it another try with:

# poudriere testport -i -j 120Ramd64 -o devel/py-pyface
root@120Ramd64-default:~ # make -C /usr/ports/devel/py-pyface test
Comment 13 vladimir.chukharev 2019-09-25 14:49:31 UTC
Created attachment 207805 [details]
Patch 6

(In reply to Kai Knoblich from comment #12)

Yesterday evening, after replying to you, I updated the ports tree again, and then each port from TEST_DEPENDS, manually substituting them into 'poudriere bulk -C' one by one.

Now I found, that 'make test' in "poudriere -i" does the same with or without graphics/qt5-opengl in TEST_DEPENDS (i.e it fails when connecting to display).

I submit the new patch, since the previous one fixed a dependence, not only added the extra dependence, IIRR. Let it be in the records.


Nitpicking, just not to confuse possible readers:
> You should be able to reproduce the error from above by issuing the following commands:
> 
> # poudriere testport -i -j 120Ramd64 -o devel/py-pyface
> root@120Ramd64-default:~ # pkg install -y py36-qt-opengl
This should be 'pkg install -y py36-qt5-opengl' (note "5").
Comment 14 Kai Knoblich freebsd_committer 2019-09-25 18:27:49 UTC
(In reply to vladimir.chukharev from comment #13)

> This should be 'pkg install -y py36-qt5-opengl' (note "5").

Good catch, thank you for pointing that out!

I created a review at FreeBSD's phabricator some minutes ago and added you as a subscriber.

And yes, maybe some additional switch that builds also the TEST_DEPENDS would be an improvement for poudriere.