View previous topic :: View next topic |
Author |
Message |
wwfhyuuk n00b
Joined: 06 Jun 2003 Posts: 3 Location: Iowa, USA
|
Posted: Fri Jun 06, 2003 2:53 pm Post subject: "emerge system" USE variables |
|
|
I've been building a number of soure distributions lately and would like to know more about USE variables in gentoo. This system seems to allow for the most flexibility in the build process while still providing dependency checking and package management. Great job!
To start with, I've searched all the ebuilds that are part of the 1.4_rc4 base system (all packages emerged at end of the "emerge system" step). My search took me through the dependencies of all the * items in default-x86-1.4/packages. Here is the list of USE variables I found:
bootstrap
build
static
pic
nptl
nls
java
readline
berkdb
tcltk
doc
gdbm
threads
spell
ssl
ipv6
acl
afs
selinux
X
crypt
pam
tcpd
kerberos
Is there an easy way to come up with this list? Is the list complete? Having the list before performing the emerge is desirable (I came up with this list before bootstraping). Basically my method was to read each .ebuild, pull out the USE flags by watching for the use of the "use" function or variable? syntax (IUSE is not reliable), and follow through on the DEPENDS and RDEPENDS. Even after all this I missed that emerge system was going to pull in dev-perl/ExtUtils-MakeMaker (and possibly others, my notes were not exhaustive).
Once the build completes, how can I check if a package was emerged with the USE variables selected and that all features implied are active? For instance, if I have X in USE, when groff builds it is supposed to do a xmkmf. But X is not installed yet so it doesn't do it. How can I check that all the features USE implies are active after the fact?
Is there a way to list all packages that use a particular USE variable? Is there a way to list all of the USE variables in play when performing a particular emerge (ie: what are all of the USE variables that apply to the emerge of gnome, with it's large set of dependencies and their dependencies...).
My intention is to be able to build minimalist distributions. Sometimes the USE settings for one package will need to be different than for another. How is this accomplished (for instance, set doc when building gnome but not for perl)?
Once I move on to desktop applications the USE usage looks to get quite hairy. Having tools to follow USE variable usage would be very helpful. Are there any?
--wwfhyuuk |
|
Back to top |
|
|
duff Guru
Joined: 19 Jun 2002 Posts: 466 Location: Clemson, SC
|
Posted: Fri Jun 06, 2003 3:54 pm Post subject: |
|
|
Code: | # emerge -pv system |
|
|
Back to top |
|
|
wilburpan l33t
Joined: 21 Jan 2003 Posts: 977
|
Posted: Sat Jun 07, 2003 12:01 pm Post subject: |
|
|
There is also a nifty script called usechange that shows you which packages might be candidates for a recompile after changing your USE flags. Details are in this thread. |
|
Back to top |
|
|
Byte n00b
Joined: 03 Apr 2003 Posts: 17
|
Posted: Sat Jun 07, 2003 12:36 pm Post subject: Re: "emerge system" USE variables |
|
|
wwfhyuuk wrote: |
Is there an easy way to come up with this list? Is the list complete? Having the list before performing the emerge is desirable (I came up with this list before bootstraping). |
The full list is in /usr/portage/profiles/use.desc |
|
Back to top |
|
|
wwfhyuuk n00b
Joined: 06 Jun 2003 Posts: 3 Location: Iowa, USA
|
Posted: Sun Jun 08, 2003 10:10 pm Post subject: Re: "emerge system" USE variables |
|
|
Thanks for your replies.
emerge -vp
emerge -evp
are quite helpful.
The use.desc file is easier to get to that the web page.
I haven't downloaded the usechange program yet but that also looks valuable.
There are still anomolies I don't understand yet (like why doesn't X show up in gawk's USE variables with emerge -vp yet is used in the .ebuild). I suppose that, as I find these, I should file bug reports.
--wwfhyuuk |
|
Back to top |
|
|
duff Guru
Joined: 19 Jun 2002 Posts: 466 Location: Clemson, SC
|
Posted: Sun Jun 08, 2003 10:28 pm Post subject: Re: "emerge system" USE variables |
|
|
wwfhyuuk wrote: | ... why doesn't X show up in gawk's USE variables with emerge -vp yet is used in the .ebuild)... |
Sure you're looking at the right ebuild?
Code: | # grep "X" /usr/portage/sys-apps/gawk/*.ebuild
/usr/portage/sys-apps/gawk/gawk-3.1.1-r2.ebuild: dodoc LIMITATIONS NEWS PROBLEMS POSIX.STD README
/usr/portage/sys-apps/gawk/gawk-3.1.2-r3.ebuild: dodoc LIMITATIONS NEWS PROBLEMS POSIX.STD README |
No sign of the 'X' USE variable anywhere.... |
|
Back to top |
|
|
wwfhyuuk n00b
Joined: 06 Jun 2003 Posts: 3 Location: Iowa, USA
|
Posted: Tue Jun 10, 2003 4:59 pm Post subject: Re: "emerge system" USE variables |
|
|
duff wrote: |
Sure you're looking at the right ebuild?
Code: | # grep "X" /usr/portage/sys-apps/gawk/*.ebuild
/usr/portage/sys-apps/gawk/gawk-3.1.1-r2.ebuild: dodoc LIMITATIONS NEWS PROBLEMS POSIX.STD README
/usr/portage/sys-apps/gawk/gawk-3.1.2-r3.ebuild: dodoc LIMITATIONS NEWS PROBLEMS POSIX.STD README |
No sign of the 'X' USE variable anywhere.... |
Sorry, not gawk, groff as in my original post.
Code: | # emerge -vp groff
[ebuild R ] sys-apps/groff-1.18.1-r1 |
Code: | # grep X /usr/portage/sys-apps/groff/groff-1.18.1-r1.ebuild
[ -z "${CXX}" ] && export CXX="g++"
if [ "${ARCH}" == "alpha" -a "${CXX}" == "cxx" ]; then
# Only build X stuff if we have X installed, but do
if [ -n "`use X`" ] && [ -x /usr/X11R6/bin/xmkmf ]
if [ -n "`use X`" ] && [ -x /usr/X11R6/bin/xmkmf ] |
I'm sure there are other examples but one step at a time.
--wwfhyuuk |
|
Back to top |
|
|
duff Guru
Joined: 19 Jun 2002 Posts: 466 Location: Clemson, SC
|
Posted: Tue Jun 10, 2003 5:36 pm Post subject: Re: "emerge system" USE variables |
|
|
wwfhyuuk wrote: | Sorry, not gawk, groff as in my original post. |
Ok then, that's a bug. The ebuild author forgot to add "X" to the ebuild's IUSE variable.
wwfhyuuk wrote: | I suppose that, as I find these, I should file bug reports. |
Good idea...make the devs aware of the bugs you find. |
|
Back to top |
|
|
|