@@ -22,6 +22,7 @@ module_dir="${script_path}/modules"
2222customized_username=false
2323customized_password=false
2424customized_kernel=false
25+ pkglist_args=" "
2526DEFAULT_ARGUMENT=" "
2627alteriso_version=" 3.1"
2728
@@ -514,6 +515,14 @@ prepare_build() {
514515 msg_error " ${channel_name} channel does not support current architecture (${arch} )." " 1"
515516 fi
516517
518+ # Set argument of pkglist.sh
519+ pkglist_args=(" -a" " ${arch} " " -k" " ${kernel} " " -c" " ${channel_dir} " " -l" " ${locale_name} " )
520+ if [[ " ${boot_splash} " = true ]]; then pkglist_args+=(" -b" ); fi
521+ if [[ " ${debug} " = true ]]; then pkglist_args+=(" -d" ); fi
522+ if [[ " ${memtest86} " = true ]]; then pkglist_args+=(" -m" ); fi
523+ if (( "${# additional_exclude_pkg[@]} " >= 1 )) ; then pkglist_args+=(" -e" " ${additional_exclude_pkg[*]} " ); fi
524+ pkglist_args+=(" ${modules[*]} " )
525+
517526 # Unmount
518527 umount_chroot
519528}
@@ -553,15 +562,7 @@ make_basefs() {
553562
554563# Additional packages (airootfs)
555564make_packages_repo () {
556- local _pkg _pkglist_args=" -a ${arch} -k ${kernel} -c ${channel_dir} -l ${locale_name} "
557-
558- # get pkglist
559- if [[ " ${boot_splash} " = true ]]; then _pkglist_args+=" -b" ; fi
560- if [[ " ${debug} " = true ]]; then _pkglist_args+=" -d" ; fi
561- if [[ " ${memtest86} " = true ]]; then _pkglist_args+=" -m" ; fi
562- _pkglist_args+=" ${modules[*]} "
563-
564- local _pkglist=($( " ${tools_dir} /pkglist.sh" ${_pkglist_args} ) )
565+ local _pkglist=($( " ${tools_dir} /pkglist.sh" " ${pkglist_args[@]} " ) )
565566
566567 # Create a list of packages to be finally installed as packages.list directly under the working directory.
567568 echo -e " # The list of packages that is installed in live cd.\n#\n\n" > " ${work_dir} /packages.list"
@@ -572,20 +573,10 @@ make_packages_repo() {
572573}
573574
574575make_packages_aur () {
575- local _pkg _pkglist_args=" --aur -a ${arch} -k ${kernel} -c ${channel_dir} -l ${locale_name} "
576-
577- # get pkglist
578- # get pkglist
579- if [[ " ${boot_splash} " = true ]]; then _pkglist_args+=" -b" ; fi
580- if [[ " ${debug} " = true ]]; then _pkglist_args+=" -d" ; fi
581- if [[ " ${memtest86} " = true ]]; then _pkglist_args+=" -m" ; fi
582- _pkglist_args+=" ${modules[*]} "
583-
584- local _pkglist_aur=($( " ${tools_dir} /pkglist.sh" ${_pkglist_args} ) )
576+ local _pkglist_aur=($( " ${tools_dir} /pkglist.sh" --aur " ${pkglist_args[@]} " ) )
585577
586578 # Create a list of packages to be finally installed as packages.list directly under the working directory.
587579 echo -e " \n\n# AUR packages.\n#\n\n" >> " ${work_dir} /packages.list"
588- # for _pkg in ${_pkglist_aur[@]}; do echo ${_pkg} >> "${work_dir}/packages.list"; done
589580 printf " %s\n" " ${_pkglist_aur[@]} " >> " ${work_dir} /packages.list"
590581
591582 # prepare for yay
0 commit comments