On Sun, Oct 2, 2016 at 4:58 PM, Kent Fredric <ken...@gentoo.org> wrote: > On Sun, 2 Oct 2016 16:03:11 +0800 > konsolebox <konsole...@gmail.com> wrote: > >> I actually don't like the idea of enabling or disabling >> "installed-readline" based on the `${PV} != *_rc*` condition. If a >> user would want to explicitly enable "installed-readline" globally, >> how would he make sure that it only affects the release version of >> bash? I suggest that we just don't entertain the flag (and not make >> it available) if the ebuild is not targetting a release version, and >> not use the readline installed by the system by default. No one would >> need a non-release version of bash compiled against a system readline >> anyway. > > That's not what that does. It doesn't enable or disable the mechanic, > the code I offered only changes the default for _rc. > > That is, on _rc the default is "use bundled readline implementation", > and on non_rc, the default is "use pre-existing readline > implementation". > > if the user specifies an explicit > > USE="system-readline" > > in make.conf or /etc/portage/package.use, then this "default" gets > overridden and the system readline implementation is always used. > > if the user speciifies an explicit > > USE="-system-readline" > > in make.conf or /etc/portage/package.use, then this "default" gets > overriden and the inbuilt readline is awlays used. > > Explicitly defined configuration always trumps IUSE. The "+" prefix in > IUSE only specifies that the USE flag defaults to on, as opposed to > defaulting off.
I understand those elementary stuff, but my point was about whether we should allow the user to configure 'system-readline' on a non-release version of bash (i.e. make the flag available for them to configure). Your point is that instead of statically deciding whether we shouldn't use `--with-installed-readline` through `${PV} != *_rc*`, we instead base it on the flag, which means we allow the users to change the behavior of -non-release- versions of bash, which is, compiling against the bundled readline, to compiling against the system readline instead. How would a user be able to apply a distinguishing global configuration which would apply differently when the installing bash version is a release version, and when it's not? You might say that `system-readline` is enabled by default in a release version anyway, so specifying `system-readline` explicitly is meaningless and should only be done if you want to change the behavior of non-release versions of bash. But that's not the point. It's about the consistency. When we specify use flags in /etc/portage/make.conf, it shouldn't depend on the current default "enability" of a package's use flag. Also, do you think there could be a helpful case that one would install a non-release version of bash that compiles against the system readline? Perhaps if you're also brave enough to install an pre-release version of readline to the system, there is. Again, I say that it's better that the 'installed-readline' flag or 'system-readline' flag is only made available in the release versions of bash. And we also don't want to make it a dummy where it is just ignored and not excluded. >> I also thought using 'system-' prefix is confusing. Does that mean >> the system of the machine, or the system of the application? In >> firefox, I once thought that system-* means packages bundled within >> it. Perhaps I misread, or perhaps it was changed. At that time, >> descriptions of use flags were not widely provided yet so I could only >> guess it based on how I built the packages. > > The system of the machine. As in, "Operating System". Always. > "system-foo" usually means "foo is bundled, and toggling this flag > toggles between using the bundled foo, or the system foo. Yes, but I'm not talking about how it is now. But nevermind. >> But I don't really mind which one is used. I also just thought >> 'installed-readline' is better since it configures >> `--with-installed-readline`, so one can simply have `$(use_enable >> installed-readline)` if applicable. > > 'use_enable' takes a USE flag and a configure token anyway. > > So: > > $(use_enable system-readline installed-readline) > > is equivalent to: > > use system-readline && myconf+=" --enable-installed-readline" I know, but like I said, "simply". `installed-readline` is just more relative. But I don't really care whatever gets used. -- konsolebox