Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 67537 - porthole-0.4.1.ebuild pkg_setup bloat
Summary: porthole-0.4.1.ebuild pkg_setup bloat
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-14 05:31 UTC by phaidros
Modified: 2006-01-05 17:17 UTC (History)
1 user (show)

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


Attachments
Updated ebuild according to comment #1 (porthole-0.3.1.ebuild,659 bytes, text/plain)
2004-10-15 02:31 UTC, Thomas Osterlie
Details
change pkg_setup() to use built_with_use (porthole-ebuild.diff,1.32 KB, patch)
2006-01-05 04:03 UTC, Alec Warner (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description phaidros 2004-10-14 05:31:30 UTC
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:
Comment 1 Thomas Osterlie 2004-10-15 02:11:02 UTC
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.
Comment 2 Thomas Osterlie 2004-10-15 02:31:26 UTC
Created attachment 41845 [details]
Updated ebuild according to comment #1

Removed pkg_setup()
Comment 3 Brian Dolbec (RETIRED) gentoo-dev 2004-10-23 18:51:52 UTC
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.
Comment 4 Marius Mauch (RETIRED) gentoo-dev 2004-12-08 04:37:46 UTC
so is this an issue with 0.4.1?
Comment 5 Alec Warner (RETIRED) archtester gentoo-dev Security 2006-01-05 03:51:21 UTC
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
Comment 6 Alec Warner (RETIRED) archtester gentoo-dev Security 2006-01-05 04:03:44 UTC
Created attachment 76228 [details, diff]
change pkg_setup() to use built_with_use
Comment 7 Paul Varner (RETIRED) gentoo-dev 2006-01-05 17:17:18 UTC
Applied patch. Thanks!