Gentoo Archives: gentoo-dev

From: Vitaly Kushneriuk <vitaly_kushneriuk@×××××.com>
To: Gentoo-dev <gentoo-dev@g.o>
Subject: Re: [gentoo-dev] Portage2 super USE flag suggestin
Date: Thu, 18 Jul 2002 11:07:34
Message-Id: 1027008450.23253.33.camel@uranus.u235.eyep.net
In Reply to: [gentoo-dev] Portage2 super USE flag suggestin by Craig Joly
1 On Thu, 2002-07-18 at 18:05, Craig Joly wrote:
2 > A complaint that I've seen in the comments section of every single
3 > Gentoo review is "I tried to emerge VIM on my server and it wants to
4 > install X. Gentoo sucks!" or something along those lines. At first,
5 > the answer seems obvious:
6 > USE="-X" emerge vim
7 > It doesn't work, unless you happen to have the rest of your USE flags
8 > set exactly right. When you look at the dependancies in the ebuild,
9 > you find that it also can depend on gtk. All right:
10 > USE="-X -gtk" emerge vim
11 > Still wants to install X. Now, we start digging. And discover that
12 > python is causing the problem because it can depend on tcltk, which
13 > depends on X.
14 > USE="-X -gtk -tcltk" emerge vim
15 > This should work in all cases. As far as I can tell.
16 > Same problem with nethack and a few other programs. It's not a big
17 > deal for those of us who are willing to dig through all of the ebuilds
18 > looking for a stray dependency, just a pain in the ass, but it really
19 > sucks for new users who just want to set up a server.
20 >
21 > A possible solution: super USE flags, for want of a better name.
22 > Something along the lines of USE="noX", where
23 > noX=-X -gtk -gtk2 -qt -qtmt -tcltk -fltk -gnome -gnome-libs -kde -bonobo -xv -dga (any other toolkits, etc)
24 > nodb=-postgres -mysql -berkdb -gdbm -innodb (any other databases)
25 > nosound=-als -oss -esd -arts -oggvorbis (any other sound stuff)
26 > nofb=-directfb fbcon
27 > noscript=-perl -python -ruby -tcltk -guile
28 >
29 > I think you get the idea. That way, if you want to guarantee
30 > installing vim without X support:
31 > USE="noX" emerge vim
32 >
33 > What do you guys think.
34 >
35 > --
36 > Some mistakes are too much fun to only make once.
37 > _______________________________________________
38 > gentoo-dev mailing list
39 > gentoo-dev@g.o
40 > http://lists.gentoo.org/mailman/listinfo/gentoo-dev
41 >
42
43 I think we already have a solution in portage, we just need to use it.
44 Look at the file /etc/make.profile/use.defaults
45 It will conditionally activate USE variable if appropriate package is
46 installed. So all we need to do is to remove X from make.default
47 (well, we probably need to remove a few others too: gnome, etc.).
48 In this case, every package that has an *optional* X support, will not
49 build it, if it's built before X, but once X is installed, the same
50 package (when rebuild) will auto-enable USE="X" according to the
51 use.defaults and will build the optional X support.
52 Test instructions:
53 1) try "emerge -ep vim". You'll see that vim will require ~50 packages
54 (X, gnome, ....)
55 2) Go to /etc/make.profile. move or rename "use.defaults" file.
56 This is required, as the use.defaults handling does not take into
57 account the "-e" flag. [BUG?]
58 3) Now try "emerge -ep vim" again. You'll see that the list is still
59 the same. This is because USE variable in the make.default still
60 contains X,gnome, etc.
61 4) Now rename or move the "make.defaults" file. As it's required for
62 the portage operation, create an empty one: "touch make.defaults"
63 5) Now try again the "emerge -ep vim". You'll see the short list
64 of < 15 packages that will be build. This is because of the "-e"
65 switch, that makes the portage think that you have a clean system.
66 In the real situation, after a fresh install, you'll have most [all?]
67 of them already built.
68
69
70 /Vitaly.