* [gentoo-dev] Re: use flags -> use options [not found] <47090820.7060506@gentoo.org> @ 2007-10-07 18:09 ` Christian Faulhammer 2007-10-07 19:12 ` Tobias Klausmann 0 siblings, 1 reply; 10+ messages in thread From: Christian Faulhammer @ 2007-10-07 18:09 UTC (permalink / raw To: gentoo-dev [-- Attachment #1: Type: text/plain, Size: 476 bytes --] "Marijn Schouten (hkBst)" <hkBst@gentoo.org>: > I imagine there are a lot more cases where the simple on/off system > we have now is suboptimal. I could be wrong of course. Please comment. This key=value systems sounds interesting. Another use could be the choice between xulrunner, seamonkey, firefox. V-Li -- Christian Faulhammer, Gentoo Lisp project <URL:http://www.gentoo.org/proj/en/lisp/>, #gentoo-lisp on FreeNode <URL:http://www.faulhammer.org/> [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-dev] Re: use flags -> use options 2007-10-07 18:09 ` [gentoo-dev] Re: use flags -> use options Christian Faulhammer @ 2007-10-07 19:12 ` Tobias Klausmann 2007-10-07 22:00 ` Jan Kundrát 2007-10-08 2:43 ` Marius Mauch 0 siblings, 2 replies; 10+ messages in thread From: Tobias Klausmann @ 2007-10-07 19:12 UTC (permalink / raw To: gentoo-dev Hi! On Sun, 07 Oct 2007, Christian Faulhammer wrote: > "Marijn Schouten (hkBst)" <hkBst@gentoo.org>: > > I imagine there are a lot more cases where the simple on/off system > > we have now is suboptimal. I could be wrong of course. Please comment. > > This key=value systems sounds interesting. Another use could be the > choice between xulrunner, seamonkey, firefox. And maybe it can be alleviated for some of the virtuals problem space. For those apps that need an editor, one could think of editor=vim. That would then of course raise the question of a sensible default - as it is with virtual/editor right now. Generally, its prime area of use is where something can be turned off (foo=off) or turned on with different ways of getting the functionality (foo=gnufoo, foo=freefoo, foo=foong). Another thing to keep in mind is though, that gnufoo might not have all the nifty-but-patent-ridden stuff that freefoo has. Then again, the user/sysadmin should know which of those fits the bill. The question would only be how to convey this info to the admin. Regards, Tobias -- In the future, everyone will be anonymous for 15 minutes. -- gentoo-dev@gentoo.org mailing list ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-dev] Re: use flags -> use options 2007-10-07 19:12 ` Tobias Klausmann @ 2007-10-07 22:00 ` Jan Kundrát 2007-10-08 4:17 ` Drake Wyrm 2007-10-08 2:43 ` Marius Mauch 1 sibling, 1 reply; 10+ messages in thread From: Jan Kundrát @ 2007-10-07 22:00 UTC (permalink / raw To: gentoo-dev [-- Attachment #1: Type: text/plain, Size: 311 bytes --] Tobias Klausmann wrote: > For those apps that need an editor, one could think of editor=vim. USE flag change usually triggers a rebuild of the package in question. I certainly don't want to rebuild packages just because I switch $EDITOR. Cheers, -jkt -- cd /local/pub && more beer > /dev/mouth [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 252 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-dev] Re: use flags -> use options 2007-10-07 22:00 ` Jan Kundrát @ 2007-10-08 4:17 ` Drake Wyrm 0 siblings, 0 replies; 10+ messages in thread From: Drake Wyrm @ 2007-10-08 4:17 UTC (permalink / raw To: gentoo-dev Jan Kundr?t <jkt@gentoo.org> wrote: > Tobias Klausmann wrote: > > For those apps that need an editor, one could think of editor=vim. > > USE flag change usually triggers a rebuild of the package in question. I > certainly don't want to rebuild packages just because I switch $EDITOR. If there's a compile-time dependency on an editor, usually meaning that the path to an editor is hardcoded into some binary, then you most certainly _do_ want to recompile when you switch the system editor. Otherwise, those packages will fail when you remove the old editor. -- There are problems in today's world that cannot be solved by the level of thinking that created them. -- Albert Einstein -- gentoo-dev@gentoo.org mailing list ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-dev] Re: use flags -> use options 2007-10-07 19:12 ` Tobias Klausmann 2007-10-07 22:00 ` Jan Kundrát @ 2007-10-08 2:43 ` Marius Mauch 2007-10-08 11:45 ` Marijn Schouten (hkBst) 1 sibling, 1 reply; 10+ messages in thread From: Marius Mauch @ 2007-10-08 2:43 UTC (permalink / raw To: gentoo-dev On Sun, 7 Oct 2007 21:12:25 +0200 Tobias Klausmann <klausman@schwarzvogel.de> wrote: > Hi! > > On Sun, 07 Oct 2007, Christian Faulhammer wrote: > > > "Marijn Schouten (hkBst)" <hkBst@gentoo.org>: > > > I imagine there are a lot more cases where the simple on/off > > > system we have now is suboptimal. I could be wrong of course. > > > Please comment. > > > > This key=value systems sounds interesting. Another use could be > > the choice between xulrunner, seamonkey, firefox. We already have this with USE_EXPAND. Not exactly the same syntax, but I don't see a terrible problem in that, and we don't have to fix all three trillion related tools to handle it. Unless you can come up with a case that can't be handled with USE_EXPAND. > And maybe it can be alleviated for some of the virtuals problem > space. For those apps that need an editor, one could think of > editor=vim. I don't see how this is related at all, as the packages need an editor, but don't care which editor. So what would USE="editor=vim" do? Marius -- gentoo-dev@gentoo.org mailing list ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-dev] Re: use flags -> use options 2007-10-08 2:43 ` Marius Mauch @ 2007-10-08 11:45 ` Marijn Schouten (hkBst) 2007-10-08 14:40 ` Ryan Hill 2007-10-08 19:40 ` Marius Mauch 0 siblings, 2 replies; 10+ messages in thread From: Marijn Schouten (hkBst) @ 2007-10-08 11:45 UTC (permalink / raw To: gentoo-dev -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Marius Mauch wrote: >>> "Marijn Schouten (hkBst)" <hkBst@gentoo.org>: >>>> I imagine there are a lot more cases where the simple on/off >>>> system we have now is suboptimal. I could be wrong of course. >>>> Please comment. >>> This key=value systems sounds interesting. Another use could be >>> the choice between xulrunner, seamonkey, firefox. > > We already have this with USE_EXPAND. Not exactly the same syntax, but > I don't see a terrible problem in that, and we don't have to fix all > three trillion related tools to handle it. Unless you can come up > with a case that can't be handled with USE_EXPAND. No, USE_EXPAND is only a way to abbreviate use flags with a common substring in their name, such as "impl_guile impl_sbcl impl_clisp" which could be encoded interchangeably as either # without USE_EXPAND IUSE="impl_guile impl_sbcl impl_clisp" or # with USE_EXPAND for impl in IMPL; do IUSE+="impl_${impl}"; done but the effect is that there are 3 use flags with a total of 2^3=8 combinations, while really something with exactly 3 combinations is needed: IUSE="impl" case ${impl} in guile) #use guile as backend sbcl) #use sbcl as backend clisp) #use clisp as backend or something like that. Marijn - -- Marijn Schouten (hkBst), Gentoo Lisp project <http://www.gentoo.org/proj/en/lisp/>, #gentoo-lisp on FreeNode -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.7 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHChhAp/VmCx0OL2wRArxWAKCWfciDl5XihPOoiI/01J3DjGGpqgCdFJxV 9n89OMcqxqD4JqFTPDGt12o= =njyU -----END PGP SIGNATURE----- -- gentoo-dev@gentoo.org mailing list ^ permalink raw reply [flat|nested] 10+ messages in thread
* [gentoo-dev] Re: use flags -> use options 2007-10-08 11:45 ` Marijn Schouten (hkBst) @ 2007-10-08 14:40 ` Ryan Hill 2007-10-08 14:48 ` Marijn Schouten (hkBst) 2007-10-08 19:40 ` Marius Mauch 1 sibling, 1 reply; 10+ messages in thread From: Ryan Hill @ 2007-10-08 14:40 UTC (permalink / raw To: gentoo-dev Marijn Schouten (hkBst) wrote: > Marius Mauch wrote: >> We already have this with USE_EXPAND. Not exactly the same syntax, but >> I don't see a terrible problem in that, and we don't have to fix all >> three trillion related tools to handle it. Unless you can come up >> with a case that can't be handled with USE_EXPAND. > No, USE_EXPAND is only a way to abbreviate use flags with a common substring > in their name, such as "impl_guile impl_sbcl impl_clisp" which could be > encoded interchangeably as either You're kidding, right? > USE EXPAND Defines a list of variables which are to be treated incrementally and who > contents are to be expanded into the USE variable as passed to ebuilds. Expansion > done as per Algorithm 2. So, for example, if USE EXPAND contains ‘ALSA CARDS’, an > the ALSA CARDS variable contains ‘foo’, ‘alsa_cards_foo’ will be appended to USE. > Algorithm 2: USE EXPAND logic > for each variable V listed in USE EXPAND do > for each token T in V do > append v_T to USE, where v is the lowercase of V > end for > end for -- fonts / wxWindows / gcc-porting / treecleaners EFFD 380E 047A 4B51 D2BD C64F 8AA8 8346 F9A4 0662 (0xF9A40662) -- gentoo-dev@gentoo.org mailing list ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-dev] Re: use flags -> use options 2007-10-08 14:40 ` Ryan Hill @ 2007-10-08 14:48 ` Marijn Schouten (hkBst) 0 siblings, 0 replies; 10+ messages in thread From: Marijn Schouten (hkBst) @ 2007-10-08 14:48 UTC (permalink / raw To: gentoo-dev -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Ryan Hill wrote: > Marijn Schouten (hkBst) wrote: >> Marius Mauch wrote: > >>> We already have this with USE_EXPAND. Not exactly the same syntax, but >>> I don't see a terrible problem in that, and we don't have to fix all >>> three trillion related tools to handle it. Unless you can come up >>> with a case that can't be handled with USE_EXPAND. > >> No, USE_EXPAND is only a way to abbreviate use flags with a common substring >> in their name, such as "impl_guile impl_sbcl impl_clisp" which could be >> encoded interchangeably as either > > You're kidding, right? No, if what I'm saying makes no sense it is ignorance. Please enlighten me. Marijn - -- Marijn Schouten (hkBst), Gentoo Lisp project <http://www.gentoo.org/proj/en/lisp/>, #gentoo-lisp on FreeNode -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.7 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHCkNVp/VmCx0OL2wRAv1/AJ9GBpu8wL6NL4Xw8sawwPEeHAmkdQCeJFqF fq8NiFnqnV9NBErojijBW+A= =LO9y -----END PGP SIGNATURE----- -- gentoo-dev@gentoo.org mailing list ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-dev] Re: use flags -> use options 2007-10-08 11:45 ` Marijn Schouten (hkBst) 2007-10-08 14:40 ` Ryan Hill @ 2007-10-08 19:40 ` Marius Mauch 2007-10-09 10:20 ` Marijn Schouten (hkBst) 1 sibling, 1 reply; 10+ messages in thread From: Marius Mauch @ 2007-10-08 19:40 UTC (permalink / raw To: gentoo-dev On Mon, 08 Oct 2007 13:45:04 +0200 "Marijn Schouten (hkBst)" <hkBst@gentoo.org> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Marius Mauch wrote: > >>> "Marijn Schouten (hkBst)" <hkBst@gentoo.org>: > >>>> I imagine there are a lot more cases where the simple on/off > >>>> system we have now is suboptimal. I could be wrong of course. > >>>> Please comment. > >>> This key=value systems sounds interesting. Another use could be > >>> the choice between xulrunner, seamonkey, firefox. > > > > We already have this with USE_EXPAND. Not exactly the same syntax, > > but I don't see a terrible problem in that, and we don't have to > > fix all three trillion related tools to handle it. Unless you can > > come up with a case that can't be handled with USE_EXPAND. > > No, USE_EXPAND is only a way to abbreviate use flags with a common > substring in their name, such as "impl_guile impl_sbcl impl_clisp" > which could be encoded interchangeably as either > > # without USE_EXPAND > IUSE="impl_guile impl_sbcl impl_clisp" > > or > > # with USE_EXPAND > for impl in IMPL; do IUSE+="impl_${impl}"; done > > but the effect is that there are 3 use flags with a total of 2^3=8 > combinations, while really something with exactly 3 combinations is > needed: > > IUSE="impl" > > case ${impl} in > guile) #use guile as backend > sbcl) #use sbcl as backend > clisp) #use clisp as backend So what you want is a USE_EXPAND version that only allows one value per variable. That wouldn't be terribly difficult to do. As for your idea (ignoring implementation issues), I'd expect that sooner or later people will request multivalue functionality as well, so we'd have the same situation there. Also in the given example, how would the user/package manager actually know what values were valid/available for "impl"? Marius -- gentoo-dev@gentoo.org mailing list ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-dev] Re: use flags -> use options 2007-10-08 19:40 ` Marius Mauch @ 2007-10-09 10:20 ` Marijn Schouten (hkBst) 0 siblings, 0 replies; 10+ messages in thread From: Marijn Schouten (hkBst) @ 2007-10-09 10:20 UTC (permalink / raw To: gentoo-dev -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Marius Mauch wrote: > So what you want is a USE_EXPAND version that only allows one value > per variable. That wouldn't be terribly difficult to do. I extremely dislike that characterization. What I want is use flags with more than two possible values. I see no reason to warp that to fit USE_EXPAND. There may even be uses where this could be used in combination with USE_EXPAND. > As for your idea (ignoring implementation issues), I'd expect that > sooner or later people will request multivalue functionality as well, > so we'd have the same situation there. Right, current use flags are "2 options, pick 1", I am requesting "n options, pick 1" and you're saying "n options, pick m, (m<n)" might be useful too. But "n options, pick m, (m<n)" reduces to n times "2 options, pick 1" (you decide for each possible value whether to include it or not). This is exactly why our "2 options, pick 1" system works so well most of the time. > Also in the given example, how > would the user/package manager actually know what values were > valid/available for "impl"? That is a good question. If all possible options need to be specified a syntax should be developed for that. How about: IUSE="+default_on_flag normalflag multiwayflag={option1,option2,+default_option} -default_off_flag", or IUSE="+default_on_flag normalflag multiwayflag={option1 option2 +default_option} -default_off_flag", or IUSE="+default_on_flag normalflag multiwayflag=(option1 option2 +default_option) -default_off_flag". In use.[local.]desc the multiwayflag description should explain what each alternative means. Marijn - -- Marijn Schouten (hkBst), Gentoo Lisp project <http://www.gentoo.org/proj/en/lisp/>, #gentoo-lisp on FreeNode -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.7 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHC1Xup/VmCx0OL2wRAnrfAJkBLMTuzlpu6g4uhZW6429hJ3gsUgCgr8h7 2cX5/qHGbj4Y3GgDCw/uSrk= =pVPW -----END PGP SIGNATURE----- -- gentoo-dev@gentoo.org mailing list ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2007-10-09 10:30 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <47090820.7060506@gentoo.org> 2007-10-07 18:09 ` [gentoo-dev] Re: use flags -> use options Christian Faulhammer 2007-10-07 19:12 ` Tobias Klausmann 2007-10-07 22:00 ` Jan Kundrát 2007-10-08 4:17 ` Drake Wyrm 2007-10-08 2:43 ` Marius Mauch 2007-10-08 11:45 ` Marijn Schouten (hkBst) 2007-10-08 14:40 ` Ryan Hill 2007-10-08 14:48 ` Marijn Schouten (hkBst) 2007-10-08 19:40 ` Marius Mauch 2007-10-09 10:20 ` Marijn Schouten (hkBst)
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox