From 024a4fb7d022f49eae9933d488dd100b7bef1627 Mon Sep 17 00:00:00 2001 From: udeved Date: Fri, 20 May 2016 23:25:28 +0200 Subject: [PATCH] buildiso: redo custom repo support --- bin/buildiso.in | 2 +- lib/util-iso.sh | 21 +++++++++++---------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/bin/buildiso.in b/bin/buildiso.in index 0365425..48eba95 100755 --- a/bin/buildiso.in +++ b/bin/buildiso.in @@ -51,7 +51,6 @@ show_profile(){ msg2 "start_openrc_live: %s" "${start_openrc_live[*]}" msg2 "disable_openrc: %s" "${disable_openrc[*]}" fi -# msg2 "is_custom_pac_conf: %s" "${is_custom_pac_conf}" fi reset_profile } @@ -95,6 +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}" msg "BUILD QUEUE:" run show_profile "${buildset_iso}" diff --git a/lib/util-iso.sh b/lib/util-iso.sh index d7fb552..77d32b3 100644 --- a/lib/util-iso.sh +++ b/lib/util-iso.sh @@ -516,14 +516,17 @@ load_pkgs(){ fi } -check_custom_pacman_conf(){ -# if [[ -f ${profile_dir}/pacman-${pacman_conf_arch}.conf ]]; then -# pacman_conf="${profile_dir}/pacman-${pacman_conf_arch}.conf" -# is_custom_pac_conf=true -# else +set_pacman_conf(){ + if [[ -f ${USERCONFDIR}/user-repos.conf ]];then + local temp=/tmp/custom-pacman.conf + cat ${DATADIR}/pacman-${pacman_conf_arch}.conf > $temp + cat ${USERCONFDIR}/user-repos.conf >> $temp + pacman_conf=$temp + is_custom_pac_conf=true + else pacman_conf="${DATADIR}/pacman-${pacman_conf_arch}.conf" -# is_custom_pac_conf=false -# fi + is_custom_pac_conf=false + fi } check_profile(){ @@ -659,9 +662,7 @@ load_profile(){ load_profile_config "$conf" -# check_custom_pacman_conf - - pacman_conf="${DATADIR}/pacman-${pacman_conf_arch}.conf" + set_pacman_conf iso_file=$(gen_iso_fn).iso