Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 416595 - sys-devel/distcc-3.1-r6 should not allow USE="gtk gnome"
Summary: sys-devel/distcc-3.1-r6 should not allow USE="gtk gnome"
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Cluster Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-19 09:11 UTC by Justin Lecher (RETIRED)
Modified: 2013-02-08 09:13 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Lecher (RETIRED) gentoo-dev 2012-05-19 09:11:19 UTC
From configure.ac

if test "x${with_gnome}" = xyes
then 
    GNOME_PACKAGES="gtk+-2.0 libgnome-2.0 libgnomeui-2.0 pango"
elif test "x${with_gtk}" = xyes
then
    GNOME_PACKAGES="gtk+-2.0"
else
    GNOME_PACKAGES=""
fi

So as I understand this, with USE="gtk gnome" the monitor gets reduced to USE="gtk -gnome".
Simple REQUIRED_USE would help.
Comment 1 Justin Lecher (RETIRED) gentoo-dev 2013-02-03 18:58:52 UTC
+*distcc-3.1-r7 (03 Feb 2013)
+
+  03 Feb 2013; Justin Lecher <jlec@gentoo.org> +distcc-3.1-r7.ebuild,
+  metadata.xml:
+  Add USE blocker between gtk and gnome, #416595; bump EAPI; move to new python
+  eclasses
+
   03 Fe
Comment 2 Risto A. Paju 2013-02-04 08:44:27 UTC
The current distcc-3.1-r7.ebuild has

REQUIRED_USE="^^ ( gtk gnome )"

meaning "Must enable exactly one but not more". This would explain why my completely X-less system suddenly wants me to enable one of these. I think it should rather be

REQUIRED_USE="?? ( gtk gnome )"

for "May enable at most one".
Comment 3 Jan Psota 2013-02-04 20:38:03 UTC
(In reply to comment #2)
> [...]
> REQUIRED_USE="?? ( gtk gnome )"
> 
> for "May enable at most one".
I vote for that solution - not to pull X for that.
Comment 4 Alexandre Rostovtsev (RETIRED) gentoo-dev 2013-02-08 07:20:38 UTC
Bad solution for two reasons:

1. breaks update for users of gnome profile (which sets USE="gtk gnome" in make.defaults). It is generally expected that gtk and gnome (like qt4 and kde) USE flags are compatible and allowed to be set together.

2. the so-called "gnome support" in distcc-3.1 is completely, 100% useless. Read src/mon-gnome.c if you don't believe me.

I recommend simply removing gnome from distcc's IUSE.
Comment 5 Justin Lecher (RETIRED) gentoo-dev 2013-02-08 08:09:02 UTC
(In reply to comment #4)
> Bad solution for two reasons:
> 
> 1. breaks update for users of gnome profile (which sets USE="gtk gnome" in
> make.defaults). It is generally expected that gtk and gnome (like qt4 and
> kde) USE flags are compatible and allowed to be set together.

in distcc they aren't. At least the buildsystem will take one over the other.

> 
> 2. the so-called "gnome support" in distcc-3.1 is completely, 100% useless.
> Read src/mon-gnome.c if you don't believe me.
> 
> I recommend simply removing gnome from distcc's IUSE.

If it is so, we can drop gnome.
Comment 6 Justin Lecher (RETIRED) gentoo-dev 2013-02-08 08:23:07 UTC
  08 Feb 2013; Justin Lecher <jlec@gentoo.org> distcc-3.1-r7.ebuild:
+  Drop USE gnome in favour of USE gtk, #416595
+
Comment 7 Alexandre Rostovtsev (RETIRED) gentoo-dev 2013-02-08 08:30:18 UTC
Thanks. Another other solution (if you wanted to keep gnome in IUSE) could have been something like

econf \
	$(use_with gnome) \
	--with-gtk=$(usex gnome no $(usex gtk))

It is sometimes better to not literally replicate upstream configure's logic in the ebuild's USE flags :)
Comment 8 Justin Lecher (RETIRED) gentoo-dev 2013-02-08 08:32:57 UTC
(In reply to comment #7)
> Thanks. Another other solution (if you wanted to keep gnome in IUSE) could
> have been something like
> 
> econf \
> 	$(use_with gnome) \
> 	--with-gtk=$(usex gnome no $(usex gtk))
> 
> It is sometimes better to not literally replicate upstream configure's logic
> in the ebuild's USE flags :)

isn't this the same like REQUIRED_USE but without user intervention?
Comment 9 Alexandre Rostovtsev (RETIRED) gentoo-dev 2013-02-08 09:13:03 UTC
(In reply to comment #8)
> isn't this the same like REQUIRED_USE but without user intervention?

It's a way of reconciling the standard "USE=gnome is a superset of USE=gtk" semantics with the behavior of distcc's configure.

If the intended interpretation of USE="foo bar" is not clear, and the two flags correspond to incompatible configure switches for some package, then of course the user really needs to think and really make a choice, and REQUIRED_USE is an excellent mechanism to force the user to think about that choice.

But in the case of distcc, it is clear what the user intended by USE="gtk gnome"; moreover, this is a combination of flags that's set by default in a major profile. So requiring user intervention in this particular case was IMHO very suboptimal.