buildiso: fixes; todo mhwd repo

This commit is contained in:
udeved 2017-06-08 11:15:37 +02:00
parent 43cb466d53
commit be1b965c94
3 changed files with 13 additions and 15 deletions

View file

@ -19,7 +19,6 @@ SYSCONFDIR='@sysconfdir@'
import ${LIBDIR}/util.sh
import ${LIBDIR}/util-iso.sh
import ${LIBDIR}/util-profile.sh
prepare_build(){
timer_start=$(get_timer)

View file

@ -132,10 +132,10 @@ configure_system(){
# Prevent some services to be started in the livecd
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"
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')
configure_logind "$mnt" "elogind"
@ -209,11 +209,9 @@ clean_up_image(){
copy_from_cache(){
local list="${tmp_dir}"/mhwd-cache.list
local mnt="$1" repo="$2"; shift
chroot-run "$mnt" \
pacman -v -Syw --noconfirm "$@" || return 1
chroot-run "$mnt" \
pacman -v -Sp --noconfirm "$@" > "$list"
local mnt="$1" repo="$2"
chroot-run "$mnt" pacman -v -Syw --noconfirm "$@" || return 1
chroot-run "$mnt" pacman -v -Sp --noconfirm "$@" > "$list"
sed -ni '/.pkg.tar.xz/p' "$list"
sed -i "s/.*\///" "$list"

View file

@ -14,6 +14,7 @@ import ${LIBDIR}/util-iso-chroot.sh
import ${LIBDIR}/util-iso-grub.sh
import ${LIBDIR}/util-yaml.sh
import ${LIBDIR}/util-iso-mount.sh
import ${LIBDIR}/util-profile.sh
error_function() {
if [[ -p $logpipe ]]; then
@ -318,22 +319,22 @@ make_image_live() {
make_image_mhwd() {
if [[ ! -e ${work_dir}/mhwdfs.lock ]]; then
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}"
copy_from_cache "${mhwdfs}" "${mhwd_repo}" "${packages[@]}"
copy_from_cache "${mhwdfs}" "${repo}" "${packages[@]}"
if [[ -n "${packages_cleanup[@]}" ]]; then
for pkg in ${packages_cleanup[@]}; do
rm ${mhwdfs}${mhwd_repo}/${pkg}
rm ${mhwdfs}${repo}/${pkg}
done
fi
make_repo "${mhwdfs}" "${mhwd_repo}"
configure_mhwd_drivers "${mhwdfs}" "${mhwd_repo}"
make_repo "${mhwdfs}" "${repo}"
configure_mhwd_drivers "${mhwdfs}" "${repo}"
umount_fs
clean_up_image "${mhwdfs}"
@ -466,7 +467,7 @@ make_profile(){
local unused_arch='i686'
if [[ ${target_arch} == 'i686' ]];then
unused_arch='x86_64' ;;
unused_arch='x86_64'
fi
if [[ -d "${chroots_iso}/${profile}/${unused_arch}" ]];then
chroot_clean "${chroots_iso}/${profile}/${unused_arch}"