• R/O
  • HTTP
  • SSH
  • HTTPS

current: Commit

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


Commit MetaInfo

Revisiond4bbd0ae49c6f4a77f36744a7a8498d259776fec (tree)
Time2018-09-13 01:18:45
AuthorMamoru Sakaue / MwGhennndo <glmwghennndo@user...>
CommiterMamoru Sakaue / MwGhennndo

Log Message

Fixed a bug that deleting packages didn't work in portsreinstall-upgrade.

Changes to be committed:

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

Change Summary

Incremental Difference

--- a/lib/libcommand_pkgs.sh
+++ b/lib/libcommand_pkgs.sh
@@ -294,7 +294,7 @@ command_pkgs_packupgrade_create__manifest_delete ()
294294 {
295295 local origin
296296 origin=$1
297- printf '%s\t%s\t%s\n' delete - "$origin" >> ${DBDIR}/command_packupgrade/etc/manifest.lst.delete
297+ printf '%s\t%s\t%s\n' delete "$origin" NA >> ${DBDIR}/command_packupgrade/etc/manifest.lst.delete
298298 }
299299 _program_exec_and_record_completion__operation ()
300300 {
@@ -356,15 +356,15 @@ command_pkgs_packupgrade_create__manifest_reinst ()
356356 then
357357 while read origin_old
358358 do
359- printf '%s\t%s\t%s\n' delete - "$origin_old"
359+ printf '%s\t%s\t%s\n' delete "$origin_old" NA
360360 done < ${DBDIR}/moved_from/$origin/initial_orig >> $tmp_manifest
361361 fi
362- printf '%s\t%s\t%s\n' delete - "$origin" >> $tmp_manifest
362+ printf '%s\t%s\t%s\n' delete "$origin" NA >> $tmp_manifest
363363 pkgsys_get_conflicting_pkgs_patterns install "$origin" | while read pkg_pattern
364364 do
365- printf '%s\t%s\t%s\n' delete_pattern - "$pkg_pattern" >> $tmp_manifest
365+ printf '%s\t%s\t%s\n' delete_pattern "$pkg_pattern" NA >> $tmp_manifest
366366 done
367- printf '%s\t%s\t%s\n' add "$pkgname" null >> $tmp_manifest
367+ printf '%s\t%s\t%s\n' add "$pkgname" NA >> $tmp_manifest
368368 fi
369369 cat "$tmp_manifest" >> $dstdir/etc/manifest.lst.update
370370 }
--- 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_20180912224956
15+ MYVERSION=4.0.0+toward_4.1.0_20180913001823
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
@@ -41,10 +41,10 @@ command_do_chk_pkg_paths ()
4141 additional=$pkgpath
4242 ;;
4343 delete | delete_pattern )
44- argument=-
44+ argument=NA
4545 ;;
4646 *)
47- message_echo "ERROR: Invalid command [$cmd $target $argument" >&2
47+ message_echo "ERROR: Invalid command [$cmd] [$target] [$argument]" >&2
4848 exit 1
4949 esac
5050 printf '%s\t%s\t%s\t%s\n' "$cmd" "$target" "$argument" "$additional"
@@ -62,7 +62,7 @@ command_do_reinst_ports ()
6262 PROGRAM_DEPENDS='CHK_PKGS'
6363 _program_exec_restartable_loop_operation__routine ()
6464 {
65- local cmd target argument additional target_regexp timestamp_init timestamp_fin pkgtype_init pkgtype_fin target_pkg pkgpath item conflict pkgs_pkgtools
65+ local cmd target argument additional target_regexp timestamp_init timestamp_fin pkgtype_init pkgtype_fin datetime_init datetime_fin origin target_pkg pkg pkg_pattern pkgpath item conflict pkgs_pkgtools
6666 cmd=`echo "$1" | cut -f 1`
6767 target=`echo "$1" | cut -f 2`
6868 argument=`echo "$1" | cut -f 3`
@@ -83,7 +83,7 @@ command_do_reinst_ports ()
8383 fi
8484 case $cmd in
8585 delete )
86- origin=$argument
86+ origin=$target
8787 if pkgsys_exists_from_orig "$origin"
8888 then
8989 target_pkg=`pkgsys_get_installed_pkg_from_origin "$origin"`
@@ -98,7 +98,7 @@ command_do_reinst_ports ()
9898 fi
9999 ;;
100100 delete_pattern )
101- pkg_pattern=$argument
101+ pkg_pattern=$target
102102 pkgsys_get_installed_pkg_from_glob "$pkg_pattern" | while read pkgname
103103 do
104104 if [ $opt_dry_run = yes ]
@@ -112,9 +112,10 @@ command_do_reinst_ports ()
112112 done
113113 ;;
114114 add )
115- if ! pkg_info_e "$target"
115+ pkg=$target
116+ pkgpath=$additional
117+ if ! pkg_info_e "$pkg"
116118 then
117- pkgpath=$additional
118119 if [ $opt_dry_run = yes ]
119120 then
120121 message_echo "Dry run: Add $pkgpath"
@@ -122,7 +123,7 @@ command_do_reinst_ports ()
122123 if ! pkg_add_fF "$pkgpath"
123124 then
124125 message_echo "(Continue anyway)" >&2
125- item=`printf '%s\t%s' "$target" "$pkgpath"`
126+ item=`printf '%s\t%s' "$pkg" "$pkgpath"`
126127 fileedit_add_a_line_if_new "$item" "${DBDIR}/stage.loop_list/failed_add"
127128 fi
128129 fi
Show on old repository browser