Gentoo Archives: gentoo-user

From: Alan Mckinnon <alan@××××××××××××××××.za>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Ethereal on the LiveCD but not in portage?
Date: Thu, 24 Aug 2006 09:22:33
Message-Id: 1156411127.18844.18.camel@gentoo
In Reply to: Re: [gentoo-user] Ethereal on the LiveCD but not in portage? by Arnau Bria
1 On Thu, 2006-08-24 at 10:10 +0200, Arnau Bria wrote:
2
3 > Thanks for your reply, I have my wireshark running now...
4 > just one more question, how do you know what "feature" provides each
5 > use in a package?
6 > I mean, how did you know wireshark needed gtk, but talking in general...
7
8 It's quite easy, but sometimes involves some detective work:
9
10 gentoo linux # emerge -pv wireshark
11
12 These are the packages that would be merged, in order:
13
14 Calculating dependencies... done!
15 [ebuild N ] net-analyzer/wireshark-0.99.2 USE="gtk ssl threads
16 -adns -ipv6 -kerberos (-selinux) -snmp" 12,068 kB
17
18 Total size of downloads: 12,068 kB
19
20 So it has a gtk USE flag. Tofind out what "gtk" means, you can either
21 look into /usr/portage/profiles/use.desc directly:
22
23 gentoo linux # cat /usr/portage/profiles/use.desc | grep gtk
24 gtk - Adds support for x11-libs/gtk+ (The GIMP Toolkit)
25
26 The other way is to use one of the tools in e.g. gentoolkit. I like
27 equery:
28
29 gentoo linux # equery uses -a wireshark
30 [ Searching for packages matching wireshark... ]
31 [ Colour Code : set unset ]
32 [ Legend : Left column (U) - USE flags from
33 make.conf ]
34 [ : Right column (I) - USE flags packages was installed
35 with ]
36 [ Found these USE variables for net-analyzer/wireshark-0.99.2 ]
37 U I
38 - - adns : Adds support for the adns DNS client library
39 + + gtk : Adds support for x11-libs/gtk+ (The GIMP Toolkit)
40
41 Which nicely displays that wireshark USEs gtk, that the current config
42 for it is to enable it, and that it was compiled with that flag enabled.
43
44 The gtk flag is very common, it's one of those that when you see it in a
45 spec, you know exactly what it's for and what it means.
46
47 To truly know what the dev has done with the USE flag, check
48 the .ebuild. IUSE tells you which flags are consulted:
49
50 IUSE="adns gtk ipv6 snmp ssl kerberos threads selinux"
51
52 The details are in DEPEND or RDEPEND. For wireshark, it's in RDEPEND.
53 >From the ebuild:
54
55 RDEPEND=">=sys-libs/zlib-1.1.4
56 gtk? ( >=dev-libs/glib-2.0.4
57 =x11-libs/gtk+-2*
58 x11-libs/pango
59 dev-libs/atk )
60 !gtk? ( =dev-libs/glib-1.2* )
61
62
63 Which means that if gtk is set, portage will also emerge glib, gtk+,
64 pango and atk. If gtk is not set, portage will check for glib, but for a
65 lesser version. You can then iteratively check each of those packages to
66 find what they do. Because !gtk doesn't depend on any X packages at all,
67 we can conclude that no gtk flag means it will be compiled as a
68 console-only app.
69
70 There are probably 100s of other ways to find all this out. :-)
71
72 Some resources where this is documented:
73
74 man emerge
75 man 5 portage
76 man 5 make.conf
77 man equery
78
79 alan
80
81 --
82 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] Ethereal on the LiveCD but not in portage? Arnau Bria <arnau@×××××××××.net>