OSDN Git Service

Some bug fiz related to the previously added new features.
authorMamoru Sakaue / MwGhennndo <glmwghennndo@users.sourceforge.jp>
Mon, 20 Aug 2018 16:19:24 +0000 (00:19 +0800)
committerMamoru Sakaue / MwGhennndo <glmwghennndo@users.sourceforge.jp>
Mon, 20 Aug 2018 16:19:24 +0000 (00:19 +0800)
 Changes to be committed:
modified:   bin/portsreinstall-chroot
modified:   lib/chroot/libcommand.sh
modified:   lib/chroot/libcommand_do.sh
modified:   lib/chroot/libmain.sh
modified:   lib/libcommand_do.sh
modified:   lib/libmain.sh
modified:   man/portsreinstall-chroot.8

bin/portsreinstall-chroot
lib/chroot/libcommand.sh
lib/chroot/libcommand_do.sh
lib/chroot/libmain.sh
lib/libcommand_do.sh
lib/libmain.sh
man/portsreinstall-chroot.8

index 02168ed..f4facbf 100755 (executable)
@@ -79,8 +79,7 @@ fs_safeguard_basedir "$opt_basedir"
 pkgsys_load_portsnap_conf
 main_setup_parameters "$@"
 
-fs_inspect_fs_privilege
-main_set_termination_messages_after_mount_fs
+main_inspect_fs_privilege
 
 main_operation_without_pkg_management_tools "$@"
 
index cb5e728..23a3aa0 100644 (file)
@@ -127,7 +127,8 @@ command_all_exec_main ()
                command_do_pre
                command_do_starter_portsnap
                command_do_starter_pkg
-               command_do_starter_init_resinst
+               command_do_starter_clean
+               command_do_main_init_resinst
                command_do_chroot_enter_if_incomplete
                command_do_post
                command_do_ending_process
index 3a8ab56..b99094d 100644 (file)
@@ -93,7 +93,8 @@ eof
 command_do_update_host_files ()
 {
        local dirpath filepath
-       message_echo "Updating the files affecting package installation (packages, distfiles, port options, ports/packages management tools configurations) of the host environment..."
+       message_section_title "Update the files affecting package installation of the host environment"
+       message_echo "INFO: targets are packages, distfiles, port options and ports/packages management tools configurations"
        for dirpath in "${DISTDIR}" "${PACKAGES}" "${PORT_DBDIR}"
        do
                (
@@ -123,7 +124,7 @@ command_do_update_host_files ()
                        rm -f $filepath
                fi
        done
-       :
+       message_echo
 }
 
 # ============= Ending process =============
@@ -219,16 +220,38 @@ command_do_starter_pkg ()
        program_exec_and_record_completion STARTER_GUEST_PKG_REPO
 }
 
