mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 03:50:37 +02:00
name $2 use_binfmt
This commit is contained in:
parent
e1f444cd40
commit
1da02d1f19
3 changed files with 11 additions and 11 deletions
|
@ -26,8 +26,8 @@ fi
|
|||
if [[ "${_RUNNING_ARCH}" == "x86_64" ]]; then
|
||||
_pacman_chroot "${1}" "${_ARCHBOOT_AARCH64_CHROOT_PUBLIC}" "${_PACMAN_AARCH64_CHROOT}" || exit 1
|
||||
_create_pacman_conf "${1}" "use_container_config"
|
||||
_install_base_packages "${1}" other || exit 1
|
||||
_install_archboot "${1}" other || exit 1
|
||||
_install_base_packages "${1}" "use_binfmt" || exit 1
|
||||
_install_archboot "${1}" "use_binfmt" || exit 1
|
||||
_fix_groups "${1}"
|
||||
_clean_mkinitcpio "${1}"
|
||||
_clean_cache "${1}"
|
||||
|
|
|
@ -26,8 +26,8 @@ fi
|
|||
if [[ "${_RUNNING_ARCH}" == "x86_64" ]]; then
|
||||
_pacman_chroot "${1}" "${_ARCHBOOT_RISCV64_CHROOT_PUBLIC}" "${_PACMAN_RISCV64_CHROOT}" || exit 1
|
||||
_create_pacman_conf "${1}" "use_container_config"
|
||||
_install_base_packages "${1}" other || exit 1
|
||||
_install_archboot "${1}" other || exit 1
|
||||
_install_base_packages "${1}" "use_binfmt" || exit 1
|
||||
_install_archboot "${1}" "use_binfmt" || exit 1
|
||||
_fix_groups "${1}"
|
||||
_clean_mkinitcpio "${1}"
|
||||
_clean_cache "${1}"
|
||||
|
|
|
@ -143,21 +143,21 @@ _umount_special() {
|
|||
}
|
||||
|
||||
_pacman_parameters() {
|
||||
if [[ -z "${2}" ]]; then
|
||||
_SYSTEMD=""
|
||||
_PACMAN="pacman --root "${1}""
|
||||
_PACMAN_CACHEDIR="--cachedir "${_CACHEDIR}""
|
||||
else
|
||||
if [[ "${2}" == "use_binfmt" ]]; then
|
||||
_SYSTEMD="systemd-nspawn -q -D "${1}""
|
||||
_PACMAN="pacman"
|
||||
_PACMAN_CACHEDIR=""
|
||||
else
|
||||
_SYSTEMD=""
|
||||
_PACMAN="pacman --root "${1}""
|
||||
_PACMAN_CACHEDIR="--cachedir "${_CACHEDIR}""
|
||||
fi
|
||||
}
|
||||
|
||||
_install_base_packages() {
|
||||
_PACMAN_COMMON="${_PACKAGES} --config ${_PACMAN_CONF} --ignore systemd-resolvconf --noconfirm"
|
||||
_pacman_parameters "${1}" "${2}"
|
||||
if ! [[ -z "${2}" ]]; then
|
||||
if [[ "${2}" == "use_binfmt" ]]; then
|
||||
[[ -d "${1}"/blankdb ]] || mkdir "${1}"/blankdb
|
||||
echo "Downloading ${_PACKAGES} to ${1} ..."
|
||||
${_SYSTEMD} ${_PACMAN} -Syw ${_PACMAN_COMMON} --dbpath /blankdb >/dev/null 2>&1 || exit 1
|
||||
|
@ -169,7 +169,7 @@ _install_base_packages() {
|
|||
_install_archboot() {
|
||||
_PACMAN_COMMON="${_ARCHBOOT} --config "${_PACMAN_CONF}" --ignore systemd-resolvconf --noconfirm"
|
||||
_pacman_parameters "${1}" "${2}"
|
||||
if [[ -z "${2}" ]]; then
|
||||
if [[ "${2}" ]]; then
|
||||
_PACMAN_DB="--dbpath "${1}"/blankdb"
|
||||
# riscv64 need does not support local image at the moment
|
||||
[[ "${_RUNNING_ARCH}" == "riscv64" ]] && _GRAPHICAL_PACKAGES=""
|
||||
|
|
Loading…
Reference in a new issue