From 13a9ada59d7ac518a683cd4ff3bdf724343276a9 Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Fri, 24 Jun 2022 19:42:53 +0200 Subject: [PATCH] modbuild: all bootstrapping code removed --- Pmodules/libpbuild.bash | 102 ++++++++++++++-------------------------- Pmodules/modbuild.in | 25 +--------- 2 files changed, 37 insertions(+), 90 deletions(-) diff --git a/Pmodules/libpbuild.bash b/Pmodules/libpbuild.bash index 119e35f..6ff5762 100644 --- a/Pmodules/libpbuild.bash +++ b/Pmodules/libpbuild.bash @@ -927,10 +927,8 @@ pbuild::make_all() { "${PREFIX}/${FNAME_IDEPS}" \ "${install_dependencies[@]}" fi - if [[ "${bootstrap}" == 'no' ]]; then - install_modulefile - install_release_file - fi + install_modulefile + install_release_file cleanup_build cleanup_src std::info \ @@ -1167,47 +1165,45 @@ pbuild::make_all() { # # setup module specific environment - if [[ "${bootstrap}" == 'no' ]]; then - check_supported_systems - check_supported_os - check_supported_compilers - set_full_module_name_and_prefix + check_supported_systems + check_supported_os + check_supported_compilers + set_full_module_name_and_prefix + std::info \ + "%s " \ + "${module_name}/${module_version}:" \ + ${with_modules:+build with ${with_modules[@]}} + if [[ -d ${PREFIX} ]] && [[ ${force_rebuild} != 'yes' ]]; then + # don't (re-)build the module, but + # - if the release stage has been changed to 'removed', + # remove the module. + # - if requested, update the modulefile. + # - if modulefile does not exist, install it. + # - update release stage. + if [[ "${module_release}" == 'removed' ]]; then + remove_module + return $? + fi std::info \ "%s " \ "${module_name}/${module_version}:" \ - ${with_modules:+build with ${with_modules[@]}} - if [[ -d ${PREFIX} ]] && [[ ${force_rebuild} != 'yes' ]]; then - # don't (re-)build the module, but - # - if the release stage has been changed to 'removed', - # remove the module. - # - if requested, update the modulefile. - # - if modulefile does not exist, install it. - # - update release stage. - if [[ "${module_release}" == 'removed' ]]; then - remove_module - return $? - fi - std::info \ - "%s " \ - "${module_name}/${module_version}:" \ - "already exists, not rebuilding ..." - if [[ "${opt_update_modulefiles}" == "yes" ]] || \ + "already exists, not rebuilding ..." + if [[ "${opt_update_modulefiles}" == "yes" ]] || \ [[ ! -e "${modulefile_name}" ]]; then - install_modulefile - fi - install_release_file - cleanup_modulefiles - return $? - fi - if [[ "${module_release}" == 'deprecated' ]]; then - std::info \ - "%s " \ - "${module_name}/${module_version}:" \ - "is deprecated, skiping!" - install_release_file - cleanup_modulefiles - return $? + install_modulefile fi + install_release_file + cleanup_modulefiles + return $? + fi + if [[ "${module_release}" == 'deprecated' ]]; then + std::info \ + "%s " \ + "${module_name}/${module_version}:" \ + "is deprecated, skiping!" + install_release_file + cleanup_modulefiles + return $? fi std::info \ "%s " \ @@ -1312,7 +1308,6 @@ pbuild.build_module() { with_modules=( "$@" ) # used in pbuild::make_all - declare bootstrap='no' declare -a runtime_dependencies=() declare -a install_dependencies=() @@ -1502,31 +1497,6 @@ pbuild.build_module() { std::info "* * * * *\n" } -pbuild.bootstrap() { - local -r module_name="$1" - local -r module_version="$2" - - # used in pbuild::make_all - bootstrap='yes' - - pbuild.init_env "${module_name}" "${module_version}" - - MODULECMD=$(which true) - GROUP='Tools' - PREFIX="${ol_mod_root}/${GROUP}/Pmodules/${PMODULES_VERSION}" - - C_INCLUDE_PATH="${PREFIX}/include" - CPLUS_INCLUDE_PATH="${PREFIX}/include" - CPP_INCLUDE_PATH="${PREFIX}/include" - LIBRARY_PATH="${PREFIX}/lib" - LD_LIBRARY_PATH="${PREFIX}/lib" - DYLD_LIBRARY_PATH="${PREFIX}/lib" - - PATH+=":${PREFIX}/bin" - PATH+=":${PREFIX}/sbin" - pbuild::make_all -} - # Local Variables: # mode: sh # sh-basic-offset: 8 diff --git a/Pmodules/modbuild.in b/Pmodules/modbuild.in index 6b66305..adcb5be 100755 --- a/Pmodules/modbuild.in +++ b/Pmodules/modbuild.in @@ -165,7 +165,6 @@ MISCELLANEOUS OPTIONS: # versions to be build, '.*' or none means all declare -a versions=() -declare opt_bootstrap='no' declare opt_build_config='Pmodules.yaml' declare opt_build_target='all' declare opt_dry_run='no' @@ -288,9 +287,6 @@ parse_args() { --prep | --configure | --compile | --install | --all ) opt_build_target=${1:2} ;; - --bootstrap ) - opt_bootstrap='yes' - ;; --update-modulefiles ) opt_update_modulefiles='yes' ;; @@ -608,11 +604,7 @@ pbuild.verbose "${opt_verbose}" # # read configuration for modbuild # -if [[ "${opt_bootstrap}" == 'yes' ]]; then - pm::read_config "${BUILDBLOCK_DIR}/../../config/Pmodules.yaml" -else - pm::read_config -fi +pm::read_config # :FIXME: should go dist files to # ${pm_root}/var/distfiles @@ -629,21 +621,6 @@ declare -r BUILDBLOCK_DIR IFS=/ read -r -a fname <<< "${BUILD_SCRIPT:1}" module_name=${fname[${#fname[@]}-2]} -# -# are we bootstrapping? If yes, go for it... -# -if [[ "${opt_bootstrap}" == 'yes' ]]; then - declare ol_name='base' - declare ol_type='' - declare ol_mod_root="${pm_root}" - declare ol_inst_root="${pm_root}" - pbuild.bootstrap "${module_name}" "${versions[0]}" 'stable' - exit $? -fi - -# -# else -# for version in "${versions[@]}"; do build_modules "${module_name}" "${version}" "${opt_with_modules[@]}" done