add comments for a possible test scenario for old code

This commit is contained in:
udeved 2015-01-12 03:28:06 +01:00
parent 76196368ad
commit de53d47e66
3 changed files with 48 additions and 6 deletions

View file

@ -35,7 +35,7 @@ usage: ${0##*/} [options] root [packages...]
-h Print this help message
pacstrap installs packages to the specified new root directory. If no packages
basestrap installs packages to the specified new root directory. If no packages
are given, pacstrap defaults to the "base" group.
EOF
@ -104,6 +104,8 @@ fi
#lsof | grep $newroot
# kill chroot process if needed (TODO: check if needed at all)
# TODO: test if old manjaroiso code in mkiso produces also the umount error
# if not, comment out the pid kill
PREFIX="$newroot"
for ROOT in /proc/*/root; do
LINK=$(readlink $ROOT)

View file

@ -147,6 +147,47 @@ clean_up(){
find "${work_dir}/${IMAGE_FOLDER}/tmp" -mindepth 1 -delete &>/dev/null
}
### TODO: test if basestrap also produces the unmount error;
# if it doesn't, we drop mkchroot and create a file in basestrap chroot to acces it later with chroot-run
# this is then manjaroiso bahaviour
# usage: _pacman <packages>...
# _pacman ()
# {
# local ret
# mkdir -p "${work_dir}/${IMAGE_FOLDER}/var/lib/pacman"
# if "${QUIET}"; then
# basestrap -GMcd "${work_dir}/${IMAGE_FOLDER}" --config "$PACCONFIG" $* &> /dev/null
# ret=$?
# else
# basestrap -GMcd "${work_dir}/${IMAGE_FOLDER}" --config "$PACCONFIG" $*
# ret=$?
# fi
#
# if [ -e "${work_dir}/root-image/etc/locale.gen" ]; then
# cp ${work_dir}/root-image/etc/locale.gen ${work_dir}/root-image/etc/locale.gen.bak
# fi
#
# # Cleanup
# find "${work_dir}" -name *.pacnew -name *.pacsave -name *.pacorig -delete
#
# if [ $ret -ne 0 ]; then
# exit 1
# fi
# }
# command_create () {
# echo "====> Creating working directory: ${work_dir}"
# mkdir -p "${work_dir}/iso/${INSTALL_DIR}/${ARCH}"
# mkdir -p "${work_dir}/${IMAGE_FOLDER}/"
#
# if [ ! -z "${PKGLIST}" ]; then
# echo "====> Installing packages to '${work_dir}/${IMAGE_FOLDER}/'"
# _pacman "${PKGLIST}"
# clean_up
# fi
# }
_mkchroot(){
#local ret
if "${QUIET}"; then
@ -172,9 +213,7 @@ _mkchroot(){
command_create () {
mkdir -p "${work_dir}/iso/${INSTALL_DIR}/${ARCH}"
[[ -n "${PKGLIST}" ]] && _mkchroot "${PKGLIST}"
clean_up
[[ -n "${PKGLIST}" ]] && _mkchroot "${PKGLIST}" && clean_up
}
# _mksquash dirname

View file

@ -533,8 +533,9 @@ make_root_image() {
# configure_machine_id "${work_dir}/root-image"
pacman -Qr "${work_dir}/root-image" > "${work_dir}/root-image/root-image-pkgs.txt"
cp ${work_dir}/root-image/etc/locale.gen.bak ${work_dir}/root-image/etc/locale.gen
# TODO: we only need this if we use old manjaroiso coe in mkiso
# cp ${work_dir}/root-image/etc/locale.gen.bak ${work_dir}/root-image/etc/locale.gen
if [ -e ${work_dir}/root-image/boot/grub/grub.cfg ] ; then
rm ${work_dir}/root-image/boot/grub/grub.cfg