diff --git a/bin/buildiso.in b/bin/buildiso.in index 48eba95..03b2004 100755 --- a/bin/buildiso.in +++ b/bin/buildiso.in @@ -94,7 +94,7 @@ display_settings(){ msg2 "iso_checksum: %s" "${iso_checksum}" msg2 "use_overlayfs: %s" "${use_overlayfs}" ${verbose} && msg2 "iso_fs: %s" "${iso_fs}" - msg2 "is_custom_pac_conf: %s" "${is_custom_pac_conf}" + msg2 "pacman_conf: %s" "${pacman_conf}" msg "BUILD QUEUE:" run show_profile "${buildset_iso}" @@ -186,6 +186,8 @@ eval_buildset "${sets_dir_iso}" "${buildset_iso}" import ${LIBDIR}/util-iso.sh +set_pacman_conf + check_requirements ${pretend} && display_settings && exit 1 diff --git a/lib/util-iso.sh b/lib/util-iso.sh index 77d32b3..005e403 100644 --- a/lib/util-iso.sh +++ b/lib/util-iso.sh @@ -185,6 +185,13 @@ gen_iso_fn(){ echo $name } +reset_pac_conf(){ + info "Restoring [%s/etc/pacman.conf] ..." "$1" + sed -e 's|^.*HoldPkg.*|HoldPkg = pacman glibc manjaro-system|' \ + -e "s|^.*#CheckSpace|CheckSpace|" \ + -i "$1/etc/pacman.conf" +} + # Base installation (root-image) make_image_root() { if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then @@ -197,7 +204,6 @@ make_image_root() { pacman -Qr "${path}" > "${path}/root-image-pkgs.txt" copy_overlay "${profile_dir}/root-overlay" "${path}" configure_root_image "${path}" -# ${is_custom_pac_conf} && clean_pacman_conf "${path}" reset_pac_conf "${path}" @@ -221,7 +227,6 @@ make_image_custom() { cp "${path}/${profile}-image-pkgs.txt" ${iso_dir}/$(gen_iso_fn)-pkgs.txt [[ -e ${profile_dir}/${profile}-overlay ]] && copy_overlay "${profile_dir}/${profile}-overlay" "${path}" configure_custom_image "${path}" -# ${is_custom_pac_conf} && clean_pacman_conf "${path}" reset_pac_conf "${path}" @@ -253,7 +258,6 @@ make_image_live() { pacman -Qr "${path}" > "${path}/live-image-pkgs.txt" copy_overlay "${profile_dir}/live-overlay" "${path}" configure_live_image "${path}" -# ${is_custom_pac_conf} && clean_pacman_conf "${path}" reset_pac_conf "${path}" @@ -275,8 +279,6 @@ make_image_mhwd() { mount_image_select "${path}" -# ${is_custom_pac_conf} && clean_pacman_conf "${path}" - reset_pac_conf "${path}" download_to_cache "${path}" "${packages}" @@ -662,8 +664,6 @@ load_profile(){ load_profile_config "$conf" - set_pacman_conf - iso_file=$(gen_iso_fn).iso mkchroot_args+=(-C ${pacman_conf} -S ${mirrors_conf} -B "${build_mirror}/${branch}" -K) diff --git a/lib/util.sh b/lib/util.sh index a4e34d6..3806415 100644 --- a/lib/util.sh +++ b/lib/util.sh @@ -72,13 +72,6 @@ # msg "Done cleaning [%s/etc/pacman.conf]" "$1" # } -reset_pac_conf(){ - info "Restoring [%s/etc/pacman.conf] ..." "$1" - sed -e 's|^.*HoldPkg.*|HoldPkg = pacman glibc manjaro-system|' \ - -e "s|^.*#CheckSpace|CheckSpace|" \ - -i "$1/etc/pacman.conf" -} - read_set(){ local _space="s| ||g" \ _clean=':a;N;$!ba;s/\n/ /g' \