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 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. > > 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" But you probably wanted "use_with" ( man 5 ebuild ) $(use_with system-readline installed-readline) Which is instead equivalent to use system-readline && myconf+=" --with-installed-readline"
pgpVvou7e6YxO.pgp
Description: OpenPGP digital signature