From 9a6971368f246cb02c354c89de050a7c148dcfab Mon Sep 17 00:00:00 2001 From: Mamoru Sakaue / MwGhennndo Date: Fri, 14 Sep 2018 13:10:45 +0900 Subject: [PATCH] Added option -g to portsreinstall-chroot. Changes to be committed: modified: HISTORY modified: lib/chroot/libcommand_do.sh modified: lib/chroot/liboptions.sh modified: lib/chroot/libusage.sh modified: man/portsreinstall-chroot.8 --- HISTORY | 2 +- lib/chroot/libcommand_do.sh | 6 ++++-- lib/chroot/liboptions.sh | 1 + lib/chroot/libusage.sh | 1 + man/portsreinstall-chroot.8 | 7 +++++++ 5 files changed, 14 insertions(+), 3 deletions(-) diff --git a/HISTORY b/HISTORY index f4daa8b..4d31d83 100644 --- a/HISTORY +++ b/HISTORY @@ -1,7 +1,7 @@ 4.1.0 (?? September 2018) [NEW] Options -j and -x are added. [NEW] Option -J is added to the all utilities. -[NEW] Options -f and -s are added to portsreinstall-chroot(8). +[NEW] Options -f, -g and -s are added to portsreinstall-chroot(8). [NEW] auto and destroy commands are added to portsreinstall-chroot(8). [NEW] pkg, make, show build_conflict_pkgs, show inst_conflict_pkgs, show errormessage, show inst_by_pkg, show inst_built_default, show inst_built_custom, show fossil, show moved, show leaves and show obsolete commands are added. [NEW] Command show status newly supports inst_by_pkg, inst_built_default, inst_built_custom and fossil. diff --git a/lib/chroot/libcommand_do.sh b/lib/chroot/libcommand_do.sh index e38ef21..7022f70 100644 --- a/lib/chroot/libcommand_do.sh +++ b/lib/chroot/libcommand_do.sh @@ -257,12 +257,14 @@ command_do_main_init_resinst () PROGRAM_DEPENDS='STARTER_GUEST_CLEAN' _program_exec_and_record_completion__operation () { - local exitstatus + local opts opt_smart [ $opt_fullcourse = no ] && return message_section_title "Full course main: Initiate the reinstallation process" opts= [ $opt_batch_mode = yes ] && opts='-Ya' - chroot "$opt_basedir"/builder /usr/bin/env ${PROGRAM} -SJCGjqx $opts + opt_smart= + [ $opt_upgraded_system = no ] && opt_smart='-q' + chroot "$opt_basedir"/builder /usr/bin/env ${PROGRAM} -SJCGjx $opts $opt_smart message_echo } program_exec_and_record_completion STARTER_GUEST_INIT_REINST diff --git a/lib/chroot/liboptions.sh b/lib/chroot/liboptions.sh index a167011..16c50bb 100644 --- a/lib/chroot/liboptions.sh +++ b/lib/chroot/liboptions.sh @@ -35,6 +35,7 @@ c suppress-clean-obsolete-database opt_suppress_obsolete_db_clean no yes d invalidate-mount-privilege opt_invalidate_mount_privilege no yes e extra-dirs opt_extra_dirs '' : f fullcourse opt_fullcourse no yes +g upgraded-system opt_upgraded_system no yes p load-pkgtoolsconf-as-default opt_load_pkgtoolsconf undef default P load-pkgtoolsconf-as-override opt_load_pkgtoolsconf undef override Q ignore-pkgtoolsconf opt_load_pkgtoolsconf undef no diff --git a/lib/chroot/libusage.sh b/lib/chroot/libusage.sh index fd7629f..c6189a5 100644 --- a/lib/chroot/libusage.sh +++ b/lib/chroot/libusage.sh @@ -29,6 +29,7 @@ USAGE: portsreinstall-chroot [OPTIONS] [--] [command] -d : Forcibly invalidate the privilege of mounting/unmounting file systems. -e dir[,dir2[,...]] : Extra directories to mount for the chroot environment. -f : Full course mode. + -g : Adjust all operations as post-processes after system upgrade. -P : Import settings from pkgtools.conf(5) as the secondary if exists. -p : Import settings from pkgtools.conf(5) as the primary if exists (default). -Q : Ignore pkgtools.conf(5) even if it exists. diff --git a/man/portsreinstall-chroot.8 b/man/portsreinstall-chroot.8 index 7d13937..62eb872 100644 --- a/man/portsreinstall-chroot.8 +++ b/man/portsreinstall-chroot.8 @@ -199,6 +199,13 @@ Carry out the \fBdo\fR process as the "full course" automatic mode where update Resuming \fBdo\fR command automatically executes \fBportsreinstall\fR(8) in the builder \fBchroot\fR(8) environment. With \fB\-a\fR option, the all detected leaf and obsolete packages will be deleted. .PD +.IP \fB\-g\fR +.PD 0 +.TP +\fB\-\-upgraded\-system\fR +Adjust the all operations to be suitable as post-processes after system upgrade. +Concretely, the full course mode is adjusted to reinstall the all ports by removing \fB\-q\fR option of \fBportsreinstall\fR(8). +.PD .IP \fB\-P\fR .PD 0 .TP -- 2.11.0