@@ -30,6 +30,7 @@ DEFAULT_ARGUMENT=""
3030ARGUMENT=(" ${@ } " )
3131alteriso_version=" 3.1"
3232norepopkg=()
33+ legacy_mode=false
3334
3435# Load config file
3536[[ ! -f " ${defaultconfig} " ]] && " ${tools_dir} /msg.sh" -a ' build.sh' error " ${defaultconfig} was not found." && exit 1
@@ -414,6 +415,7 @@ prepare_build() {
414415 if [[ " $( bash " ${tools_dir} /channel.sh" --version " ${alteriso_version} " ver " ${channel_name} " ) " = " 3.0" ]]; then
415416 msg_warn " The module cannot be used because it works with Alter ISO3.0 compatibility."
416417 modules=(" legacy" )
418+ legacy_mode=true
417419 [[ " ${include_extra-" unset" } " = true ]] && modules=(" legacy-extra" )
418420 fi
419421
@@ -549,18 +551,20 @@ make_packages_repo() {
549551 readarray -t _pkglist_install < <( " ${tools_dir} /pkglist.sh" " ${pkglist_args[@]} " )
550552
551553 # Package check
552- # readarray -t _pkglist < <("${tools_dir}/pkglist.sh" "${pkglist_args[@]}")
553- # readarray -t repopkgs < <(pacman-conf -c "${build_pacman_conf}" -l | xargs -I{} pacman -Sql --config "${build_pacman_conf}" --color=never {} && pacman -Sg)
554- # local _pkg
555- # for _pkg in "${_pkglist[@]}"; do
556- # msg_info "Checking ${_pkg}..."
557- # if printf "%s\n" "${repopkgs[@]}" | grep -qx "${_pkg}"; then
558- # _pkglist_install+=("${_pkg}")
559- # else
560- # msg_info "${_pkg} was not found. Install it with yay from AUR"
561- # norepopkg+=("${_pkg}")
562- # fi
563- # done
554+ if [[ " ${legacy_mode} " = true ]]; then
555+ readarray -t _pkglist < <( " ${tools_dir} /pkglist.sh" " ${pkglist_args[@]} " )
556+ readarray -t repopkgs < <( pacman-conf -c " ${build_pacman_conf} " -l | xargs -I{} pacman -Sql --config " ${build_pacman_conf} " --color=never {} && pacman -Sg)
557+ local _pkg
558+ for _pkg in " ${_pkglist[@]} " ; do
559+ msg_info " Checking ${_pkg} ..."
560+ if printf " %s\n" " ${repopkgs[@]} " | grep -qx " ${_pkg} " ; then
561+ _pkglist_install+=(" ${_pkg} " )
562+ else
563+ msg_info " ${_pkg} was not found. Install it with yay from AUR"
564+ norepopkg+=(" ${_pkg} " )
565+ fi
566+ done
567+ fi
564568
565569 # Create a list of packages to be finally installed as packages.list directly under the working directory.
566570 echo -e " # The list of packages that is installed in live cd.\n#\n" > " ${build_dir} /packages.list"
0 commit comments