-# ============= Starter process in the chroot environment: Initiate the reinstallation process =============
-command_do_starter_init_resinst ()
+# ============= Starter process in the chroot environment: Clean the temporary database =============
+command_do_starter_clean ()
 {
        local PROGRAM_DEPENDS
        PROGRAM_DEPENDS='STARTER_GUEST_PKG_REPO'
        _program_exec_and_record_completion__operation ()
        {
+               local opts
+               [ $opt_fullcourse = no ] && return
+               message_section_title "Full course starter: Clean the temporary database"
+               if [ $opt_batch_mode = no ]
+               then
+                       opts=
+               else
+                       opts='-q'
+               fi
+               chroot "$opt_basedir"/builder /usr/bin/env ${PROGRAM} $opts clean force
+               message_echo
+       }
+       program_exec_and_record_completion STARTER_GUEST_CLEAN
+}
+
+# ============= Main process in the chroot environment: Initiate the reinstallation process =============
+command_do_main_init_resinst ()
+{
+       local PROGRAM_DEPENDS
+       PROGRAM_DEPENDS='STARTER_GUEST_CLEAN'
+       _program_exec_and_record_completion__operation ()
+       {
                local exitstatus
                [ $opt_fullcourse = no ] && return
-               message_section_title "Full course starter: Initiate the reinstallation process"
+               message_section_title "Full course main: Initiate the reinstallation process"
                if [ $opt_batch_mode = no ]
                then
                        opts='-CGSYjqx'
@@ -313,7 +336,7 @@ command_do_chroot_pack_update ()
        PROGRAM_DEPENDS='UPGRADE_GUEST'
        _program_exec_and_record_completion__operation ()
        {
-               message_echo "Packing the upgrades..."
+               message_section_title "Pack the upgrades"
                [ $opt_batch_mode = yes ] && opt_quiet='-a '
                chroot "$opt_basedir"/builder /bin/csh -c "${PROGRAM} -S $opt_quiet packupgrade create && ${PROGRAM} -S $opt_quiet packupgrade crop /.${PROGRAM}"
        }
@@ -339,7 +362,7 @@ command_do_chroot_update_host_pkgs ()
        PROGRAM_DEPENDS='UPDATE_HOST'
        _program_exec_and_record_completion__operation ()
        {
-               message_echo "Extracting the upgrade archive..."
+               message_section_title "Extract the upgrade archive"
                (
                        cd "$opt_basedir"/store
                        rm -rf work
@@ -351,7 +374,7 @@ command_do_chroot_update_host_pkgs ()
        PROGRAM_DEPENDS='EXTRACT_SCRIPT_ARCHIVE'
        _program_exec_and_record_completion__operation ()
        {
-               message_echo "Updating the packages at the host environment..."
+               message_section_title "Update the packages at the host environment"
                (
                        cd "$opt_basedir"/store
                        opt_quiet=
index 2f04638..8757346 100644 (file)
@@ -8,8 +8,10 @@
 # ==============================================================================
 
 # ============= Set termination messages which should be shown after mounting file systems =============
-main_set_termination_messages_after_mount_fs ()
+main_inspect_fs_privilege ()
 {
+       fs_inspect_fs_privilege
+       message_echo
        temp_terminate_process ()
        {
                local errno
index b9d10db..c666b02 100644 (file)
@@ -1385,7 +1385,7 @@ command_do_main ()
                        
                        # Deinstallation of unused obsolete and leaf packages
                        command_do_deinstallation_of_unused_obsolete_and_leaf_packages
-               elif 
+               else
                        # Deinstallation of unused obsolete and leaf packages
                        command_do_deinstallation_of_unused_obsolete_and_leaf_packages
                        
index 4b24009..81bf918 100644 (file)
@@ -12,7 +12,7 @@ main_set_version ()
        MYVERSION=4.1.0
        COMPATIBLE_VERSIONS='^(4\.[1]\.[0-9])$'
        # Template for development versions
-       MYVERSION=4.0.0+toward_4.1.0_20180819211059
+       MYVERSION=4.0.0+toward_4.1.0_20180821001856
        COMPATIBLE_VERSIONS='^(4\.[0-1]\.[0-9]]|4\.[0]\.[0]+(|\+toward_4\.[0-1]\.[0-9]+_[0-9]+))$'
 }
 
index 605f098..3706aef 100644 (file)
@@ -195,7 +195,7 @@ The delimiter is comma (",") by default and changeable by \fB\-E\fR option.
 .PD 0
 .TP
 \fB\-\-fullcourse\fR
-Carry out the \fBdo\fR process as the "full course" automatic mode where operation in the builder \fBchroot\fR(8) environment is initiated by update of the ports tree and package repository followed by execution of \fBportsreinstall\fR(8) initiated with option \fB\-CGSYjqx\fR (\fB\-CGSajqx\fR if \fB\-a\fR option is set).
+Carry out the \fBdo\fR process as the "full course" automatic mode where operation in the builder \fBchroot\fR(8) environment is initiated by update of the ports tree and package repository followed by cleaning of the temporary database and execution of \fBportsreinstall\fR(8) initiated with option \fB\-CGSYjqx\fR (\fB\-CGSajqx\fR if \fB\-a\fR option is set).
 Resuming \fBdo\fR command automatically executes \fBportsreinstall\fR(8) in the builder \fBchroot\fR(8) environment.
 With \fB\-a\fR option, the all detected leaf and obsolete packages will be deleted.
 .PD