OSDN Git Service

Version: 3.2.1
authorMamoru Sakaue / MwGhennndo <glmwghennndo@users.sourceforge.jp>
Mon, 26 Jan 2015 16:31:54 +0000 (01:31 +0900)
committerMamoru Sakaue / MwGhennndo <glmwghennndo@users.sourceforge.jp>
Mon, 26 Jan 2015 16:31:54 +0000 (01:31 +0900)
Bumped to a release version.
Remained bugs in the judgement of conflicts are fixed.

modified:   README
modified:   bin/portsreinstall
modified:   lib/libmessage.sh
modified:   lib/libreinstall.sh
modified:   man/portsreinstall.8

README
bin/portsreinstall
lib/libmessage.sh
lib/libreinstall.sh
man/portsreinstall.8

diff --git a/README b/README
index f14b93f..c97e0b5 100644 (file)
--- a/README
+++ b/README
@@ -1,6 +1,6 @@
 ================================================================================
  portsreinstall - ports upgrading utility for massive forced reinstallation
-  Version 3.2.1, January 30, 2015
+  Version 3.2.1, January 27, 2015
  Copyright (C) 2010-2015 Mamoru Sakaue, MwGhennndo, All Rights Reserved.
 ================================================================================
 
index aea6d4c..c91c632 100755 (executable)
 # ============ Set up of environment =============
 APPNAME=`basename "$0"`
 
-MYVERSION=3.2.1
-COMPATIBLE_VERSIONS='^(3\.[1-2]\.[0-9]+)$'
+MYVERSION=3.2.1
+COMPATIBLE_VERSIONS='^(3\.[1-2]\.[0-9]+)$'
 # Template for development versions
-MYVERSION=3.2.0+toward_3.2.1_20150120223451
-COMPATIBLE_VERSIONS='^(3\.[1-2]\.[0-9]+\+toward_3\.[1-2]\.[0-9]+_[0-9]+|3\.[1-2]\.[0-9]+)$'
+MYVERSION=3.2.0+toward_3.2.1_20150120223451
+COMPATIBLE_VERSIONS='^(3\.[1-2]\.[0-9]+\+toward_3\.[1-2]\.[0-9]+_[0-9]+|3\.[1-2]\.[0-9]+)$'
 MYPREFIX=`dirname "\`dirname \"$0\"\`" | sed 's|/bin$||'`
 MYPREFIX=${MYPREFIX:-/usr/local}
 LIBDIR=${MYPREFIX}/lib/${APPNAME}
index 106db40..7e5a0ec 100644 (file)
@@ -82,7 +82,7 @@ message_credit ()
        fold -s -w $ncolumns << eof
  -- Ports upgrading utility for massive forced reinstallation
  -- And for those who are pursuing the perfect packages environment
-Copyright (C) 2010 - 2014 Mamoru Sakaue, MwGhennndo, All Rights Reserved.
+Copyright (C) 2010 - 2015 Mamoru Sakaue, MwGhennndo, All Rights Reserved.
 Email: <sakaue.mamoru@samurai.mwghennn.net>
 Homepage: <http://www.mwghennndo.com/software/portsreinstall/>
 eof
index fee6984..51c8959 100644 (file)
@@ -29,9 +29,18 @@ reinstall_skip ()
 }
 
 # ============= Check whether a package is forbidden due to conflicts =============
+reinstall_quick_chk_forbidden_conflicts ()
+{
+       local pkg pkg_regexp_esc
+       pkg=$1
+       pkg_regexp_esc=`str_escape_regexp "$pkg"`
+       grep -qE "^$pkg_regexp_esc:" "${DBDIR}/forbidden_conflicts"
+}
+
+# ============= Check whether a package is forbidden due to conflicts =============
 reinstall_chk_forbidden_conflicts ()
 {
-       local pkg tmp_forbidden backup_pkg pkg pkg_regexp_esc
+       local pkg tmp_forbidden pkg_regexp_esc
        pkg=$1
        tmp_forbidden=${TMPDIR}/reinstall_chk_forbidden_conflicts:forbidden
        pkg_regexp_esc=`str_escape_regexp "$pkg"`
@@ -232,7 +241,8 @@ reinstall_backup_and_delete_conflicts ()
 # ============= Back up and delete remaining actual install conflicts =============
 reinstall_backup_and_delete_remaining_install_conflicts ()
 {
-       local stagedir
+       local stagedir tmp_conflicts
+       tmp_conflicts=${TMPDIR}/reinstall_backup_and_delete_remaining_install_conflicts
        message_echo "(Checking installation conflict...)"
        stagedir=`database_query_get_makevar_val "$REINSTALL_ORIGIN" STAGEDIR`
        {
@@ -242,13 +252,19 @@ reinstall_backup_and_delete_remaining_install_conflicts ()
                ) | sed 's|^\.||' | while read filepath
                do
                        [ ! -e "$filepath" ] && continue
-                       pkg=`pkg_which "$filepath"`
+                       pkg=`pkg_which "$filepath" || :`
                        [ -z "$pkg" ] && continue
-                       origin=`pkg_info_qo "$pkg"`
+                       origin=`pkg_info_qo "$pkg" || :`
                        [ x"$origin" = x"$REINSTALL_ORIGIN" ] || echo "$pkg"
                done
                pkgsys_get_conflicting_installed_pkgs install "$REINSTALL_ORIGIN"
-       } | sort -u | reinstall_backup_and_delete_conflicts
+       } | sort -u > $tmp_conflicts
+       while read pkg_conflict
+       do
+               fileedit_add_a_line_if_new "$pkg_conflict:$REINSTALL_NEWPKGNAME" \
+                       "${DBDIR}/forbidden_conflicts"
+       done < $tmp_conflicts
+       reinstall_backup_and_delete_conflicts < $tmp_conflicts
 }
 
 # ============= Restoration of backed up conflicts =============
@@ -1024,6 +1040,9 @@ reinstall_exec ()
                        if [ "$origin_bak" = "$REINSTALL_ORIGIN" ]
                        then
                                [ "$pkg_bak" = "$REINSTALL_NEWPKGNAME" ] && continue
+                       elif reinstall_quick_chk_forbidden_conflicts "$pkg_bak"
+                       then
+                               continue
                        elif ! pkgsys_chk_match_to_restored_files_by_backup_pkg "$origin_bak" "${TMPDIR}/previously_installed_files.grep_pattern"
                        then
                                continue
index bb5d3b5..66914f0 100644 (file)
@@ -2,7 +2,7 @@
 .\" ports reinstall installation guide
 .\" Copyright (C) 2010-2015 Mamoru Sakaue, MwGhennndo, All Rights Reserved.
 .\" ==================================================================================
-.TH PORTSREINSTALL 8 "30 January 2015" "FreeBSD" "FreeBSD System Manager's Manual"
+.TH PORTSREINSTALL 8 "27 January 2015" "FreeBSD" "FreeBSD System Manager's Manual"
 .SH NAME
 portsreinstall \- ports upgrading utility for massive forced reinstallation
 .SH SYNOPSIS
@@ -931,9 +931,9 @@ Configuration file of \fBportupgrade\fR(1).
 .SH HISTORY
 \fBportsreinstall\fR has been developed as below.
 .TP
-3.2.1 (30 January 2015)
+3.2.1 (27 January 2015)
 .RS
-[BUG FIX] The automatic resolution of installation conflict implemented in the previous version was broken and could have recognized the all packages as conflicts.
+[BUG FIX] The automatic resolution of installation conflict implemented in the previous version was seriously broken and judged conflicts incorrectly.
 .RE
 .TP
 3.2.0 (30 December 2014)