• R/O
  • HTTP
  • SSH
  • HTTPS

current: Commit

This is for active development.
New funtionalities are to be added actively.


Commit MetaInfo

Revisiond718ee72a234c95d5cb47bfdef1f8866f6df533c (tree)
Time2018-09-20 10:56:20
AuthorMamoru Sakaue / MwGhennndo <glmwghennndo@user...>
CommiterMamoru Sakaue / MwGhennndo

Log Message

Fixed a bug in portsreinstall-upgrade that unchanged packages were deleted.

Changes to be committed:

modified: HISTORY
modified: lib/libmain.sh
modified: lib/upgrade/libcommand_do.sh

Change Summary

Incremental Difference

--- a/HISTORY
+++ b/HISTORY
@@ -33,6 +33,7 @@
3333 [BUG FIX] Flavored requirements were incorrectly inspected. This also caused disability of the use of default packages for flavord ports with the default configuration.
3434 [BUG FIX] The message about the evaluated dependency level in show command was wrong.
3535 [BUG FIX] Unselected leaf ports were skipped in (re)installtion.
36+[BUG FIX] Some upgrading operations by portsreinstall-upgrade(8) were imperfect.
3637
3738 4.0.0 (29 June 2018)
3839 [NEW] Flavor is supported. Related to this feature, representations of port origins without flavor is recognized to exactly match the unflavored ones.
--- a/lib/libmain.sh
+++ b/lib/libmain.sh
@@ -12,7 +12,7 @@ main_set_version ()
1212 MYVERSION=4.1.0
1313 COMPATIBLE_VERSIONS='^(4\.[1]\.[0-9])$'
1414 # Template for development versions
15- MYVERSION=4.0.0+toward_4.1.0_20180920012630
15+ MYVERSION=4.0.0+toward_4.1.0_20180920105217
1616 COMPATIBLE_VERSIONS='^(4\.[0-1]\.[0-9]]|4\.[0]\.[0]+(|\+toward_4\.[0-1]\.[0-9]+_[0-9]+))$'
1717 }
1818
--- a/lib/upgrade/libcommand_do.sh
+++ b/lib/upgrade/libcommand_do.sh
@@ -67,18 +67,22 @@ command_do_reinst_ports ()
6767 target=`echo "$1" | cut -f 2`
6868 argument=`echo "$1" | cut -f 3`
6969 additional=`echo "$1" | cut -f 4`
70- target_regexp=`str_escape_regexp "$target"`
71- timestamp_init=`grep -E "^${target_regexp}[[:space:]]" "${DBDIR}/initial_pkgs_snapshot.csv" | cut -f 2`
72- timestamp_fin=`grep -E "^${target_regexp}[[:space:]]" "${ETCDIR}/final_pkgs_snapshot.csv" | cut -f 2`
73- if [ -n "$timestamp_init" -a -n "$timestamp_fin" ]
70+ target_pkg=`pkgsys_get_installed_pkg_from_origin "$target"`
71+ if [ -n "$target_pkg" ]
7472 then
75- pkgtype_init=`expr "$timestamp_init" : '\([^:]*\):' || :`
76- pkgtype_fin=`expr "$timestamp_fin" : '\([^:]*\):' || :`
77- if [ -n "$pkgtype_init" -a -n "$pkgtype_fin" -a "x$pkgtype_init" = "x$pkgtype_fin" ]
73+ target_regexp=`str_escape_regexp "$target_pkg"`
74+ timestamp_init=`grep -E "^${target_regexp}[[:space:]]" "${DBDIR}/initial_pkgs_snapshot.csv" | cut -f 2`
75+ timestamp_fin=`grep -E "^${target_regexp}[[:space:]]" "${ETCDIR}/final_pkgs_snapshot.csv" | cut -f 2`
76+ if [ -n "$timestamp_init" -a -n "$timestamp_fin" ]
7877 then
79- datetime_init=`expr "$timestamp_init" : '[^:]*:\([0-9]*\)' || :`
80- datetime_fin=`expr "$timestamp_fin" : '[^:]*:\([0-9]*\)' || :`
81- [ -n "$datetime_init" -a -n "$datetime_fin" -a "$datetime_init" -ge "$datetime_fin" ] && return
78+ pkgtype_init=`expr "$timestamp_init" : '\([^:]*\):' || :`
79+ pkgtype_fin=`expr "$timestamp_fin" : '\([^:]*\):' || :`
80+ if [ -n "$pkgtype_init" -a -n "$pkgtype_fin" -a "x$pkgtype_init" = "x$pkgtype_fin" ]
81+ then
82+ datetime_init=`expr "$timestamp_init" : '[^:]*:\([0-9]*\)' || :`
83+ datetime_fin=`expr "$timestamp_fin" : '[^:]*:\([0-9]*\)' || :`
84+ [ -n "$datetime_init" -a -n "$datetime_fin" -a "$datetime_init" -ge "$datetime_fin" ] && return
85+ fi
8286 fi
8387 fi
8488 case $cmd in
Show on old repository browser