ebuild checks for pygtk if set USE=gnome, but won't find the USEflag because its call >I<USE in pygtk. /usr/portage/app-portage/porthole/porthole-0.3.1.ebuild: line 22 USE should be replaced with IUSE ! for pygtk_install in /var/db/pkg/dev-python/pygtk*; do if grep 2 ${pygtk_install}/SLOT > /dev/null; then for flag in `cat ${pygtk_install}/USE`; do <-- IUSE if [ ${flag} == gnome ]; then gnome_flag="found" fi done fi done Reproducible: Always Steps to Reproduce:
The problem with lacking Gnome support is only applicable for =>dev-python/pygtk -2.0.0 releases. Steps to reproduce bug: 1. bash# emerge -p app-portage/porthole These are the packages that I would merge, in order: Calculating dependencies ...done! [ebuild U ] dev-python/pygtk-2.4.0 [1.99.13-r1] [ebuild N ] app-portage/porthole-0.3.1 2. bash# emerge --nodeps app-portage/porthole 3. bash# porthole Traceback (most recent call last): File "/usr/bin/porthole", line 40, in ? import utils File "/usr/lib/porthole/utils.py", line 43, in ? import pygtk; pygtk.require("2.0") # make sure we have the right version ^^^^^^^^^^^^^^^^^^^^ porthole does not require gnome support, but =>dev-python/pygtk-2.0.0 which the ebuild states (DEPENDS="=>dev-python/pygtk-2.0.0"). Propose to remove lines 20-36 of the ebuild as: 0. Porthole requires =>dev-python/pygtk-2.0.0 1. It doesn't make any sense to check for IUSE="gnome" in the pygtk ebuild because =>dev-python/pygtk-2.0.0 always IUSE="gnome" 2. Users should be allowed to shoot themselves in the foot if merging with --nodeps.
Created attachment 41845 [details] Updated ebuild according to comment #1 Removed pkg_setup()
I have excluded the gnome flag check in the -0.4.1_rc1 release. Also -0.3.1 is obsolete and does not work with >=portage-2.0.51. reference bug # 68670.
so is this an issue with 0.4.1?
pkg_setup() { local gnome_flag=false for pygtk_install in /var/db/pkg/dev-python/pygtk*; do cd ${pygtk_install} || die if [[ $(<SLOT) == 2 && " $(<USE) " == *" gnome "* ]]; then gnome_flag=true break fi done if ! ${gnome_flag}; then echo eerror "pygtk was not merged with the gnome" eerror "USE flag. Porthole requires pygtk be" eerror "built with this flag for libglade support." die "pygtk missing gnome support" fi } is horribly wrong, inherit eutils and use built_with_use >=dev-python/pygtk-2.0.0 gnome
Created attachment 76228 [details, diff] change pkg_setup() to use built_with_use
Applied patch. Thanks!