OSDN Git Service

A bug on option -k is fixed.
authorMamoru Sakaue / MwGhennndo <glmwghennndo@users.sourceforge.jp>
Tue, 7 Aug 2012 06:47:30 +0000 (15:47 +0900)
committerMamoru Sakaue / MwGhennndo <glmwghennndo@users.sourceforge.jp>
Tue, 7 Aug 2012 06:47:30 +0000 (15:47 +0900)
modified:   portsreinstall
modified:   portsreinstall.8
modified:   portsreinstall.8~
modified:   portsreinstall~

portsreinstall
portsreinstall.8
portsreinstall.8~
portsreinstall~

index 016a036..5510a35 100755 (executable)
@@ -10,7 +10,7 @@
 # ================================================
 
 APPNAME=`basename "$0"`
-MYVERSION=1.1.0+toward_1.2.0_20120806060951
+MYVERSION=1.1.0+toward_1.2.0_20120807154627
 
 PREFIX=${PREFIX:-/usr/local}
 CONFFILE=${PREFIX}/etc/${APPNAME}.conf
@@ -30,10 +30,10 @@ trap 'errno=$?; warn_update_ports; terminate_process; rm -r'`[ \`uname -s\` = Fr
 # ============= Save arguments for updated restart =============
 restart_command ()
 {
-       echo -n 'exec '`echo $0 | sed -E 's/ /\\ /g'`' '
+       echo -n "exec `echo "$0" | sed -E 's/(.)/\\\\\\1/g'`"
        while [ $# -ge 1 ]
        do
-               echo -n `echo $1 | sed -E 's/ /\\ /g'`' '
+               echo -n " `echo "$1" | sed -E 's/(.)/\\\\\\1/g'`"
                shift
        done
 }
@@ -783,6 +783,7 @@ inspect_dependencies ()
                        cd "${PORTSDIR}/$origin"
                        target_dir=${DBDIR}/requires/$origin
                        [ -d "$target_dir/status" ] || mkdir -p "$target_dir/status"
+                       [ $is_supressed = no ] || touch "$target_dir/SUPPRESSED"
                        if [ -d "${DBDIR}/requires_conflist/$origin" ]
                        then
                                cp -R "${DBDIR}/requires_conflist/$origin/"* "$target_dir/" > /dev/null 2> /dev/null || :
@@ -829,22 +830,13 @@ inspect_dependencies ()
                        env ${MAKE_ENVS} make fetch-urlall-list ${MAKE_ARGS} | sed -E 's|.*/([^/]+)$|\1|' | sort | uniq >> ${DBDIR}/distfiles.list
                fi
        fi
-       if [ $is_supressed = no ]
+       [ "$origin_orig" = "$origin" ] || echo "s|^`str_escape_regexp $origin_orig`$|$origin|" >> ${DBDIR}/REPLACE.complete_replace_pattern.tmp
+       add_a_line_if_new "$origin" "${DBDIR}/target.inspected.list"
+       rm_a_line "$origin" "${DBDIR}/target_ports.remain"
+       if [ -n "$origin_src" ]
        then
-               [ "$origin_orig" = "$origin" ] || echo "s|^`str_escape_regexp $origin_orig`$|$origin|" >> ${DBDIR}/REPLACE.complete_replace_pattern.tmp
-               add_a_line_if_new "$origin" "${DBDIR}/target.inspected.list"
-               rm_a_line "$origin" "${DBDIR}/target_ports.remain"
-               if [ -n "$origin_src" ]
-               then
-                       add_a_line_if_new "$origin_src" "${DBDIR}/target.inspected.list"
-                       rm_a_line "$origin_src" "${DBDIR}/target_ports.remain"
-               fi
-       else
-               rm_a_line "$origin" "${DBDIR}/target_ports.remain"
-               if [ -n "$origin_src" ]
-               then
-                       rm_a_line "$origin_src" "${DBDIR}/target_ports.remain"
-               fi
+               add_a_line_if_new "$origin_src" "${DBDIR}/target.inspected.list"
+               rm_a_line "$origin_src" "${DBDIR}/target_ports.remain"
        fi
        echo "${DEPTH_INDEX}  ===> ok"
 
@@ -867,7 +859,7 @@ timestamp ()
 warn_update_ports ()
 {
        [ ${_STATUS_DB_OBSOLETE} = no ] && return
-       echo "WARN: The Ports tree was updated after construction of the temporal database for ${APPNAME}." >&2
+       echo "WARNING: The Ports tree was updated after construction of the temporal database for ${APPNAME}." >&2
        echo "      You should consider executing " >&2
        echo "               ${APPNAME} clean" >&2
        echo "     to reset the temporal database unless you have special purposes." >&2
@@ -894,6 +886,7 @@ combine_lists ()
 
 show_list_failure ()
 {
+       [ -e "${DBDIR}"/failed.list ] || return 0
        while read origin
        do
                note=`cat "${DBDIR}/requires/$origin/note_failtre"`
@@ -1006,11 +999,11 @@ echo "The current time is `timestamp`"
 echo
 
 # Check of conflicting option
-[ -n "$target_dependent_ports" -a -d "${DBDIR}/COMPLETE_PARSE_OPTION_TARGET_PORTS" ] && echo "WARN: -t option is specified but ignored because we are restarting the previous run." >&2
-[ -n "$target_required_ports" -a -d "${DBDIR}/COMPLETE_PARSE_OPTION_TARGET_PORTS" ] && echo "WARN: -T option is specified but ignored because we are restarting the previous run." >&2
-[ -n "$target_dependent_ports_form2" -a -d "${DBDIR}/COMPLETE_PARSE_OPTION_TARGET_PORTS" ] && echo "WARN: -r option is specified but ignored because we are restarting the previous run." >&2
-[ -n "$target_required_ports_form2" -a -d "${DBDIR}/COMPLETE_PARSE_OPTION_TARGET_PORTS" ] && echo "WARN: -R option is specified but ignored because we are restarting the previous run." >&2
-[ "$load_pkgtoolsconf" != undef -a -d "${DBDIR}/COMPLETE_IMPORT_PKGTOOLS_CONF" ] && echo "WARN: -p, -P or -Q option is specified but ignored by following the previous settings." >&2
+[ -z "$target_dependent_ports" -o ! -e "${DBDIR}/COMPLETE_PARSE_OPTION_TARGET_PORTS" ] || echo "WARNING: -t option is specified but ignored because we are restarting the previous run." >&2
+[ -z "$target_required_ports" -o ! -e "${DBDIR}/COMPLETE_PARSE_OPTION_TARGET_PORTS" ] || echo "WARNING: -T option is specified but ignored because we are restarting the previous run." >&2
+[ -z "$target_dependent_ports_form2" -o ! -e "${DBDIR}/COMPLETE_PARSE_OPTION_TARGET_PORTS" ] || echo "WARNING: -r option is specified but ignored because we are restarting the previous run." >&2
+[ -z "$target_required_ports_form2" -o ! -e "${DBDIR}/COMPLETE_PARSE_OPTION_TARGET_PORTS" ] || echo "WARNING: -R option is specified but ignored because we are restarting the previous run." >&2
+[ "$load_pkgtoolsconf" = undef -o ! -e "${DBDIR}/COMPLETE_IMPORT_PKGTOOLS_CONF" ] || echo "WARNING: -p, -P or -Q option is specified but ignored by following the previous settings." >&2
 
 # Check whether the temporal database is newer than the ports tree
 if [ "${PORTS_INDEX_DB}" -nt "${DBDIR}" ]
@@ -1050,8 +1043,7 @@ then
                                then
                                        ( cd "${PORTSDIR}/$self_origin" && make clean )
                                        echo "INFO: Cleaning the temporal database by the new version..."
-                                       echo
-                                       "${APPNAME}" clean
+                                       rm -rf "${DBDIR}"
                                        echo
                                        echo "INFO: Restarting with the new version..."
                                        echo
@@ -1269,6 +1261,7 @@ show)
                        then
                                chk_if_target currentorigin "$origin"
                                [ -n "${currentorigin_is_relevant}" ] || continue
+                               [ ! -e "${DBDIR}/requires/$origin/SUPPRESSED" ] || continue
                        fi
                        if [ -e "${DBDIR}/$pkgnamedb/$origin/pkgtag" ]
                        then
@@ -1284,6 +1277,7 @@ show)
                        then
                                chk_if_target currentorigin "$origin"
                                [ -n "${currentorigin_is_relevant}" ] || continue
+                               [ ! -e "${DBDIR}/requires/$origin/SUPPRESSED" ] || continue
                        fi
                        if [ -e "${DBDIR}/$pkgnamedb/$origin/pkgtag" ]
                        then
@@ -1346,14 +1340,15 @@ else
        t_skip_unchanged=$skip_unchanged
        t_keep_distfiles=$keep_distfiles
        . "${DBDIR}"/saved_options.sh
-       [ $t_avoid_vulner = no -o $t_avoid_vulner = $avoid_vulner ] || echo "WARN: -s option is specified but ignored by transferring the settings from the previous run." >&2
-       [ $t_skip_unchanged = no -o $t_skip_unchanged = $skip_unchanged ] || echo "WARN: -q option is specified but ignored by transferring the settings from the previous run." >&2
-       [ $t_keep_distfiles = no -o $t_keep_distfiles = $keep_distfiles ] || echo "WARN: -d option is specified but ignored by transferring the settings from the previous run." >&2
+       [ $t_avoid_vulner = no -o $t_avoid_vulner = $avoid_vulner ] || echo "WARNING: -s option is specified but ignored by transferring the settings from the previous run." >&2
+       [ $t_skip_unchanged = no -o $t_skip_unchanged = $skip_unchanged ] || echo "WARNING: -q option is specified but ignored by transferring the settings from the previous run." >&2
+       [ $t_keep_distfiles = no -o $t_keep_distfiles = $keep_distfiles ] || echo "WARNING: -d option is specified but ignored by transferring the settings from the previous run." >&2
 fi
 echo "INFO: List of option values:"
 echo "-----------------------------------------"
 cat "${DBDIR}"/saved_options.sh
 echo "-----------------------------------------"
+echo
 
 if [ ! -e "${DBDIR}/COMPLETE_IMPORT_PKGTOOLS_CONF" ]
 then
@@ -1368,7 +1363,7 @@ then
                fi
        elif [ $load_pkgtoolsconf != undef -a `which portupgrade | wc -l` -eq 0 ]
        then
-               echo "WARN: pkgtools.conf is ignored because portupgrade is not installed" >&2
+               echo "WARNING: pkgtools.conf is ignored because portupgrade is not installed" >&2
                load_pkgtoolsconf=no
        fi
        
@@ -1377,7 +1372,7 @@ then
                echo "-- Starting to parse pkgtools.conf at `timestamp` (by using installed portupgrade)"
                portupgrade_pkg=`pkg_info -qO ports-mgmt/portupgrade`
                [ -n "$portupgrade_pkg" ] || portupgrade_pkg=`pkg_info -qO ports-mgmt/portupgrade-devel`
-               [ `expr "$portupgrade_pkg" : '^portupgrade-devel-'` -ne 0 ] && echo "WARN: Combination with portupgrade-devel-* has not tested."
+               [ `expr "$portupgrade_pkg" : '^portupgrade-devel-'` -ne 0 ] && echo "WARNING: Combination with portupgrade-devel-* has not tested."
                istart=`grep -m 1 -n -e '^def init_global$' "${PORTUPGRADE}" | cut -d : -f 1` || :
                [ -n "$istart" ] || { echo "ERROR: The current installed version of portupgrade is unsupported." >&2; }
                sed 1,$(($istart-1))d "${PORTUPGRADE}" > ${TMPDIR}/portupgrade.0
@@ -1476,18 +1471,13 @@ eof
 fi
 
 # ------- Configurations -------
-
-if [ ! -e "${DBDIR}/COMPLETE_INFO_TABOO_PORTS" ]
+if [ -n "$taboo_ports$taboo_ports_form2" ]
 then
-       if [ `cat "${DBDIR}"/taboo.list | wc -l` -gt 0 ]
-       then
-               echo "INFO: (Re-)installation of the following ports are avoided as taboo:"
-               echo "----------------------------------------"
-               cat "${DBDIR}"/taboo.list
-               echo "----------------------------------------"
-               echo
-       fi
-       touch "${DBDIR}/COMPLETE_INFO_TABOO_PORTS"
+       echo "INFO: (Re-)installation of the following ports are avoided as taboo:"
+       echo "----------------------------------------"
+       [ ! -e "${DBDIR}"/taboo.list ] || cat "${DBDIR}"/taboo.list
+       echo "----------------------------------------"
+       echo
 fi
 
 if [ ! -e "${DBDIR}/COMPLETE_PARSE_OPTION_TARGET_PORTS" ]
@@ -1495,40 +1485,40 @@ then
        rm -f "${DBDIR}/target_dependent_ports.specified" "${DBDIR}/target_required_ports.specified"
        register_globs_only_installed "$target_dependent_ports" "$target_dependent_ports_form2" > ${DBDIR}/target_dependent_ports.specified
        register_globs_only_installed "$target_required_ports" "$target_required_ports_form2" > ${DBDIR}/target_required_ports.specified
-       if [ -n "$target_dependent_ports$target_dependent_ports_form2$target_required_ports$target_required_ports_form2" ]
+       touch "${DBDIR}/COMPLETE_PARSE_OPTION_TARGET_PORTS"
+fi
+if [ -n "$target_dependent_ports$target_dependent_ports_form2$target_required_ports$target_required_ports_form2" ]
+then
+       echo "INFO: Operations will be applied only to the targets:"
+       if [ `cat "${DBDIR}"/target_dependent_ports.specified | wc -l` -gt 0 -a `cat "${DBDIR}"/target_required_ports.specified | wc -l` -gt 0 ]
        then
-               echo "INFO: Operations will be applied only to the targets:"
-               if [ `cat "${DBDIR}"/target_dependent_ports.specified | wc -l` -gt 0 -a `cat "${DBDIR}"/target_required_ports.specified | wc -l` -gt 0 ]
-               then
-                       echo "----------------------------------------"
-                       cat "${DBDIR}"/target_dependent_ports.specified
-                       echo "----------------------------------------"
-                       echo "and their dependents;"
-                       echo "----------------------------------------"
-                       cat "${DBDIR}"/target_required_ports.specified
-                       echo "----------------------------------------"
-                       echo "and their requirements."
-                       echo
-               elif [ `cat "${DBDIR}"/target_dependent_ports.specified | wc -l` -gt 0 ]
-               then
-                       echo "----------------------------------------"
-                       cat "${DBDIR}"/target_dependent_ports.specified
-                       echo "----------------------------------------"
-                       echo "and their dependents."
-                       echo
-               elif [ `cat "${DBDIR}"/target_required_ports.specified | wc -l` -gt 0 ]
-               then
-                       echo "----------------------------------------"
-                       cat "${DBDIR}"/target_required_ports.specified
-                       echo "----------------------------------------"
-                       echo "and their requirements."
-                       echo
-               else
-                       echo  "ERROR: Target ports are specified but none of them is valid." >&2
-                       exit 1
-               fi
+               echo "----------------------------------------"
+               cat "${DBDIR}"/target_dependent_ports.specified
+               echo "----------------------------------------"
+               echo "and their dependents;"
+               echo "----------------------------------------"
+               cat "${DBDIR}"/target_required_ports.specified
+               echo "----------------------------------------"
+               echo "and their requirements."
+               echo
+       elif [ `cat "${DBDIR}"/target_dependent_ports.specified | wc -l` -gt 0 ]
+       then
+               echo "----------------------------------------"
+               cat "${DBDIR}"/target_dependent_ports.specified
+               echo "----------------------------------------"
+               echo "and their dependents."
+               echo
+       elif [ `cat "${DBDIR}"/target_required_ports.specified | wc -l` -gt 0 ]
+       then
+               echo "----------------------------------------"
+               cat "${DBDIR}"/target_required_ports.specified
+               echo "----------------------------------------"
+               echo "and their requirements."
+               echo
+       else
+               echo  "ERROR: Target ports are specified but none of them is valid." >&2
+               exit 1
        fi
-       touch "${DBDIR}/COMPLETE_PARSE_OPTION_TARGET_PORTS"
 fi
 
 # Parse configuration file
@@ -1588,7 +1578,7 @@ then
                        expand_glob_pattern_to_origins "$glob_pattern" yes > ${TMPDIR}/origins.2.tmp || :
                        if [ `cat "${TMPDIR}/origins.2.tmp" | wc -l` -eq 0 ]
                        then
-                               echo "WARN: Original package to be replaced [$glob_pattern] is obsolete." >&2
+                               echo "WARNING: Original package to be replaced [$glob_pattern] is obsolete." >&2
                                echo "      If still required, use a pattern for port origins instead." >&2
                                continue
                        fi
@@ -1598,7 +1588,7 @@ then
                        then
                                to=
                        else
-                               [ -d "${PORTSDIR}/$to" ] || echo "WARN: replacement port [$to] is obsolete" >&2
+                               [ -d "${PORTSDIR}/$to" ] || echo "WARNING: replacement port [$to] is obsolete" >&2
                        fi
                        str_escape_regexp_filter < ${TMPDIR}/origins.2.tmp | sed "s|^|s:^|; s|$|$:$to:|" >> ${DBDIR}/REPLACE.replace_pattern.conflist
                done
@@ -1676,7 +1666,7 @@ then
        sort -u "${DBDIR}/target_dependent_ports.specified" "${DBDIR}/target_required_ports.specified" | add_lines_if_new "${DBDIR}"/target_ports.new
        if [ `cat "${DBDIR}/target_ports" | wc -l` -ne `cat "${DBDIR}/target_ports.new" | wc -l` ]
        then
-               echo "WARN: The temporal database will be refreshed so as to reinstall the all failed ports and their dependents."
+               echo "WARNING: The temporal database will be refreshed so as to reinstall the all failed ports and their dependents."
                rm -f "${DBDIR}/COMPLETE_COLLECED_ALL_DEPENDENCIES" \
                        "${DBDIR}/COMPLETE_DISTFILES_LIST" \
                        "${DBDIR}/COMPLETE_CONVERT_REQUIRES_LIST" \
@@ -2226,6 +2216,14 @@ then
                        rm_a_line "$origin" "${DBDIR}/reinst_todo.list"
                        continue
                fi
+               if [ -e "${DBDIR}/requires/$origin/SUPPRESSED" ]
+               then
+                       echo "========== $counter (Skipping a suppressed port $position_msg as success at `timestamp`) =========="
+                       cat ${TMPDIR}/msg_if_target
+                       echo
+                       rm_a_line "$origin" "${DBDIR}/reinst_todo.list"
+                       continue
+               fi
                if [ -e "${DBDIR}/requires/$origin/installed_version" ]
                then
                        insttarget=reinstall
@@ -2286,7 +2284,7 @@ then
                        fi
                        if [ -e "${DBDIR}/requires/$origin/status/FAILED_FETCH" ]
                        then
-                               echo "WARN: Refetching distfiles for ${PORTSDIR}/$position_msg." >&2
+                               echo "WARNING: Refetching distfiles for ${PORTSDIR}/$position_msg." >&2
 #                              if [ ! -e "${DBDIR}/requires/$origin/status/COMPLETE.FAILED_FETCH.DISTCLEAN" ]
 #                              then
 #                                      env ${MAKE_ENVS} make distclean NOCLEANDEPENDS=yes ${MAKE_ARGS} || \
@@ -2353,7 +2351,7 @@ then
                        pkg_create -b "$currentpkg" || \
                        {
                                rm -f "${DBDIR}/backup_failure/$currentpkg.tbz"
-                               echo "WARN: Failed to create the backup package, but ignored by hoping success." >&2
+                               echo "WARNING: Failed to create the backup package, but ignored by hoping success." >&2
                        }
                        cd "${PORTSDIR}/$origin"
                        touch "${DBDIR}/requires/$origin/status/COMPLETE_PKG_BACKUP"
@@ -2380,12 +2378,12 @@ then
                then
                        pkg_delete -f $currentpkg || \
                        {
-                               echo "WARN: Failed to deinstall $currentpkg by pkg_delete." >&2
+                               echo "WARNING: Failed to deinstall $currentpkg by pkg_delete." >&2
                        }
                        echo "-- (Trying to deinstall by ports to make sure. This usually ends up with warnings.)"
                        env ${MAKE_ENVS} make deinstall ${MAKE_ARGS} || \
                        {
-                               echo "WARN: Failed to deinstall $currentpkg by make deinstall." >&2
+                               echo "WARNING: Failed to deinstall $currentpkg by make deinstall." >&2
                        }
                        touch "${DBDIR}/requires/$origin/status/COMPLETE_DEINSTALL"
                fi
@@ -2416,12 +2414,12 @@ then
                                                echo "*** Restoring the backup..."
                                                if [ -e "${DBDIR}/backup_failure/$currentpkg.tbz" ]
                                                then
-                                                       echo "WARN: No backup exists, gave up." >&2
+                                                       echo "WARNING: No backup exists, gave up." >&2
                                                elif pkg_add -fF "${DBDIR}/backup_failure/$currentpkg.tbz"
                                                then
                                                        :
                                                else
-                                                       echo "WARN: Failed to restore $currentpkg. Note that your system may experience troubles by this error." >&2
+                                                       echo "WARNING: Failed to restore $currentpkg. Note that your system may experience troubles by this error." >&2
                                                fi
                                        fi
                                        touch "${DBDIR}/requires/$origin/status/COMPETE.FAILED_INSTALL.RECOVER"
@@ -2459,7 +2457,7 @@ then
                then
                        env ${MAKE_ENVS} make clean ${MAKE_ARGS} || \
                        {
-                               echo "WARN: Failed to clean $position_msg." >&2
+                               echo "WARNING: Failed to clean $position_msg." >&2
                        }
                        touch "${DBDIR}/requires/$origin/status/COMPLETE_CLEAN_AFTER_INSTALL"
                fi
index 25010a3..2d6a5ee 100644 (file)
@@ -269,7 +269,7 @@ Configuration file of portupgrade(1).
 .SH HISTORY
 \fBportsreinstall\fR has been developed as below.
 .TP
-1.2.0 (5 August 2012)
+1.2.0 (7 August 2012)
 [NEW] Options \fB\-X\fR, \fB\-r\fR and \fB\-R\fR are added so as to compensate a fact that \fB\-x\fR, \fB\-t\fR and \fB\-T\fR cannot specify package names with commas.
 
 [NEW] Commands of \fBshow requirements\fR and  \fBshow dependents\fR are added.
index 9181b4d..25010a3 100644 (file)
@@ -276,6 +276,10 @@ Configuration file of portupgrade(1).
 
 [NEW] A functionality of self-update is added so as to be carried out first if the port of portsreinstall is new.
 
+[NEW] Option \fB\-k\fR is added for cases that update of portsreinstall should be avoided.
+
+[IMPROVED] Messages are extended to output configuration parameter values.
+
 [CHANGED] Functionalities of options \fB\-t\fR and \fB\-T\fR are changed so as to prevent deinstallation of irrelevant packages and detect obsolete installed dependencies.
 
 [CHANGED] Use of commas as delimiters in \fBok\fR and \fBtaboo\fR commands is abolished.
@@ -285,10 +289,6 @@ Configuration file of portupgrade(1).
 [BUG FIX] Termination message is corrected (portsreinstall ok => portsreinstall ok add).
 
 [BUG FIX] Values of BEFOREBUILD, BEFOREDEINSTALL and AFTERINSTALL were not correctly imported from pkgtools.conf(5).
-
-[NEW] Option \fB\-k\fR is added for cases that update of portsreinstall should be avoided.
-
-[IMPROVED] Messages are extended to output configuration parameter values.
 .TP
 1.1.0 (28 April 2012)
 [NEW] Command of show deleted is newly added.
index 3064756..f293896 100755 (executable)
@@ -10,7 +10,7 @@
 # ================================================
 
 APPNAME=`basename "$0"`
-MYVERSION=1.1.0+toward_1.2.0_20120805232853
+MYVERSION=1.1.0+toward_1.2.0_20120807052151
 
 PREFIX=${PREFIX:-/usr/local}
 CONFFILE=${PREFIX}/etc/${APPNAME}.conf
@@ -30,10 +30,10 @@ trap 'errno=$?; warn_update_ports; terminate_process; rm -r'`[ \`uname -s\` = Fr
 # ============= Save arguments for updated restart =============
 restart_command ()
 {
-       echo -n 'exec '`echo $0 | sed -E 's/ /\\ /g'`' '
+       echo -n "exec `echo "$0" | sed -E 's/(.)/\\\\\\1/g'`"
        while [ $# -ge 1 ]
        do
-               echo -n `echo $1 | sed -E 's/ /\\ /g'`' '
+               echo -n " `echo "$1" | sed -E 's/(.)/\\\\\\1/g'`"
                shift
        done
 }
@@ -783,6 +783,7 @@ inspect_dependencies ()
                        cd "${PORTSDIR}/$origin"
                        target_dir=${DBDIR}/requires/$origin
                        [ -d "$target_dir/status" ] || mkdir -p "$target_dir/status"
+                       [ $is_supressed = no ] || touch "$target_dir/SUPPRESSED"
                        if [ -d "${DBDIR}/requires_conflist/$origin" ]
                        then
                                cp -R "${DBDIR}/requires_conflist/$origin/"* "$target_dir/" > /dev/null 2> /dev/null || :
@@ -829,22 +830,13 @@ inspect_dependencies ()
                        env ${MAKE_ENVS} make fetch-urlall-list ${MAKE_ARGS} | sed -E 's|.*/([^/]+)$|\1|' | sort | uniq >> ${DBDIR}/distfiles.list
                fi
        fi
-       if [ $is_supressed = no ]
+       [ "$origin_orig" = "$origin" ] || echo "s|^`str_escape_regexp $origin_orig`$|$origin|" >> ${DBDIR}/REPLACE.complete_replace_pattern.tmp
+       add_a_line_if_new "$origin" "${DBDIR}/target.inspected.list"
+       rm_a_line "$origin" "${DBDIR}/target_ports.remain"
+       if [ -n "$origin_src" ]
        then
-               [ "$origin_orig" = "$origin" ] || echo "s|^`str_escape_regexp $origin_orig`$|$origin|" >> ${DBDIR}/REPLACE.complete_replace_pattern.tmp
-               add_a_line_if_new "$origin" "${DBDIR}/target.inspected.list"
-               rm_a_line "$origin" "${DBDIR}/target_ports.remain"
-               if [ -n "$origin_src" ]
-               then
-                       add_a_line_if_new "$origin_src" "${DBDIR}/target.inspected.list"
-                       rm_a_line "$origin_src" "${DBDIR}/target_ports.remain"
-               fi
-       else
-               rm_a_line "$origin" "${DBDIR}/target_ports.remain"
-               if [ -n "$origin_src" ]
-               then
-                       rm_a_line "$origin_src" "${DBDIR}/target_ports.remain"
-               fi
+               add_a_line_if_new "$origin_src" "${DBDIR}/target.inspected.list"
+               rm_a_line "$origin_src" "${DBDIR}/target_ports.remain"
        fi
        echo "${DEPTH_INDEX}  ===> ok"
 
@@ -867,7 +859,7 @@ timestamp ()
 warn_update_ports ()
 {
        [ ${_STATUS_DB_OBSOLETE} = no ] && return
-       echo "WARN: The Ports tree was updated after construction of the temporal database for ${APPNAME}." >&2
+       echo "WARNING: The Ports tree was updated after construction of the temporal database for ${APPNAME}." >&2
        echo "      You should consider executing " >&2
        echo "               ${APPNAME} clean" >&2
        echo "     to reset the temporal database unless you have special purposes." >&2
@@ -894,6 +886,7 @@ combine_lists ()
 
 show_list_failure ()
 {
+       [ -e "${DBDIR}"/failed.list ] || return 0
        while read origin
        do
                note=`cat "${DBDIR}/requires/$origin/note_failtre"`
@@ -1006,11 +999,11 @@ echo "The current time is `timestamp`"
 echo
 
 # Check of conflicting option
-[ -n "$target_dependent_ports" -a -d "${DBDIR}/COMPLETE_PARSE_OPTION_TARGET_PORTS" ] && echo "WARN: -t option is specified but ignored because we are restarting the previous run." >&2
-[ -n "$target_required_ports" -a -d "${DBDIR}/COMPLETE_PARSE_OPTION_TARGET_PORTS" ] && echo "WARN: -T option is specified but ignored because we are restarting the previous run." >&2
-[ -n "$target_dependent_ports_form2" -a -d "${DBDIR}/COMPLETE_PARSE_OPTION_TARGET_PORTS" ] && echo "WARN: -r option is specified but ignored because we are restarting the previous run." >&2
-[ -n "$target_required_ports_form2" -a -d "${DBDIR}/COMPLETE_PARSE_OPTION_TARGET_PORTS" ] && echo "WARN: -R option is specified but ignored because we are restarting the previous run." >&2
-[ "$load_pkgtoolsconf" != undef -a -d "${DBDIR}/COMPLETE_IMPORT_PKGTOOLS_CONF" ] && echo "WARN: -p, -P or -Q option is specified but ignored by following the previous settings." >&2
+[ -z "$target_dependent_ports" -o ! -e "${DBDIR}/COMPLETE_PARSE_OPTION_TARGET_PORTS" ] || echo "WARNING: -t option is specified but ignored because we are restarting the previous run." >&2
+[ -z "$target_required_ports" -o ! -e "${DBDIR}/COMPLETE_PARSE_OPTION_TARGET_PORTS" ] || echo "WARNING: -T option is specified but ignored because we are restarting the previous run." >&2
+[ -z "$target_dependent_ports_form2" -o ! -e "${DBDIR}/COMPLETE_PARSE_OPTION_TARGET_PORTS" ] || echo "WARNING: -r option is specified but ignored because we are restarting the previous run." >&2
+[ -z "$target_required_ports_form2" -o ! -e "${DBDIR}/COMPLETE_PARSE_OPTION_TARGET_PORTS" ] || echo "WARNING: -R option is specified but ignored because we are restarting the previous run." >&2
+[ "$load_pkgtoolsconf" = undef -o ! -e "${DBDIR}/COMPLETE_IMPORT_PKGTOOLS_CONF" ] || echo "WARNING: -p, -P or -Q option is specified but ignored by following the previous settings." >&2
 
 # Check whether the temporal database is newer than the ports tree
 if [ "${PORTS_INDEX_DB}" -nt "${DBDIR}" ]
@@ -1050,8 +1043,7 @@ then
                                then
                                        ( cd "${PORTSDIR}/$self_origin" && make clean )
                                        echo "INFO: Cleaning the temporal database by the new version..."
-                                       echo
-                                       "${APPNAME}" clean
+                                       rm -rf "${DBDIR}"
                                        echo
                                        echo "INFO: Restarting with the new version..."
                                        echo
@@ -1269,6 +1261,7 @@ show)
                        then
                                chk_if_target currentorigin "$origin"
                                [ -n "${currentorigin_is_relevant}" ] || continue
+                               [ ! -e "${DBDIR}/requires/$origin/SUPPRESSED" ] || continue
                        fi
                        if [ -e "${DBDIR}/$pkgnamedb/$origin/pkgtag" ]
                        then
@@ -1284,6 +1277,7 @@ show)
                        then
                                chk_if_target currentorigin "$origin"
                                [ -n "${currentorigin_is_relevant}" ] || continue
+                               [ ! -e "${DBDIR}/requires/$origin/SUPPRESSED" ] || continue
                        fi
                        if [ -e "${DBDIR}/$pkgnamedb/$origin/pkgtag" ]
                        then
@@ -1346,14 +1340,15 @@ else
        t_skip_unchanged=$skip_unchanged
        t_keep_distfiles=$keep_distfiles
        . "${DBDIR}"/saved_options.sh
-       [ $t_avoid_vulner = no -o $t_avoid_vulner = $avoid_vulner ] || echo "WARN: -s option is specified but ignored by transferring the settings from the previous run." >&2
-       [ $t_skip_unchanged = no -o $t_skip_unchanged = $skip_unchanged ] || echo "WARN: -q option is specified but ignored by transferring the settings from the previous run." >&2
-       [ $t_keep_distfiles = no -o $t_keep_distfiles = $keep_distfiles ] || echo "WARN: -d option is specified but ignored by transferring the settings from the previous run." >&2
+       [ $t_avoid_vulner = no -o $t_avoid_vulner = $avoid_vulner ] || echo "WARNING: -s option is specified but ignored by transferring the settings from the previous run." >&2
+       [ $t_skip_unchanged = no -o $t_skip_unchanged = $skip_unchanged ] || echo "WARNING: -q option is specified but ignored by transferring the settings from the previous run." >&2
+       [ $t_keep_distfiles = no -o $t_keep_distfiles = $keep_distfiles ] || echo "WARNING: -d option is specified but ignored by transferring the settings from the previous run." >&2
 fi
 echo "INFO: List of option values:"
 echo "-----------------------------------------"
 cat "${DBDIR}"/saved_options.sh
 echo "-----------------------------------------"
+echo
 
 if [ ! -e "${DBDIR}/COMPLETE_IMPORT_PKGTOOLS_CONF" ]
 then
@@ -1368,7 +1363,7 @@ then
                fi
        elif [ $load_pkgtoolsconf != undef -a `which portupgrade | wc -l` -eq 0 ]
        then
-               echo "WARN: pkgtools.conf is ignored because portupgrade is not installed" >&2
+               echo "WARNING: pkgtools.conf is ignored because portupgrade is not installed" >&2
                load_pkgtoolsconf=no
        fi
        
@@ -1377,7 +1372,7 @@ then
                echo "-- Starting to parse pkgtools.conf at `timestamp` (by using installed portupgrade)"
                portupgrade_pkg=`pkg_info -qO ports-mgmt/portupgrade`
                [ -n "$portupgrade_pkg" ] || portupgrade_pkg=`pkg_info -qO ports-mgmt/portupgrade-devel`
-               [ `expr "$portupgrade_pkg" : '^portupgrade-devel-'` -ne 0 ] && echo "WARN: Combination with portupgrade-devel-* has not tested."
+               [ `expr "$portupgrade_pkg" : '^portupgrade-devel-'` -ne 0 ] && echo "WARNING: Combination with portupgrade-devel-* has not tested."
                istart=`grep -m 1 -n -e '^def init_global$' "${PORTUPGRADE}" | cut -d : -f 1` || :
                [ -n "$istart" ] || { echo "ERROR: The current installed version of portupgrade is unsupported." >&2; }
                sed 1,$(($istart-1))d "${PORTUPGRADE}" > ${TMPDIR}/portupgrade.0
@@ -1476,18 +1471,13 @@ eof
 fi
 
 # ------- Configurations -------
-
-if [ ! -e "${DBDIR}/COMPLETE_INFO_TABOO_PORTS" ]
+if [ -n "$taboo_ports$taboo_ports_form2" ]
 then
-       if [ `cat "${DBDIR}"/taboo.list | wc -l` -gt 0 ]
-       then
-               echo "INFO: (Re-)installation of the following ports are avoided as taboo:"
-               echo "----------------------------------------"
-               cat "${DBDIR}"/taboo.list
-               echo "----------------------------------------"
-               echo
-       fi
-       touch "${DBDIR}/COMPLETE_INFO_TABOO_PORTS"
+       echo "INFO: (Re-)installation of the following ports are avoided as taboo:"
+       echo "----------------------------------------"
+       [ ! -e "${DBDIR}"/taboo.list ] || cat "${DBDIR}"/taboo.list
+       echo "----------------------------------------"
+       echo
 fi
 
 if [ ! -e "${DBDIR}/COMPLETE_PARSE_OPTION_TARGET_PORTS" ]
@@ -1495,40 +1485,40 @@ then
        rm -f "${DBDIR}/target_dependent_ports.specified" "${DBDIR}/target_required_ports.specified"
        register_globs_only_installed "$target_dependent_ports" "$target_dependent_ports_form2" > ${DBDIR}/target_dependent_ports.specified
        register_globs_only_installed "$target_required_ports" "$target_required_ports_form2" > ${DBDIR}/target_required_ports.specified
-       if [ -n "$target_dependent_ports$target_dependent_ports_form2$target_required_ports$target_required_ports_form2" ]
+       touch "${DBDIR}/COMPLETE_PARSE_OPTION_TARGET_PORTS"
+fi
+if [ -n "$target_dependent_ports$target_dependent_ports_form2$target_required_ports$target_required_ports_form2" ]
+then
+       echo "INFO: Operations will be applied only to the targets:"
+       if [ `cat "${DBDIR}"/target_dependent_ports.specified | wc -l` -gt 0 -a `cat "${DBDIR}"/target_required_ports.specified | wc -l` -gt 0 ]
        then
-               echo "INFO: Operations will be applied only to the targets:"
-               if [ `cat "${DBDIR}"/target_dependent_ports.specified | wc -l` -gt 0 -a `cat "${DBDIR}"/target_required_ports.specified | wc -l` -gt 0 ]
-               then
-                       echo "----------------------------------------"
-                       cat "${DBDIR}"/target_dependent_ports.specified
-                       echo "----------------------------------------"
-                       echo "and their dependents;"
-                       echo "----------------------------------------"
-                       cat "${DBDIR}"/target_required_ports.specified
-                       echo "----------------------------------------"
-                       echo "and their requirements."
-                       echo
-               elif [ `cat "${DBDIR}"/target_dependent_ports.specified | wc -l` -gt 0 ]
-               then
-                       echo "----------------------------------------"
-                       cat "${DBDIR}"/target_dependent_ports.specified
-                       echo "----------------------------------------"
-                       echo "and their dependents."
-                       echo
-               elif [ `cat "${DBDIR}"/target_required_ports.specified | wc -l` -gt 0 ]
-               then
-                       echo "----------------------------------------"
-                       cat "${DBDIR}"/target_required_ports.specified
-                       echo "----------------------------------------"
-                       echo "and their requirements."
-                       echo
-               else
-                       echo  "ERROR: Target ports are specified but none of them is valid." >&2
-                       exit 1
-               fi
+               echo "----------------------------------------"
+               cat "${DBDIR}"/target_dependent_ports.specified
+               echo "----------------------------------------"
+               echo "and their dependents;"
+               echo "----------------------------------------"
+               cat "${DBDIR}"/target_required_ports.specified
+               echo "----------------------------------------"
+               echo "and their requirements."
+               echo
+       elif [ `cat "${DBDIR}"/target_dependent_ports.specified | wc -l` -gt 0 ]
+       then
+               echo "----------------------------------------"
+               cat "${DBDIR}"/target_dependent_ports.specified
+               echo "----------------------------------------"
+               echo "and their dependents."
+               echo
+       elif [ `cat "${DBDIR}"/target_required_ports.specified | wc -l` -gt 0 ]
+       then
+               echo "----------------------------------------"
+               cat "${DBDIR}"/target_required_ports.specified
+               echo "----------------------------------------"
+               echo "and their requirements."
+               echo
+       else
+               echo  "ERROR: Target ports are specified but none of them is valid." >&2
+               exit 1
        fi
-       touch "${DBDIR}/COMPLETE_PARSE_OPTION_TARGET_PORTS"
 fi
 
 # Parse configuration file
@@ -1588,7 +1578,7 @@ then
                        expand_glob_pattern_to_origins "$glob_pattern" yes > ${TMPDIR}/origins.2.tmp || :
                        if [ `cat "${TMPDIR}/origins.2.tmp" | wc -l` -eq 0 ]
                        then
-                               echo "WARN: Original package to be replaced [$glob_pattern] is obsolete." >&2
+                               echo "WARNING: Original package to be replaced [$glob_pattern] is obsolete." >&2
                                echo "      If still required, use a pattern for port origins instead." >&2
                                continue
                        fi
@@ -1598,7 +1588,7 @@ then
                        then
                                to=
                        else
-                               [ -d "${PORTSDIR}/$to" ] || echo "WARN: replacement port [$to] is obsolete" >&2
+                               [ -d "${PORTSDIR}/$to" ] || echo "WARNING: replacement port [$to] is obsolete" >&2
                        fi
                        str_escape_regexp_filter < ${TMPDIR}/origins.2.tmp | sed "s|^|s:^|; s|$|$:$to:|" >> ${DBDIR}/REPLACE.replace_pattern.conflist
                done
@@ -1676,7 +1666,7 @@ then
        sort -u "${DBDIR}/target_dependent_ports.specified" "${DBDIR}/target_required_ports.specified" | add_lines_if_new "${DBDIR}"/target_ports.new
        if [ `cat "${DBDIR}/target_ports" | wc -l` -ne `cat "${DBDIR}/target_ports.new" | wc -l` ]
        then
-               echo "WARN: The temporal database will be refreshed so as to reinstall the all failed ports and their dependents."
+               echo "WARNING: The temporal database will be refreshed so as to reinstall the all failed ports and their dependents."
                rm -f "${DBDIR}/COMPLETE_COLLECED_ALL_DEPENDENCIES" \
                        "${DBDIR}/COMPLETE_DISTFILES_LIST" \
                        "${DBDIR}/COMPLETE_CONVERT_REQUIRES_LIST" \
@@ -2226,6 +2216,14 @@ then
                        rm_a_line "$origin" "${DBDIR}/reinst_todo.list"
                        continue
                fi
+               if [ -e "${DBDIR}/requires/$origin/SUPPRESSED" ]
+               then
+                       echo "========== $counter (Skipping a suppressed port $position_msg as success at `timestamp`) =========="
+                       cat ${TMPDIR}/msg_if_target
+                       echo
+                       rm_a_line "$origin" "${DBDIR}/reinst_todo.list"
+                       continue
+               fi
                if [ -e "${DBDIR}/requires/$origin/installed_version" ]
                then
                        insttarget=reinstall
@@ -2286,7 +2284,7 @@ then
                        fi
                        if [ -e "${DBDIR}/requires/$origin/status/FAILED_FETCH" ]
                        then
-                               echo "WARN: Refetching distfiles for ${PORTSDIR}/$position_msg." >&2
+                               echo "WARNING: Refetching distfiles for ${PORTSDIR}/$position_msg." >&2
 #                              if [ ! -e "${DBDIR}/requires/$origin/status/COMPLETE.FAILED_FETCH.DISTCLEAN" ]
 #                              then
 #                                      env ${MAKE_ENVS} make distclean NOCLEANDEPENDS=yes ${MAKE_ARGS} || \
@@ -2353,7 +2351,7 @@ then
                        pkg_create -b "$currentpkg" || \
                        {
                                rm -f "${DBDIR}/backup_failure/$currentpkg.tbz"
-                               echo "WARN: Failed to create the backup package, but ignored by hoping success." >&2
+                               echo "WARNING: Failed to create the backup package, but ignored by hoping success." >&2
                        }
                        cd "${PORTSDIR}/$origin"
                        touch "${DBDIR}/requires/$origin/status/COMPLETE_PKG_BACKUP"
@@ -2380,12 +2378,12 @@ then
                then
                        pkg_delete -f $currentpkg || \
                        {
-                               echo "WARN: Failed to deinstall $currentpkg by pkg_delete." >&2
+                               echo "WARNING: Failed to deinstall $currentpkg by pkg_delete." >&2
                        }
                        echo "-- (Trying to deinstall by ports to make sure. This usually ends up with warnings.)"
                        env ${MAKE_ENVS} make deinstall ${MAKE_ARGS} || \
                        {
-                               echo "WARN: Failed to deinstall $currentpkg by make deinstall." >&2
+                               echo "WARNING: Failed to deinstall $currentpkg by make deinstall." >&2
                        }
                        touch "${DBDIR}/requires/$origin/status/COMPLETE_DEINSTALL"
                fi
@@ -2416,12 +2414,12 @@ then
                                                echo "*** Restoring the backup..."
                                                if [ -e "${DBDIR}/backup_failure/$currentpkg.tbz" ]
                                                then
-                                                       echo "WARN: No backup exists, gave up." >&2
+                                                       echo "WARNING: No backup exists, gave up." >&2
                                                elif pkg_add -fF "${DBDIR}/backup_failure/$currentpkg.tbz"
                                                then
                                                        :
                                                else
-                                                       echo "WARN: Failed to restore $currentpkg. Note that your system may experience troubles by this error." >&2
+                                                       echo "WARNING: Failed to restore $currentpkg. Note that your system may experience troubles by this error." >&2
                                                fi
                                        fi
                                        touch "${DBDIR}/requires/$origin/status/COMPETE.FAILED_INSTALL.RECOVER"
@@ -2459,7 +2457,7 @@ then
                then
                        env ${MAKE_ENVS} make clean ${MAKE_ARGS} || \
                        {
-                               echo "WARN: Failed to clean $position_msg." >&2
+                               echo "WARNING: Failed to clean $position_msg." >&2
                        }
                        touch "${DBDIR}/requires/$origin/status/COMPLETE_CLEAN_AFTER_INSTALL"
                fi