On Thu, 2006-08-24 at 10:10 +0200, Arnau Bria wrote:

> Thanks for your reply, I have my wireshark running now...
> just one more question, how do you know what "feature" provides each
> use in a package?
> I mean, how did you know wireshark needed gtk, but talking in general...

It's quite easy, but sometimes involves some detective work:

gentoo linux # emerge -pv wireshark

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N    ] net-analyzer/wireshark-0.99.2  USE="gtk ssl threads
-adns -ipv6 -kerberos (-selinux) -snmp" 12,068 kB

Total size of downloads: 12,068 kB

So it has a gtk USE flag. Tofind out what "gtk" means, you can either
look into /usr/portage/profiles/use.desc directly:

gentoo linux # cat /usr/portage/profiles/use.desc | grep gtk
gtk - Adds support for x11-libs/gtk+ (The GIMP Toolkit)

The other way is to use one of the tools in e.g. gentoolkit. I like
equery:

gentoo linux # equery uses -a wireshark
[ Searching for packages matching wireshark... ]
[ Colour Code : set unset ]
[ Legend        : Left column  (U) - USE flags from
make.conf                     ]
[                  : Right column (I) - USE flags packages was installed
with ]
[ Found these USE variables for net-analyzer/wireshark-0.99.2 ]
 U I
 - - adns     : Adds support for the adns DNS client library
 + + gtk      : Adds support for x11-libs/gtk+ (The GIMP Toolkit)

Which nicely displays that wireshark USEs gtk, that the current config
for it is to enable it, and that it was compiled with that flag enabled.

The gtk flag is very common, it's one of those that when you see it in a
spec, you know exactly what it's for and what it means.

To truly know what the dev has done with the USE flag, check
the .ebuild. IUSE tells you which flags are consulted:

IUSE="adns gtk ipv6 snmp ssl kerberos threads selinux"

The details are in DEPEND or RDEPEND. For wireshark, it's in RDEPEND.
>From the ebuild:

RDEPEND=">=sys-libs/zlib-1.1.4
        gtk? ( >=dev-libs/glib-2.0.4
                =x11-libs/gtk+-2*
                x11-libs/pango
                dev-libs/atk )
        !gtk? ( =dev-libs/glib-1.2* )


Which means that if gtk is set, portage will also emerge glib, gtk+,
pango and atk. If gtk is not set, portage will check for glib, but for a
lesser version. You can then iteratively check each of those packages to
find what they do. Because !gtk doesn't depend on any X packages at all,
we can conclude that no gtk flag means it will be compiled as a
console-only app.

There are probably 100s of other ways to find all this out. :-)

Some resources where this is documented:

man emerge
man 5 portage
man 5 make.conf
man equery

alan

-- 
gentoo-user@gentoo.org mailing list

Reply via email to