S no-opening-message opt_no_opening_message no yes
eof
}
+
+# ============= Regularize the option value =============
+options_regularize ()
+{
+ opt_packages_dir=`fs_global_path "$opt_packages_dir"`
+ opt_invalidate_mount_privilege=no
+}
case $COMMAND_MODE in
clean )
database_maintain_clean
- message_echo "Done"
+ [ $opt_no_opening_message = yes ] || message_echo "Done"
exit
;;
destroy )
database_maintain_destroy
- message_echo "Done"
+ [ $opt_no_opening_message = yes ] || message_echo "Done"
exit
;;
unmount )
fs_build_chroot
fs_mount
temp_reset_termination_messages_common
- message_echo "Done"
+ [ $opt_no_opening_message = yes ] || message_echo "Done"
exit
;;
enter )
fs_build_chroot
fs_mount
command_do_update_host_files
- message_echo "Done"
+ [ $opt_no_opening_message = yes ] || message_echo "Done"
exit
;;
esac
PROGRAM_DEPENDS='UPDATE_HOST'
_program_exec_and_record_completion__operation ()
{
+ local storedir
message_section_title "Extract the upgrade archive"
- (
- cd "$opt_basedir"/store
- rm -rf work
- mkdir work
- tar xzf portsreinstall-upgrade.tar.gz -C work
- )
+ storedir=$opt_basedir/store
+ rm -rf "$storedir/work"
+ mkdir "$storedir/work"
+ tar xzf "$storedir/portsreinstall-upgrade.tar.gz" -C "$storedir/work"
+ message_echo
}
program_exec_and_record_completion EXTRACT_SCRIPT_ARCHIVE
PROGRAM_DEPENDS='EXTRACT_SCRIPT_ARCHIVE'
_program_exec_and_record_completion__operation ()
{
+ local opt_quiet
message_section_title "Update the packages at the host environment"
- (
- cd "$opt_basedir"/store
- opt_quiet=
- [ $opt_batch_mode = yes ] && opt_quiet='-a '
- work/portsreinstall-upgrade -S clean
- work/portsreinstall-upgrade -S $opt_quiet -P "${PACKAGES}/${PKGREPOSITORYSUBDIR}"
- )
+ opt_quiet=
+ [ $opt_batch_mode = yes ] && opt_quiet='-a '
+ $opt_basedir/store/work/portsreinstall-upgrade -S clean
+ $opt_basedir/store/work/portsreinstall-upgrade -S $opt_quiet -P "${PACKAGES}/${PKGREPOSITORYSUBDIR}"
}
program_exec_and_record_completion UPGRADE_HOST
}
# ============= Notify that option settings are reset =============
command_exec_without_pkgtools__notify_reset_options ()
{
+ [ $opt_no_opening_message = yes ] && return
message_echo "NOTE: Option settings are ignored (because of no effect) and reset."
}
install -m 444 "${MYPREFIX}/man/man8/${PROGRAM}-upgrade.8.gz" "$dstdir/man/man8"
tar czf "$dstdir.tar.gz" -C "$dstdir" .
touch "$dstdir/complete"
- message_echo
}
program_exec_and_record_completion COMMAND_PACKUPGRADE_PACK
}
fi
cp "$dstdir.tar.gz" "${COMMAND_PACKUPGRADE_SAVEPATH}"
message_echo "INFO: The cropped archive is saved as [${COMMAND_PACKUPGRADE_SAVEPATH}]."
+ message_echo
}
# ============= Operation of make command =============
MYVERSION=4.1.0
COMPATIBLE_VERSIONS='^(4\.[1]\.[0-9])$'
# Template for development versions
- MYVERSION=4.0.0+toward_4.1.0_20180911205455
+ MYVERSION=4.0.0+toward_4.1.0_20180912000219
COMPATIBLE_VERSIONS='^(4\.[0-1]\.[0-9]]|4\.[0]\.[0]+(|\+toward_4\.[0-1]\.[0-9]+_[0-9]+))$'
}
{
local opt_del opt_quit dev_out dev_err
opt_del=
- [ $no_exec_inst_script = yes ] && opt_del='-D'
+ [ $opt_no_exec_inst_script = yes ] && opt_del='-D'
opt_quit=
dev_out=/dev/stdout
dev_err=/dev/stderr
rm -rf "${TMPDIR}/pkg_add_f"
mkdir -p "${TMPDIR}/pkg_add_f"
opt_add=
- [ $no_exec_inst_script = yes ] && opt_add='-I'
+ [ $opt_no_exec_inst_script = yes ] && opt_add='-I'
opt_quit=
dev_out=/dev/stdout
dev_err=/dev/stderr
rm -rf "${TMPDIR}/pkg_inst_remote"
mkdir -p "${TMPDIR}/pkg_inst_remote"
opt_add=
- [ $no_exec_inst_script = yes ] && opt_add='-I'
+ [ $opt_no_exec_inst_script = yes ] && opt_add='-I'
opt_quit=
dev_out=/dev/stdout
dev_err=/dev/stderr
rm -rf "${TMPDIR}/pkg_inst_remote_wild"
mkdir -p "${TMPDIR}/pkg_inst_remote_wild"
opt_add=
- [ $no_exec_inst_script = yes ] && opt_add='-I'
+ [ $opt_no_exec_inst_script = yes ] && opt_add='-I'
dev_out=/dev/stdout
dev_err=/dev/stderr
if [ $opt_batch_mode = yes ]
{
local opt_del dev_out dev_err
opt_del=
- [ $no_exec_inst_script = yes ] && opt_del='-D'
+ [ $opt_no_exec_inst_script = yes ] && opt_del='-D'
dev_out=/dev/stdout
dev_err=/dev/stderr
if [ $opt_batch_mode = yes ]
mkdir -p "${TMPDIR}/pkg_add_f"
ln -s "$@" "${TMPDIR}/pkg_add_f"
opt_add=
- [ $no_exec_inst_script = yes ] && opt_add='-I'
+ [ $opt_no_exec_inst_script = yes ] && opt_add='-I'
dev_out=/dev/stdout
dev_err=/dev/stderr
if [ $opt_batch_mode = yes ]
mkdir -p "${TMPDIR}/pkg_add_f"
ln -s "$@" "${TMPDIR}/pkg_add_f"
opt_add=
- [ $no_exec_inst_script = yes ] && opt_add='-I'
+ [ $opt_no_exec_inst_script = yes ] && opt_add='-I'
dev_out=/dev/stdout
dev_err=/dev/stderr
if [ $opt_batch_mode = yes ]
mkdir -p "${TMPDIR}/pkg_inst_remote"
ln -s "$@" "${TMPDIR}/pkg_add_f"
opt_add=
- [ $no_exec_inst_script = yes ] && opt_add='-I'
+ [ $opt_no_exec_inst_script = yes ] && opt_add='-I'
dev_out=/dev/stdout
dev_err=/dev/stderr
if [ $opt_batch_mode = yes ]
force )
message_echo "INFO: The temporary database is tried to be cleaned up without checking the privilege."
database_maintain_clean_all
- message_echo "Done"
+ [ $opt_no_opening_message = yes ] || message_echo "Done"
exit
;;
esac
COMMAND_SHIFT=$(($num_args_init - $#))
}
-# ============= Notify that option settings are reset =============
-command_exec_without_pkgtools__notify_reset_options ()
-{
- message_echo "NOTE: Option settings are ignored (because of no effect) and reset."
-}
-
# ============= Execute command operations which do not need package tools =============
command_all_exec_without_pkgtools ()
{
database_maintain_load "$COMMAND_LOAD_FILE"
;;
esac
- message_echo "Done"
+ [ $opt_no_opening_message = yes ] || message_echo "Done"
exit
;;
esac
arcfile=`realpath "$COMMAND_SAVE_DIR"`/${APPNAME}_`date +%Y%m%d_%H%M%S`.tar.gz
message_echo "Starting to save the temporary database as [$arcfile]..."
database_maintain_save "$arcfile"
- message_echo "Done"
+ [ $opt_no_opening_message = yes ] || message_echo "Done"
exit
;;
glob )
command_pkgs_packupgrade
;;
esac
- message_echo "Done"
+ [ $opt_no_opening_message = yes ] || message_echo "Done"
exit
;;
redo )
message_echo "Starting to reset the temporary database by preserving the initial snapshot of installed packages..."
if [ ! -d "${DBDIR}" ]
then
- message_echo "INFO: No temporary database is built yet."
+ [ $opt_no_opening_message = yes ] || message_echo "INFO: No temporary database is built yet."
else
database_maintain_reset "$COMMAND_OPERATION"
- message_echo "INFO: Option settings and taboo/freeze/need/noneed lists are preserved."
+ [ $opt_no_opening_message = yes ] || message_echo "INFO: Option settings and taboo/freeze/need/noneed lists are preserved."
fi
- message_echo "Done"
+ [ $opt_no_opening_message = yes ] || message_echo "Done"
exit
;;
options )
f disallow-force-continuation-for-looped-dependency opt_disallow_force_continuation_for_looped_dependency no yes
j delete-then-reinstall opt_delete_then_reinstall no yes
F fetch-only opt_fetch_only no yes
-x no-exec-inst-script no_exec_inst_script no yes
+x no-exec-inst-script opt_no_exec_inst_script no yes
eof
}
case $COMMAND_MODE in
clean )
command_exec_without_pkgtools__notify_reset_options
- message_echo "Starting to clean up the temporary database..."
+ [ $opt_no_opening_message = yes ] || message_echo "Starting to clean up the temporary database..."
database_maintain_clean_all
- message_echo "Done"
+ [ $opt_no_opening_message = yes ] || message_echo "Done"
exit
;;
esac
then
datetime_init=`expr "$timestamp_init" : '[^:]*:\([0-9]*\)' || :`
datetime_fin=`expr "$timestamp_fin" : '[^:]*:\([0-9]*\)' || :`
- [ -n "$datetime_init" -a -n "$datetime_fin" -a "$datetime_init" -ge "$datetime_fin" ] && break
+ [ -n "$datetime_init" -a -n "$datetime_fin" -a "$datetime_init" -ge "$datetime_fin" ] && return
fi
fi
case $cmd in
options_regularize ()
{
opt_packages_dir=`fs_global_path "$opt_packages_dir"`
+ opt_no_exec_inst_script=no
}
main_parse_options_arguments "$@"
shift "${OPTIONS_SHIFT}"
shift "${COMMAND_SHIFT}"
-opt_invalidate_mount_privilege=no
# ========================================================
# ================== SET UP OF PARAMETERS ==================