forked from mirrored-repos/manjaro-tools
buildiso: some tweaks #196
This commit is contained in:
parent
024a4fb7d0
commit
a7af8cfb35
3 changed files with 10 additions and 15 deletions
|
@ -94,7 +94,7 @@ display_settings(){
|
||||||
msg2 "iso_checksum: %s" "${iso_checksum}"
|
msg2 "iso_checksum: %s" "${iso_checksum}"
|
||||||
msg2 "use_overlayfs: %s" "${use_overlayfs}"
|
msg2 "use_overlayfs: %s" "${use_overlayfs}"
|
||||||
${verbose} && msg2 "iso_fs: %s" "${iso_fs}"
|
${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:"
|
msg "BUILD QUEUE:"
|
||||||
run show_profile "${buildset_iso}"
|
run show_profile "${buildset_iso}"
|
||||||
|
@ -186,6 +186,8 @@ eval_buildset "${sets_dir_iso}" "${buildset_iso}"
|
||||||
|
|
||||||
import ${LIBDIR}/util-iso.sh
|
import ${LIBDIR}/util-iso.sh
|
||||||
|
|
||||||
|
set_pacman_conf
|
||||||
|
|
||||||
check_requirements
|
check_requirements
|
||||||
|
|
||||||
${pretend} && display_settings && exit 1
|
${pretend} && display_settings && exit 1
|
||||||
|
|
|
@ -185,6 +185,13 @@ gen_iso_fn(){
|
||||||
echo $name
|
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)
|
# Base installation (root-image)
|
||||||
make_image_root() {
|
make_image_root() {
|
||||||
if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then
|
if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then
|
||||||
|
@ -197,7 +204,6 @@ make_image_root() {
|
||||||
pacman -Qr "${path}" > "${path}/root-image-pkgs.txt"
|
pacman -Qr "${path}" > "${path}/root-image-pkgs.txt"
|
||||||
copy_overlay "${profile_dir}/root-overlay" "${path}"
|
copy_overlay "${profile_dir}/root-overlay" "${path}"
|
||||||
configure_root_image "${path}"
|
configure_root_image "${path}"
|
||||||
# ${is_custom_pac_conf} && clean_pacman_conf "${path}"
|
|
||||||
|
|
||||||
reset_pac_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
|
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}"
|
[[ -e ${profile_dir}/${profile}-overlay ]] && copy_overlay "${profile_dir}/${profile}-overlay" "${path}"
|
||||||
configure_custom_image "${path}"
|
configure_custom_image "${path}"
|
||||||
# ${is_custom_pac_conf} && clean_pacman_conf "${path}"
|
|
||||||
|
|
||||||
reset_pac_conf "${path}"
|
reset_pac_conf "${path}"
|
||||||
|
|
||||||
|
@ -253,7 +258,6 @@ make_image_live() {
|
||||||
pacman -Qr "${path}" > "${path}/live-image-pkgs.txt"
|
pacman -Qr "${path}" > "${path}/live-image-pkgs.txt"
|
||||||
copy_overlay "${profile_dir}/live-overlay" "${path}"
|
copy_overlay "${profile_dir}/live-overlay" "${path}"
|
||||||
configure_live_image "${path}"
|
configure_live_image "${path}"
|
||||||
# ${is_custom_pac_conf} && clean_pacman_conf "${path}"
|
|
||||||
|
|
||||||
reset_pac_conf "${path}"
|
reset_pac_conf "${path}"
|
||||||
|
|
||||||
|
@ -275,8 +279,6 @@ make_image_mhwd() {
|
||||||
|
|
||||||
mount_image_select "${path}"
|
mount_image_select "${path}"
|
||||||
|
|
||||||
# ${is_custom_pac_conf} && clean_pacman_conf "${path}"
|
|
||||||
|
|
||||||
reset_pac_conf "${path}"
|
reset_pac_conf "${path}"
|
||||||
|
|
||||||
download_to_cache "${path}" "${packages}"
|
download_to_cache "${path}" "${packages}"
|
||||||
|
@ -662,8 +664,6 @@ load_profile(){
|
||||||
|
|
||||||
load_profile_config "$conf"
|
load_profile_config "$conf"
|
||||||
|
|
||||||
set_pacman_conf
|
|
||||||
|
|
||||||
iso_file=$(gen_iso_fn).iso
|
iso_file=$(gen_iso_fn).iso
|
||||||
|
|
||||||
mkchroot_args+=(-C ${pacman_conf} -S ${mirrors_conf} -B "${build_mirror}/${branch}" -K)
|
mkchroot_args+=(-C ${pacman_conf} -S ${mirrors_conf} -B "${build_mirror}/${branch}" -K)
|
||||||
|
|
|
@ -72,13 +72,6 @@
|
||||||
# msg "Done cleaning [%s/etc/pacman.conf]" "$1"
|
# 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(){
|
read_set(){
|
||||||
local _space="s| ||g" \
|
local _space="s| ||g" \
|
||||||
_clean=':a;N;$!ba;s/\n/ /g' \
|
_clean=':a;N;$!ba;s/\n/ /g' \
|
||||||
|
|
Loading…
Reference in a new issue