gluon/scripts
Matthias Schiffer 13b743d51e features: fix handling of logical expressions
The rewrite of the feature handling introduced multiple major bugs. One
of them was caused by the way Lua's logical operators work:

An expression of the form

    _'autoupdater' and _'web-advanced'

would return 'web-advanced' rather than the boolean true when _ returned
both strings unchanged (because the features are enabled).

As entries with more than a single feature name in their expressions did
not set no_default, Gluon would then attempt to add gluon-web-advanced to
the package selection, as web-advanced is a "pure" feature.

To fix this, and get rid of the annoying nodefault, separate handling of
"pure" feature and handling of logical expressions into two separate
functions, called feature() and when(). To simplify the feature
definitions, the package list is now passed directly to these functions
rather than in a table with a single field 'packages'.

Fixes: ee5ec5afe5 ("build: rewrite features.sh in Lua")
2020-08-28 22:27:38 +02:00
..
check_site.lua scripts: check_site: add need_number_range check 2020-04-30 01:54:35 +02:00
clean_output.lua scripts: avoid global variables in target handler scripts 2019-06-18 01:34:45 +02:00
copy_output.lua openwrt: Store Kernel Debug-Info (#1971) 2020-06-04 22:35:58 +02:00
default_feeds.sh build: ignore deactivated feeds 2020-05-12 19:46:36 +02:00
domain_aliases.lua gluon-core: add domain aliases and pretty name 2018-01-26 12:32:47 +01:00
feature_lib.lua features: fix handling of logical expressions 2020-08-28 22:27:38 +02:00
feeds.sh build: allow overriding the base feed list 2020-04-09 14:30:44 +02:00
filesize.sh treewide: solve shellcheck warnings 2019-12-14 18:35:11 +01:00
generate_manifest.lua scripts: generate_manifest: remove obsolete manifest lines (#2067) 2020-07-04 22:07:25 +02:00
lint-lua.sh build: add make targets lint, lint-sh, lint-lua 2019-12-29 15:18:50 +01:00
lint-sh.sh build: add make targets lint, lint-sh, lint-lua 2019-12-29 15:18:50 +01:00
module_check.sh build: check for unsynced feeds before build (#2092) 2020-08-15 22:39:17 +02:00
modules.sh treewide: solve shellcheck warnings 2019-12-14 18:35:11 +01:00
patch.sh treewide: solve shellcheck warnings 2019-12-14 18:35:11 +01:00
rfc3339date.lua scripts/rfc3339date.lua: fix pattern validity 2014-07-21 03:44:53 +02:00
sha256sum.sh treewide: solve shellcheck warnings 2019-12-14 18:35:11 +01:00
site_config.lua Switch to Lua for target definitions 2019-06-15 23:34:07 +02:00
target_config_check.lua build: target_config_check: make check more lenient 2020-06-05 22:27:10 +02:00
target_config_lib.lua build: rewrite features.sh in Lua 2020-07-01 20:35:22 +02:00
target_config.lua build: remove now-unneeded function from target_config_lib.lua 2020-05-31 02:20:58 +02:00
target_lib.lua scripts/target_lib.lua: print a meaningful error message for missing site_code (#2094) 2020-08-15 13:59:54 +02:00
update-patches.sh scripts: update-patches: fix shellcheck 0.7.1 lint 2020-05-25 01:10:18 +02:00
update.sh treewide: solve shellcheck warnings 2019-12-14 18:35:11 +01:00