forked from mirrored-repos/manjaro-tools
buildiso: fixes; todo mhwd repo
This commit is contained in:
parent
43cb466d53
commit
be1b965c94
3 changed files with 13 additions and 15 deletions
|
@ -19,7 +19,6 @@ SYSCONFDIR='@sysconfdir@'
|
||||||
|
|
||||||
import ${LIBDIR}/util.sh
|
import ${LIBDIR}/util.sh
|
||||||
import ${LIBDIR}/util-iso.sh
|
import ${LIBDIR}/util-iso.sh
|
||||||
import ${LIBDIR}/util-profile.sh
|
|
||||||
|
|
||||||
prepare_build(){
|
prepare_build(){
|
||||||
timer_start=$(get_timer)
|
timer_start=$(get_timer)
|
||||||
|
|
|
@ -132,10 +132,10 @@ configure_system(){
|
||||||
|
|
||||||
# Prevent some services to be started in the livecd
|
# Prevent some services to be started in the livecd
|
||||||
echo 'File created by manjaro-tools. See systemd-update-done.service(8).' \
|
echo 'File created by manjaro-tools. See systemd-update-done.service(8).' \
|
||||||
| tee "${path}/etc/.updated" >"${path}/var/.updated"
|
| tee "${mnt}/etc/.updated" >"${mnt}/var/.updated"
|
||||||
|
|
||||||
msg2 "Disable systemd-gpt-auto-generator"
|
msg2 "Disable systemd-gpt-auto-generator"
|
||||||
ln -sf /dev/null "${path}/usr/lib/systemd/system-generators/systemd-gpt-auto-generator"
|
ln -sf /dev/null "${mnt}/usr/lib/systemd/system-generators/systemd-gpt-auto-generator"
|
||||||
;;
|
;;
|
||||||
'openrc')
|
'openrc')
|
||||||
configure_logind "$mnt" "elogind"
|
configure_logind "$mnt" "elogind"
|
||||||
|
@ -209,11 +209,9 @@ clean_up_image(){
|
||||||
|
|
||||||
copy_from_cache(){
|
copy_from_cache(){
|
||||||
local list="${tmp_dir}"/mhwd-cache.list
|
local list="${tmp_dir}"/mhwd-cache.list
|
||||||
local mnt="$1" repo="$2"; shift
|
local mnt="$1" repo="$2"
|
||||||
chroot-run "$mnt" \
|
chroot-run "$mnt" pacman -v -Syw --noconfirm "$@" || return 1
|
||||||
pacman -v -Syw --noconfirm "$@" || return 1
|
chroot-run "$mnt" pacman -v -Sp --noconfirm "$@" > "$list"
|
||||||
chroot-run "$mnt" \
|
|
||||||
pacman -v -Sp --noconfirm "$@" > "$list"
|
|
||||||
sed -ni '/.pkg.tar.xz/p' "$list"
|
sed -ni '/.pkg.tar.xz/p' "$list"
|
||||||
sed -i "s/.*\///" "$list"
|
sed -i "s/.*\///" "$list"
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@ import ${LIBDIR}/util-iso-chroot.sh
|
||||||
import ${LIBDIR}/util-iso-grub.sh
|
import ${LIBDIR}/util-iso-grub.sh
|
||||||
import ${LIBDIR}/util-yaml.sh
|
import ${LIBDIR}/util-yaml.sh
|
||||||
import ${LIBDIR}/util-iso-mount.sh
|
import ${LIBDIR}/util-iso-mount.sh
|
||||||
|
import ${LIBDIR}/util-profile.sh
|
||||||
|
|
||||||
error_function() {
|
error_function() {
|
||||||
if [[ -p $logpipe ]]; then
|
if [[ -p $logpipe ]]; then
|
||||||
|
@ -318,22 +319,22 @@ make_image_live() {
|
||||||
make_image_mhwd() {
|
make_image_mhwd() {
|
||||||
if [[ ! -e ${work_dir}/mhwdfs.lock ]]; then
|
if [[ ! -e ${work_dir}/mhwdfs.lock ]]; then
|
||||||
msg "Prepare [drivers repository] (mhwdfs)"
|
msg "Prepare [drivers repository] (mhwdfs)"
|
||||||
local mhwdfs="${work_dir}/mhwdfs" mhwd_repo="/opt/pkg"
|
local mhwdfs="${work_dir}/mhwdfs" repo="/opt/pkg"
|
||||||
|
|
||||||
prepare_dir "${mhwdfs}${mhwd_repo}"
|
prepare_dir "${mhwdfs}${repo}"
|
||||||
|
|
||||||
mount_fs "${mhwdfs}" "${work_dir}" "${desktop_list}"
|
mount_fs "${mhwdfs}" "${work_dir}" "${desktop_list}"
|
||||||
|
|
||||||
copy_from_cache "${mhwdfs}" "${mhwd_repo}" "${packages[@]}"
|
copy_from_cache "${mhwdfs}" "${repo}" "${packages[@]}"
|
||||||
|
|
||||||
if [[ -n "${packages_cleanup[@]}" ]]; then
|
if [[ -n "${packages_cleanup[@]}" ]]; then
|
||||||
for pkg in ${packages_cleanup[@]}; do
|
for pkg in ${packages_cleanup[@]}; do
|
||||||
rm ${mhwdfs}${mhwd_repo}/${pkg}
|
rm ${mhwdfs}${repo}/${pkg}
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
make_repo "${mhwdfs}" "${mhwd_repo}"
|
make_repo "${mhwdfs}" "${repo}"
|
||||||
configure_mhwd_drivers "${mhwdfs}" "${mhwd_repo}"
|
configure_mhwd_drivers "${mhwdfs}" "${repo}"
|
||||||
|
|
||||||
umount_fs
|
umount_fs
|
||||||
clean_up_image "${mhwdfs}"
|
clean_up_image "${mhwdfs}"
|
||||||
|
@ -466,7 +467,7 @@ make_profile(){
|
||||||
|
|
||||||
local unused_arch='i686'
|
local unused_arch='i686'
|
||||||
if [[ ${target_arch} == 'i686' ]];then
|
if [[ ${target_arch} == 'i686' ]];then
|
||||||
unused_arch='x86_64' ;;
|
unused_arch='x86_64'
|
||||||
fi
|
fi
|
||||||
if [[ -d "${chroots_iso}/${profile}/${unused_arch}" ]];then
|
if [[ -d "${chroots_iso}/${profile}/${unused_arch}" ]];then
|
||||||
chroot_clean "${chroots_iso}/${profile}/${unused_arch}"
|
chroot_clean "${chroots_iso}/${profile}/${unused_arch}"
|
||||||
|
|
Loading…
Reference in a new issue