-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
buildsystem: source functions earlier, validate project/arch earlier, refactor show_config #2323
buildsystem: source functions earlier, validate project/arch earlier, refactor show_config #2323
Conversation
Commit: Calling
This change will reduce the number of forks to 1 for Ping @HiassofT. |
Commit: While testing the
results in:
such that Firstly, there is no package called Secondly, if a This change removes the Removing |
caching the module directory should be fine, but IMO it would be better to name the environment variable _CACHED_KERNEL_MODULE_DIR (similar to the package cache in config/path). KERNEL_MODULE_DIR looks like some variable a builder might change (and he could when calling scripts/build) but that would make no sense of course. |
Thanks - I've pushed this change. |
Commit: See comments: b3fe491#commitcomment-26335296 |
Initialising the package cache every time doesn't really impose that much overhead, so populate it every time I've also fixed some weird indentation in the "package cache" commit, so use |
ping @HiassofT Commit: The function For example: LibreELEC.tv/packages/linux/package.mk Line 261 in bc18f25
This results in the path LibreELEC.tv/packages/linux/package.mk Line 264 in bc18f25
This results in:
Again, there is an issue with double Changing the base function |
good catch, looks fine to me! |
config/functions
is not sourced untilconfig/path
, which means that none of the helper functions are available to the variousoptions
scripts (eg.$DISTRO/options
) that are processed much earlier.In addition,
check_path
andcheck_config
are called after a package is sourced inconfig/path
, which is a problem when using an invalid project/arch/device configuration, and sourcing a package (such askodi
) which includes nested references to other packages, eg.LibreELEC.tv/packages/mediacenter/kodi/package.mk
Line 88 in 677c3c0
If you were to run:
then it will fail silently, as
$(get_pkg_version libdvdcss)
callsconfig/options libdvdcss
which correctly outputs the ARCH config error (to stdout, which is processed as input inkodi/package.mk
, so not visible to the user) andexit 1
brings the run to an end, with the user none the wiser.Now, it fails as it should, before sourcing any packages, and outputs the error to stderr.
I'm not really sure if calling
check_path
after the package achieves anything more than what this PR now does, as the only waycheck_path
could fail is if thepackage.mk
performscd /usr
while being sourced, which seems a little unlikely.I've also moved
show_config()
to a separate file as it's a large function that is being sourced multiple times but is only ever executed once.