From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <j_r_fonseca@yahoo.co.uk> X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-14) on finch.gentoo.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DMARC_REJECT,FREEMAIL_FROM,MAILING_LIST_MULTI autolearn=no autolearn_force=no version=4.0.0 Received: from mta02-svc.ntlworld.com (mta02-svc.ntlworld.com [62.253.162.42]) by chiba.3jane.net (Postfix) with ESMTP id B4AF7AC39C for <gentoo-dev@gentoo.org>; Wed, 22 May 2002 11:58:16 -0500 (CDT) Received: from localhost ([213.105.250.141]) by mta02-svc.ntlworld.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020522165805.SANE4626.mta02-svc.ntlworld.com@localhost> for <gentoo-dev@gentoo.org>; Wed, 22 May 2002 17:58:05 +0100 Date: Wed, 22 May 2002 17:58:12 +0100 From: =?iso-8859-1?Q?Jos=E9?= Fonseca <j_r_fonseca@yahoo.co.uk> To: gentoo-dev@gentoo.org Subject: [gentoo-dev] A proposal (Was: More suggestions for USE) Message-ID: <20020522175812.A8474@localhost> References: <1022082581.13307.9.camel@tara.pvt.jagunco.net> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit In-Reply-To: <1022082581.13307.9.camel@tara.pvt.jagunco.net>; from rufiao@gmx.net on Wed, May 22, 2002 at 16:49:34 +0100 X-Mailer: Balsa 1.2.4 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 Reply-To: gentoo-dev@gentoo.org List-Help: <mailto:gentoo-dev-request@gentoo.org?subject=help> List-Post: <mailto:gentoo-dev@gentoo.org> List-Subscribe: <http://lists.gentoo.org/mailman/listinfo/gentoo-dev>, <mailto:gentoo-dev-request@gentoo.org?subject=subscribe> List-Id: Gentoo Linux developer list <gentoo-dev.gentoo.org> List-Unsubscribe: <http://lists.gentoo.org/mailman/listinfo/gentoo-dev>, <mailto:gentoo-dev-request@gentoo.org?subject=unsubscribe> List-Archive: <http://lists.gentoo.org/pipermail/gentoo-dev/> X-Archives-Salt: 6b74adcf-28ac-4c05-b05f-8b22b49e0df5 X-Archives-Hash: fcf39b6a9e14ec33c7eb1e4cc6d2a2c3 The USE flags is the way by which portage knows what the main subsystems that the user pretends, and therefore which dependencies it should satisfy when installing an ebuild. In other words, now the USE flags represent in very global terms what the user wants. As Rufiao noticed, the USE flags fail to represent what the system additionally also has, as in the gnome flag example gave by him. To make the USE flags also represent what the system has there would had to be a distinction between the "user wants" and "system has" duality. An idea that seems to be viable is to have the USE flags very much like the "vitual provides" of some ebuilds, i.e., there would be two files: one with the USE flags that "user wants" which I'll call "use.wants" and other with the USE flags that have been already satisfied, which I'll call "use.has". When a user installs the first time Gentoo he would find a default "use.wants" (an automatically generated file from parsing all ebuilds) including a brief description. Something like: use.wants: #flag description gnome The GNOME desktop manager kde The K Desktop Environment we would uncomment what we wants, and comment what we doesn't want. At this time "use.has" would be empty, as the system has the bare minimum. By typing e.g., "emerge --use", emerge would install every ebuild which provided what was specified in "use.has" and wasn't already in "use.has". Everytime the user installed a package that provided some USE flag, emerge would update "use.has" accordingly. If by some reason the user wanted to remove some USE flag from the system he would do, e.g., "emerge --unuse gnome", and emerge would remove the packages that provided gnome and its dependencies, updating both "use.wants" and "use.has". All this after confirming the user intention, of course. This would simplify enormously the first time installation and the maintainance of the USE vars, and best, it would be possible a smooth transition. Each ebuild would just add something like gnome-libs-x.xx.ebuild: ... USE_PROVIDE = "gnome" ... ... get_use() { echo "gnome The GNOME desktop manager" } where the automatically generation of the default "use.wants" would be made by calling "get_use", but initally the ebuilds could just remain as is, and the default "use.wants" would be made by hand, and the USE_PROVIDES would be gradually added. As you can see the USE flags would become very similar to the "virtual provides". I'm not even sure if we could blend these two concepts. I don't know what are the detailed plans for portage2 but I would like to see this proposal considered and discussed. Regards, José Fonseca On 2002.05.22 16:49 Rufiao Valhacouto wrote: > I'd be useful if each ebuild could provide some queries to specify which > USE flags a given package can use, and give some explanations about what > are the end results of using each flag. Also, some kind of 'suggested' > USE flags could be implemented, possibly using some dynamic > configuration hints (eg. if the ebuild detects there is gnome installed, > it can suggest the gnome flag). > > I've seen some proposals for implementing a more effective way to > maintain the USE flags for each package, and it seems for me this is a > must. Anyway, it would be nice if emerge/ebuild could record the USE > flags used in the build process for each package to help in the track of > how everything was compiled. >