From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-14) on finch.gentoo.org X-Spam-Level: ** X-Spam-Status: No, score=2.1 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DMARC_REJECT,FORGED_YAHOO_RCVD,FREEMAIL_FROM,MAILING_LIST_MULTI, NICE_REPLY_A,RDNS_NONE,SPOOFED_FREEMAIL_NO_RDNS autolearn=no autolearn_force=no version=4.0.0 Received: from uranus.u235.eyep.net (unknown [194.90.113.98]) by chiba.3jane.net (Postfix) with SMTP id AF1FCAC438 for ; Thu, 18 Jul 2002 11:07:34 -0500 (CDT) Received: (qmail 11301 invoked by uid 1000); 18 Jul 2002 16:07:30 -0000 Subject: Re: [gentoo-dev] Portage2 super USE flag suggestin From: Vitaly Kushneriuk To: Gentoo-dev In-Reply-To: <20020718150528.GA25187@dante.taipan.mudshark.org> References: <20020718150528.GA25187@dante.taipan.mudshark.org> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Ximian Evolution 1.0.8 Date: 18 Jul 2002 19:07:30 +0300 Message-Id: <1027008450.23253.33.camel@uranus.u235.eyep.net> Mime-Version: 1.0 Sender: gentoo-dev-admin@gentoo.org Errors-To: gentoo-dev-admin@gentoo.org X-BeenThere: gentoo-dev@gentoo.org X-Mailman-Version: 2.0.6 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Gentoo Linux developer list List-Unsubscribe: , List-Archive: X-Archives-Salt: f7289505-ab5f-48cf-a643-bf6a94b76878 X-Archives-Hash: e9f252d3df176a483d45bcef9993b9a6 On Thu, 2002-07-18 at 18:05, Craig Joly wrote: > A complaint that I've seen in the comments section of every single > Gentoo review is "I tried to emerge VIM on my server and it wants to > install X. Gentoo sucks!" or something along those lines. At first, > the answer seems obvious: > USE="-X" emerge vim > It doesn't work, unless you happen to have the rest of your USE flags > set exactly right. When you look at the dependancies in the ebuild, > you find that it also can depend on gtk. All right: > USE="-X -gtk" emerge vim > Still wants to install X. Now, we start digging. And discover that > python is causing the problem because it can depend on tcltk, which > depends on X. > USE="-X -gtk -tcltk" emerge vim > This should work in all cases. As far as I can tell. > Same problem with nethack and a few other programs. It's not a big > deal for those of us who are willing to dig through all of the ebuilds > looking for a stray dependency, just a pain in the ass, but it really > sucks for new users who just want to set up a server. > > A possible solution: super USE flags, for want of a better name. > Something along the lines of USE="noX", where > noX=-X -gtk -gtk2 -qt -qtmt -tcltk -fltk -gnome -gnome-libs -kde -bonobo -xv -dga (any other toolkits, etc) > nodb=-postgres -mysql -berkdb -gdbm -innodb (any other databases) > nosound=-als -oss -esd -arts -oggvorbis (any other sound stuff) > nofb=-directfb fbcon > noscript=-perl -python -ruby -tcltk -guile > > I think you get the idea. That way, if you want to guarantee > installing vim without X support: > USE="noX" emerge vim > > What do you guys think. > > -- > Some mistakes are too much fun to only make once. > _______________________________________________ > gentoo-dev mailing list > gentoo-dev@gentoo.org > http://lists.gentoo.org/mailman/listinfo/gentoo-dev > I think we already have a solution in portage, we just need to use it. Look at the file /etc/make.profile/use.defaults It will conditionally activate USE variable if appropriate package is installed. So all we need to do is to remove X from make.default (well, we probably need to remove a few others too: gnome, etc.). In this case, every package that has an *optional* X support, will not build it, if it's built before X, but once X is installed, the same package (when rebuild) will auto-enable USE="X" according to the use.defaults and will build the optional X support. Test instructions: 1) try "emerge -ep vim". You'll see that vim will require ~50 packages (X, gnome, ....) 2) Go to /etc/make.profile. move or rename "use.defaults" file. This is required, as the use.defaults handling does not take into account the "-e" flag. [BUG?] 3) Now try "emerge -ep vim" again. You'll see that the list is still the same. This is because USE variable in the make.default still contains X,gnome, etc. 4) Now rename or move the "make.defaults" file. As it's required for the portage operation, create an empty one: "touch make.defaults" 5) Now try again the "emerge -ep vim". You'll see the short list of < 15 packages that will be build. This is because of the "-e" switch, that makes the portage think that you have a clean system. In the real situation, after a fresh install, you'll have most [all?] of them already built. /Vitaly.