media-gfx/freecad sets the PYTHONPATH environment variable globally. Some other packages, such as games-puzzle/brainworkshop, honour this variable. This can lead to fatal execution errors. Reproducible: Always Steps to Reproduce: 1. Install media-gfx/freecad-0.19.2-r6 2. Install games-puzzle/brainworkshop 3. Start games-puzzle/brainworkshop Actual Results: Actual output and behaviour: /usr/bin/brainworkshop:44: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses import random, os, sys, imp, socket, webbrowser, time, math, traceback, datetime, errno python3.9: /var/tmp/portage/media-gfx/freecad-0.19.2-r6/work/FreeCAD-0.19.2/src/Base/BaseClass.cpp:97: static void Base::BaseClass::initSubclass(Base::Type&, const char*, const char*, Base::Type::instantiationMethod): Assertion `parentType != Base::Type::badType()' failed. Expected Results: Expected output and behaviour: /usr/bin/brainworkshop:44: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses import random, os, sys, imp, socket, webbrowser, time, math, traceback, datetime, errno and brainworkshop starts normally. If I unset PYTHONPATH: $ unset PYTHONPATH both freecad and brainworkshop start normally. Is it really necessary to set this variable?
Thanks for the report. In earlier versions, the variable was needed, or freecad would not start properly, but it looks like that's no longer the case. Running the internal test suite, leads to the same results with and without the variable set, so I assume it's indeed no longer needed. I'm gonna remove it from the package.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5927fa068889aa555a1f9657e27305eb11ffae37 commit 5927fa068889aa555a1f9657e27305eb11ffae37 Author: Bernd Waibel <waebbl-gentoo@posteo.net> AuthorDate: 2022-03-18 09:12:08 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-03-19 16:14:22 +0000 media-gfx/freecad: drop environment file Setting PYTHONPATH seems no longer be needed and raises incompatibilities with other packages. Also, AddonManager plugin now needs webchannel and webengine support for pyside2, thus the USEDEP string has been updated to include USE flags for these. Bug: https://bugs.gentoo.org/835331 Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net> Closes: https://github.com/gentoo/gentoo/pull/24636 Signed-off-by: Sam James <sam@gentoo.org> media-gfx/freecad/files/99freecad | 1 - .../freecad/{freecad-0.19.2-r6.ebuild => freecad-0.19.2-r7.ebuild} | 2 -- media-gfx/freecad/freecad-9999.ebuild | 4 +--- 3 files changed, 1 insertion(+), 6 deletions(-)
Falsly used the Bug tag instead of CLosed in the above PR. Closing the bug. Feel free to re-open, if you think that's wrong.