Skip to content

Commit

Permalink
Fix bug "-x" option with "-dd" ("-RR") option.
Browse files Browse the repository at this point in the history
  • Loading branch information
kdeguchi committed Jan 1, 2023
1 parent cc17613 commit f2c5c0a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions pkg_replace.1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.\" $Id: pkg_replace.1,v 1.2 2007/01/25 12:25:56 securedog Exp $
.\"
.\" Modified by Ken DEGUCHI (December 28, 2022)"
.Dd December 28, 2022
.\" Modified by Ken DEGUCHI (January 1, 2023)"
.Dd January 1, 2023
.Dt PKG_REPLACE 1
.Os
.Sh NAME
Expand Down
10 changes: 5 additions & 5 deletions pkg_replace.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# - Cleanup Code


PKG_REPLACE_VERSION=20221228
PKG_REPLACE_VERSION=20230101
PKG_REPLACE_CONFIG=FreeBSD

usage() {
Expand Down Expand Up @@ -241,7 +241,7 @@ parse_options() {

istrue ${opt_batch} && opt_config=0
istrue ${opt_batch} && opt_force_config=0
istrue ${opt_depends} && opt_omit_check=0
#istrue ${opt_depends} && opt_omit_check=0
istrue ${opt_force_config} && opt_config=0
istrue ${opt_omit_check} && opt_keep_going=1

Expand Down Expand Up @@ -1556,12 +1556,14 @@ main() {
fi

[ ${opt_depends} -ge 2 ] &&
warn "'-dd' or '-RR' option set, this mode is slow!" &&
info "'-dd' or '-RR' option set, this mode is slow!" &&
create_dir ${PKG_REPLACE_DB_DIR}


parse_args ${1+"$@"}

istrue ${opt_omit_check} || istrue ${opt_version} || pkg_sort ${upgrade_pkgs}

if ! isempty ${opt_exclude}; then
ARGV=
for ARG in ${install_pkgs}; do
Expand Down Expand Up @@ -1614,8 +1616,6 @@ main() {
set_signal_exit='show_result; write_result "${opt_result}"; istrue ${opt_cleandeps} && remove_dir "${PKG_REPLACE_DB_DIR}"; clean_tmpdir'
set_signal_handlers

istrue ${opt_omit_check} || pkg_sort ${upgrade_pkgs}

# check installed package
for X in ${upgrade_pkgs}; do
get_installed_pkgname $X 2>&1 > /dev/null || {
Expand Down

0 comments on commit f2c5c0a

Please sign in to comment.