message_section_title "Preparation"
mkdir -p "${PACKAGES}/${PKGREPOSITORYSUBDIR}"
cp "${DBDIR}/reinst_order.list" "${DBDIR}/stage.loop_list/command_packupgrade_pack"
+ cat "${DBDIR}/moved_ports" "${DBDIR}/stage.loop_list/ports_to_delete" > ${DBDIR}/stage.loop_list/command_packupgrade_delete 2> /dev/null
dstdir=${DBDIR}/command_packupgrade
rm -rf "$dstdir" "$dstdir.tar.gz"
mkdir -p "$dstdir"
program_exec_and_record_completion COMMAND_PACKUPGRADE_PREPARE
}
+# ============= Stage of creating the manifest of deletion in operation of packupgrade create command =============
+command_pkgs_packupgrade_create__manifest_delete ()
+{
+ local PROGRAM_DEPENDS
+ PROGRAM_DEPENDS='COMMAND_PACKUPGRADE_PREPARE'
+ _program_exec_restartable_loop_operation__routine ()
+ {
+ local origin
+ origin=$1
+ printf '%s\t%s\t%s\n' delete "$pkgname" "$origin" >> ${DBDIR}/command_packupgrade/etc/manifest.lst.delete
+ }
+ _program_exec_and_record_completion__operation ()
+ {
+ message_section_title "Create manifest of deletion"
+ program_exec_restartable_loop_operation command_packupgrade_delete
+ message_echo
+ }
+ program_exec_and_record_completion COMMAND_PACKUPGRADE_MANIFEST_DELETE
+}
+
# ============= Stage of creating the manifest of reinstallation in operation of packupgrade create command =============
command_pkgs_packupgrade_create__manifest_reinst ()
{
done
printf '%s\t%s\t%s\n' add "$pkgname" null >> $tmp_manifest
fi
- cat "$tmp_manifest" >> $dstdir/etc/manifest.lst
+ cat "$tmp_manifest" >> $dstdir/etc/manifest.lst.update
}
_program_exec_and_record_completion__operation ()
{
mkdir -p "${PACKAGESDIR}"
PACKAGESDIR=`realpath "${PACKAGESDIR}"`
program_exec_restartable_loop_operation command_packupgrade_pack
- cp "${DBDIR}/stage.loop_list/ports_to_delete" "${DBDIR}/stage.loop_list/command_packupgrade_delete"
message_echo
}
program_exec_and_record_completion COMMAND_PACKUPGRADE_MANIFEST_REINST
}
-# ============= Stage of creating the manifest of deletion in operation of packupgrade create command =============
-command_pkgs_packupgrade_create__manifest_delete ()
-{
- local PROGRAM_DEPENDS
- PROGRAM_DEPENDS='COMMAND_PACKUPGRADE_MANIFEST_REINST'
- _program_exec_restartable_loop_operation__routine ()
- {
- local origin
- origin=$1
- printf '%s\t%s\t%s\n' delete "$pkgname" "$origin" >> ${DBDIR}/command_packupgrade/etc/manifest.lst
- }
- _program_exec_and_record_completion__operation ()
- {
- message_section_title "Create manifest of deletion"
- program_exec_restartable_loop_operation command_packupgrade_delete
- message_echo
- }
- program_exec_and_record_completion COMMAND_PACKUPGRADE_MANIFEST_DELETE
-}
-
# ============= Stage of packing in operation of packupgrade create command =============
command_pkgs_packupgrade_create__pack ()
{
local dstdir
message_section_title "Packing for the upgrade at the target systems"
dstdir=${DBDIR}/command_packupgrade
+ cat "$dstdir/etc/manifest.lst.delete" "$dstdir/etc/manifest.lst.update" > $dstdir/etc/manifest.lst
install -m 444 "${DBDIR}"/WITH_PKGNG "${DBDIR}"/conf/complete_setup.sh "${DBDIR}"/conf/setenv.sh "$dstdir/etc"
install "${SHAREDIR}/bin/${APPNAME}-upgrade" "$dstdir"
install -d "$dstdir/lib/upgrade" "$dstdir/man/man8"
fi
# Preparation
command_pkgs_packupgrade_create__prepare
- # Create manifest of (re)installation and package archives
- command_pkgs_packupgrade_create__manifest_reinst
# Create manifest of deletion
command_pkgs_packupgrade_create__manifest_delete
+ # Create manifest of (re)installation and package archives
+ command_pkgs_packupgrade_create__manifest_reinst
# Packing for the upgrade at the target systems
command_pkgs_packupgrade_create__pack
}
[ -n "$COMMAND_SHOW_LEVEL" ] || COMMAND_SHOW_LEVEL=`options_get_dependency_level`
dbsuffix=$COMMAND_SHOW_DEPTAG.$COMMAND_SHOW_LEVEL
case $COMMAND_SHOW_SUBJECT in
- todo | done | redo | resolved | inst_by_pkg | inst_built_default | inst_built_custom | failure | taboo | freeze | need | noneed | deleted | restored | fossil |conflict )
+ todo | done | redo | resolved | inst_by_pkg | inst_built_default | inst_built_custom | failure | taboo | freeze | need | noneed | deleted | restored | fossil |conflict | moved )
database_query_show_single_list_exec "$COMMAND_SHOW_SUBJECT" \
"$COMMAND_SHOW_DEPTAG" "$COMMAND_SHOW_LEVEL" || :
;;
if [ `wc -l < ${TMPDIR}/moved.info` -eq 0 ]
then
fileedit_add_a_line_if_new "$origin" "${DBDIR}/obsolete_ports"
+ fileedit_rm_a_line "$origin" "${DBDIR}/moved_ports"
if [ -n "$recursedb_in" ]
then
message_echo "${DEPTH_INDEX} ===> Disappeared port (MOVED broken?)"
then
message_echo "${DEPTH_INDEX} ===> Moved to $origin_new at $date_moved because \"$why_moved\""
fileedit_add_a_line_if_new "$origin" "${TMPDIR}/database_build_convert_and_register_origin_if_obsolete:origins_old"
+ fileedit_add_a_line_if_new "$origin" "${DBDIR}/moved_ports"
+ fileedit_rm_a_line "$origin" "${DBDIR}/obsolete_ports"
database_build_convert_and_register_origin_if_obsolete "$origin_new" "${TMPDIR}/MOVED.DB" || return 1
else
message_echo "${DEPTH_INDEX} ===> Deleted at $date_moved because \"$why_moved\""
fileedit_add_a_line_if_new "$origin" "${DBDIR}/obsolete_ports"
+ fileedit_rm_a_line "$origin" "${DBDIR}/moved_ports"
return 1
fi
fi
inspected_level=`database_build_get_inspected_level "$origin_actual" "$origin_dependent"`
{
cat "${DBDIR}/ports.inspected.${inspected_level}.list" || :
+ cat "${DBDIR}/moved_ports" || :
cat "${DBDIR}/obsolete_ports" || :
} 2> /dev/null | grep -q -Fx "$origin_actual" || return
fileedit_rm_a_line "$origin" "${DBDIR}/stage.loop_list/ports_to_inspect.remain"
if ! grep -qFx "$origin" "${DBDIR}/done_required_ports_to_inspect" 2> /dev/null
then
fileedit_rm_a_line "$origin" "${DBDIR}/obsolete_ports"
+ fileedit_rm_a_line "$origin" "${DBDIR}/moved_ports"
dbpath=${DBDIR}/requires/$origin
dbpath_prev=${DBDIR}/prevset/requires/$origin
if [ ! -e "$dbpath/complete_as_node" ] || \
fileedit_rm_a_line "$origin" "${DBDIR}/ports.inspected.${level}.list"
done
fileedit_rm_a_line "$origin" "${DBDIR}/obsolete_ports"
+ fileedit_rm_a_line "$origin" "${DBDIR}/moved_ports"
fileedit_rm_a_line "$origin" "${DBDIR}/ports.inspected.list"
cat "${DBDIR}/replace/$origin/origin" 2> /dev/null || :
}
fileedit_exists_old_lines "$tmpfile_old" "$tmpfile_new"
}
+# ============= Show moved or replaced ports to alternatives =============
+database_query_show_list_moved ()
+{
+ cat "${DBDIR}/moved_ports" 2> /dev/null | while read origin
+ do
+ lastorigin=$origin
+ while [ -n "$lastorigin" -a -e "${DBDIR}/replace/$lastorigin/origin" ]
+ do
+ lastorigin=`cat "${DBDIR}/replace/$lastorigin/origin"`
+ done
+ [ -n "$lastorigin" ] || continue
+ pkg=
+ for table in $pkgnamedb
+ do
+ pkg=`cat "${DBDIR}/$table/$origin/pkgtag" 2> /dev/null` || :
+ [ -n "$pkg" ] && break
+ done
+ [ -n "$pkg" ] || pkg='not installed'
+ lastpkg=
+ for table in moved_from obsolete initial
+ do
+ lastpkg=`cat "${DBDIR}/$table/$lastorigin/pkgtag" 2> /dev/null` || :
+ [ -n "$lastpkg" ] && break
+ done
+ [ -n "$lastpkg" ] || lastpkg='not installed'
+ if [ $opt_batch_mode = no ]
+ then
+ echo "$origin ($pkg) => $lastorigin ($lastpkg)"
+ else
+ printf '%s\t%s\t%s\t%s\n' "$origin" "$pkg" "$lastorigin" "$lastpkg"
+ fi
+ done
+}
+
# ============= Actual operations of "show" command for a single list =============
database_query_show_single_list_exec ()
{
database_query_show_list_failed_conflicts_restoration
return
;;
+ moved )
+ message_echo "The following ports are moved/replaced to new alternatives:"
+ message_echo
+ database_query_show_list_moved
+ return
+ ;;
taboo )
message_echo "The following ports are registered as taboo:"
message_echo
MYVERSION=4.1.0
COMPATIBLE_VERSIONS='^(4\.[1]\.[0-9])$'
# Template for development versions
- MYVERSION=4.0.0+toward_4.1.0_20180912000219
+ MYVERSION=4.0.0+toward_4.1.0_20180912193809
COMPATIBLE_VERSIONS='^(4\.[0-1]\.[0-9]]|4\.[0]\.[0]+(|\+toward_4\.[0-1]\.[0-9]+_[0-9]+))$'
}
shift || :
fi
case $COMMAND_SHOW_SUBJECT in
- todo | done | redo | resolved | inst_by_pkg | inst_built_default | inst_built_custom | failure | taboo | freeze | need | noneed | restored | deleted | fossil | conflict )
+ todo | done | redo | resolved | inst_by_pkg | inst_built_default | inst_built_custom | failure | taboo | freeze | need | noneed | restored | deleted | fossil | conflict | moved )
_command_parse_args__chk_no_arg $#
;;
leaves | obsolete )
| show todo | show done | show resolved | show failure | show redo
| show inst_by_pkg | show inst_built_default | show inst_built_custom
| show taboo | show need | show noneed | show restored | show deleted
- | show fossil | show conflict
+ | show fossil | show conflict | show moved
| show build_conflict_pkgs | show inst_conflict_pkgs
| show leaves [selected | unselected] | show obsolete [selected | unselected]
| show requirements glob... | show dependents glob...
Conflicting ports which are temporarily deleted.
With \fB\-a\fR option, the first, second and third columns denote the flavored origin, initial/new/current package name, and opponent ports concatenated by comma, respectively.
.TP
+\fBmoved\fR
+Moved or replaced ports.
+With \fB\-a\fR option, the first, second, third and fourth columns denote the flavored initial origin, initial package name, flavored alternative origin and alternative package name, respectively.
+.TP
\fBbuild_conflict_pkgs\fR \fIglob\fR [\fIglob2\fR...]
Installed packages which conflict with ports matching \fIglob\fRs in the build.
The package names are listed in a single column.
.PP
[NEW] \fBauto\fR and \fBdestroy\fR commands are added to \fBportsreinstall\-chroot\fR(8).
.PP
-[NEW] \fBpkg\fR, \fBmake\fR, \fBshow build_conflict_pkgs\fR, \fBshow inst_conflict_pkgs\fR, \fBshow errormessage\fR, \fBshow inst_by_pkg\fR, \fBshow inst_built_default\fR, \fBshow inst_built_custom\fR, \fBshow fossil\fR, \fBshow leaves\fR and \fBshow obsolete\fR commands are added.
+[NEW] \fBpkg\fR, \fBmake\fR, \fBshow build_conflict_pkgs\fR, \fBshow inst_conflict_pkgs\fR, \fBshow errormessage\fR, \fBshow inst_by_pkg\fR, \fBshow inst_built_default\fR, \fBshow inst_built_custom\fR, \fBshow fossil\fR, \fBshow moved\fR, \fBshow leaves\fR and \fBshow obsolete\fR commands are added.
.PP
[NEW] Command \fBshow status\fR newly supports \fBinst_by_pkg\fR, \fBinst_built_default\fR, \fBinst_built_custom\fR and \fBfossil\fR.
.PP