[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#952919: [live-build] messy script init



Package: live-build
Version: 1:20191221
Owner: jnqnfe@gmail.com
Severity: wishlist

some of the steps performed in the initialisation steps of scripts are
messy and suffer from  code duplication issues (e.g. the list of config
files to read).

it would is trivial to address this will a little effort.

low-level build components all:
 - run `Arguments "${@}"`
 - read the set of config files
 - run Set_defaults()

this could be consolidated into a hypothetical `Init_config_data
"${@}"` call.

the major build stages all:
 - check for the existence of a config and conditionally call `lb
config`
 - run `Arguments "${@}"`
 - read the set of config files
 - run Set_defaults()
 - run Setup_cleanup()

this could be consolidated into a hypothetical `Init_build_stage
"${@}"` call.

the primary commands (`lb config`, `lb build` and `lb clean`) could
make use of some of the same component helpers that those hypothetical
functions might use, e.g. to get the set of config files from a single
declaration.

patches to be submitted via salsa soon


Reply to: