OSDN Git Service

Version 3.0.1+toward_3.0.2_20130708084914
authorUser Alatnmw Alat Nmw <alatnmw@Tariff.EmpireNmw>
Sun, 7 Jul 2013 23:49:37 +0000 (08:49 +0900)
committerUser Alatnmw Alat Nmw <alatnmw@Tariff.EmpireNmw>
Sun, 7 Jul 2013 23:49:37 +0000 (08:49 +0900)
A Bug fixed for a problem that forbidden conflicts were not deregistered even if newer versions are installed.

modified:   bin/portsreinstall
modified:   lib/libreinstall.sh

bin/portsreinstall
lib/libreinstall.sh

index bb73338..8f8ff94 100755 (executable)
@@ -15,7 +15,7 @@ APPNAME=`basename "$0"`
 # MYVERSION=3.0.1
 # COMPATIBLE_VERSIONS='^(3\.0\.[0-9]+)$'
 # Template for development versions
-MYVERSION=3.0.1+toward_3.0.2_20130705080823
+MYVERSION=3.0.1+toward_3.0.2_20130708084914
 COMPATIBLE_VERSIONS='^(3\.0\.[0-9]+\+toward_3\.0\.1_[0-9]+|3\.0\.[0-9]+)$'
 MYPREFIX=`dirname "\`dirname \"$0\"\`" | sed 's|/bin$||'`
 MYPREFIX=${MYPREFIX:-/usr/local}
index ee8e521..ba33acb 100644 (file)
@@ -246,25 +246,34 @@ reinstall_restore_conflicts ()
                origin_replace=`echo "$origin" \
                        | sed -E -f "${DBDIR}/REPLACE.complete_sed_pattern"`
                [ "x$origin_replace" = "x$origin" ] && origin_replace=
+               if [ -n "$origin_current" -a "x$origin" = "x$origin_current" ] || \
+                       pkg_info_e "$pkg" || pkg_info_eO "$origin" || \
+                       { [ -n "$origin_orig" ] && pkg_info_eO "$origin_orig"; } || \
+                       { [ -n "$origin_replace" ] && pkg_info_eO "$origin_replace"; }
+               then
+                       is_to_dereg_from_list=yes
+               else
+                       is_to_dereg_from_list=no
+               fi
                if pkgsys_chk_conflict_by_a_pkg install "$REINSTALL_ORIGIN" "$pkg"
                then
                        fileedit_add_a_line_if_new "$pkg:$REINSTALL_NEWPKGNAME" "${DBDIR}/forbidden_conflicts"
-                       continue
+                       is_skipped=yes
                elif reinstall_chk_forbidden_conflicts "$pkg"
                then
                        message_echo "INFO: Restoration of a conflict, $origin ($pkg), is avoided because it conflicts with installed packages."
-                       continue
+                       is_skipped=yes
+               else
+                       is_skipped=no
                fi
-               if [ -n "$origin_current" -a "x$origin" = "x$origin_current" ] || \
-                       pkg_info_e "$pkg" || pkg_info_eO "$origin" || \
-                       { [ -n "$origin_orig" ] && pkg_info_eO "$origin_orig"; } || \
-                       { [ -n "$origin_replace" ] && pkg_info_eO "$origin_replace"; }
+               if [ $is_to_dereg_from_list = yes ]
                then
                        grep -v -E "[[:space:]]$pkg_regexp_esc$" "${DBDIR}/deleted_conflicts" \
                                > ${DBDIR}/deleted_conflicts.tmp || :
                        mv "${DBDIR}/deleted_conflicts.tmp" "${DBDIR}/deleted_conflicts"
                        continue
                fi
+               [ $is_skipped = yes ] && continue
                origin_regexp_esc=`str_escape_regexp "$origin"`
                origin_replace_regexp_esc=`str_escape_regexp "$origin_replace"`
                if grep -q -E -e "^$origin_regexp_esc$" -e "^$origin_replace_regexp_esc$" "${DBDIR}/taboo.all.list" 2> /dev/null