@@ -29,6 +29,7 @@ modules=()
2929DEFAULT_ARGUMENT=" "
3030ARGUMENT=(" ${@ } " )
3131alteriso_version=" 3.1"
32+ norepopkg=()
3233
3334# Load config file
3435[[ ! -f " ${defaultconfig} " ]] && " ${tools_dir} /msg.sh" -a ' build.sh' error " ${defaultconfig} was not found." && exit 1
@@ -421,13 +422,14 @@ prepare_build() {
421422 # Legacy mode
422423 if [[ " $( bash " ${tools_dir} /channel.sh" --version " ${alteriso_version} " ver " ${channel_name} " ) " = " 3.0" ]]; then
423424 msg_warn " The module cannot be used because it works with Alter ISO3.0 compatibility."
424- if [[ -n " ${include_extra+SET} " ]]; then
425- if [[ " ${include_extra} " = true ]]; then
426- modules=(" base" " share" " share-extra" " calamares" " zsh-powerline" )
427- else
425+ case " ${include_extra-" unset" } " in
426+ " true" )
427+ modules=(" base" " share" " share-extra" " gtk-tools" " pamac" " calamares" " zsh-powerline" )
428+ ;;
429+ " false" | " unset" )
428430 modules=(" base" " share" )
429- fi
430- fi
431+ ;;
432+ esac
431433 fi
432434
433435 local module_check
@@ -552,20 +554,35 @@ make_basefs() {
552554# Additional packages (airootfs)
553555make_packages_repo () {
554556 msg_debug " pkglist.sh ${pkglist_args[*]} "
555- readarray -t _pkglist < <( " ${tools_dir} /pkglist.sh" " ${pkglist_args[@]} " )
557+ readarray -t _pkglist_install < <( " ${tools_dir} /pkglist.sh" " ${pkglist_args[@]} " )
558+
559+ # Package check
560+ # readarray -t _pkglist < <("${tools_dir}/pkglist.sh" "${pkglist_args[@]}")
561+ # readarray -t repopkgs < <(pacman-conf -c "${build_pacman_conf}" -l | xargs -I{} pacman -Sql --config "${build_pacman_conf}" --color=never {} && pacman -Sg)
562+ # local _pkg
563+ # for _pkg in "${_pkglist[@]}"; do
564+ # msg_info "Checking ${_pkg}..."
565+ # if printf "%s\n" "${repopkgs[@]}" | grep -qx "${_pkg}"; then
566+ # _pkglist_install+=("${_pkg}")
567+ # else
568+ # msg_info "${_pkg} was not found. Install it with yay from AUR"
569+ # norepopkg+=("${_pkg}")
570+ # fi
571+ # done
556572
557573 # Create a list of packages to be finally installed as packages.list directly under the working directory.
558574 echo -e " # The list of packages that is installed in live cd.\n#\n" > " ${build_dir} /packages.list"
559- printf " %s\n" " ${_pkglist [@]} " >> " ${build_dir} /packages.list"
575+ printf " %s\n" " ${_pkglist_install [@]} " >> " ${build_dir} /packages.list"
560576
561577 # Install packages on airootfs
562- _pacstrap " ${_pkglist [@]} "
578+ _pacstrap " ${_pkglist_install [@]} "
563579
564580 return 0
565581}
566582
567583make_packages_aur () {
568584 readarray -t _pkglist_aur < <( " ${tools_dir} /pkglist.sh" --aur " ${pkglist_args[@]} " )
585+ _pkglist_aur=(" ${_pkglist_aur[@]} " " ${norepopkg[@]} " )
569586
570587 # Create a list of packages to be finally installed as packages.list directly under the working directory.
571588 echo -e " \n# AUR packages.\n#\n" >> " ${build_dir} /packages.list"
@@ -666,7 +683,7 @@ make_customize_airootfs() {
666683 # Create script
667684 for _script in " ${_script_list[@]} " ; do
668685 if [[ -f " ${_script} " ]]; then
669- echo -e " \n $( cat " ${_script} " ) " >> " ${airootfs_dir} /${_main_script} "
686+ ( echo && cat " ${_script} " ) >> " ${airootfs_dir} /${_main_script} "
670687 remove " ${_script} "
671688 else
672689 msg_debug " ${_script} was not found."
0 commit comments