OSDN Git Service

[BUG FIX] Adding packages sometimes failed due to lack of required packages.
authorMamoru Sakaue / MwGhennndo <glmwghennndo@users.sourceforge.jp>
Sat, 11 Aug 2018 10:58:32 +0000 (18:58 +0800)
committerMamoru Sakaue / MwGhennndo <glmwghennndo@users.sourceforge.jp>
Sat, 11 Aug 2018 10:58:32 +0000 (18:58 +0800)
Some parts of comments and the man page about the full build dependencies are modofied.

 Changes to be committed:
modified:   lib/chroot/libcommand.sh
modified:   lib/libdatabase_build.sh
modified:   lib/libmain.sh
modified:   lib/libpkgsys.sh
modified:   lib/upgrade/libcommand.sh
modified:   man/portsreinstall.8

lib/chroot/libcommand.sh
lib/libdatabase_build.sh
lib/libmain.sh
lib/libpkgsys.sh
lib/upgrade/libcommand.sh
man/portsreinstall.8

index e83bf6b..4cdb52f 100644 (file)
@@ -58,10 +58,13 @@ command_all_parse_args ()
                COMMAND_RESTART=$COMMAND_MODE
                misc_chk_privilege
                ;;
-       do | mount | unmount | enter | sync | options )
+       do | mount | unmount | enter | sync )
                misc_chk_privilege
                _command_parse_args__chk_no_arg $#
                ;;
+       options )
+               _command_parse_args__chk_no_arg $#
+               ;;
        *)
                message_echo "ERROR: Invalid command [$COMMAND_MODE]." >&2
                exit 1
index fa25c46..d938ced 100644 (file)
@@ -919,6 +919,9 @@ database_build_get_complete_recursive_dependency ()
                mkdir -p "$tmpdstpath"
                database_build_filter_ignored_requirements "$origin" < $srcfile | while read origin_requirement
                do
+                       # TODO: Reinstallation of the full build-time requirements triggers the need of reinstallation.
+                       # TODO: But the least requirements of build are the direct build-time requirements and the full run-time requirements of the direct build-time requirements.
+                       # TODO: The current implementation about full build-time requirements lacks the rationality.
                        database_build_get_complete_recursive_dependency "$tag" "$origin_requirement" "$suffix" \
                                > $tmppath.recursive_dependency
                        [ -e "$dbpath/ignored_requirements.filter" ] && \
index c2ab442..fba76fc 100644 (file)
@@ -12,7 +12,7 @@ main_set_version ()
        MYVERSION=4.1.0
        COMPATIBLE_VERSIONS='^(4\.[0-1]\.[0-9])$'
        # Template for development versions
-       MYVERSION=4.0.0+toward_4.1.0_20180810231854
+       MYVERSION=4.0.0+toward_4.1.0_20180811185627
        COMPATIBLE_VERSIONS='^(4\.[0-1]\.[0-9]]|4\.[0]\.[0]+(|\+toward_4\.[0-1]\.[0-9]+_[0-9]+))$'
 }
 
index b9fabbd..6c34e75 100644 (file)
@@ -520,9 +520,11 @@ pkgsys_def_pkgtools ()
                                return 1
                        fi
                }
-               pkg_add_f ()
+               pkg_add_f_common ()
                {
-                       local pkgarc pkg pkg_tool pkg_gen opt_add opt_quit dev_out dev_err
+                       local option pkgarc pkg pkg_tool pkg_gen opt_add opt_quit dev_out dev_err
+                       option=$1
+                       shift || :
                        pkg_tool=
                        pkg_gen=
                        for pkgarc in "$@"
@@ -551,12 +553,16 @@ pkgsys_def_pkgtools ()
                                        dev_out=/dev/null
                                        dev_err=/dev/null
                                fi
-                               ( cd "${TMPDIR}/pkg_add_f" && ln -s $pkg_gen && env ASSUME_ALWAYS_YES=YES pkg add $opt_quit $opt_add * > $dev_out 2> $dev_err )
+                               ( cd "${TMPDIR}/pkg_add_f" && ln -s $pkg_gen && env ASSUME_ALWAYS_YES=YES pkg add -M $option $opt_quit $opt_add * > $dev_out 2> $dev_err )
                        fi
                }
                pkg_add_fF ()
                {
-                       pkg_add_f "$@"
+                       pkg_add_f_common '' "$@"
+               }
+               pkg_add_fF ()
+               {
+                       pkg_add_f_common '-f' "$@"
                }
                pkg_inst_verify_pkg ()
                {
@@ -599,7 +605,7 @@ pkgsys_def_pkgtools ()
                                dev_out=/dev/null
                                dev_err=/dev/null
                        fi
-                       ( cd "${TMPDIR}/pkg_inst_remote" && ln -s "$pkgarc" && env ASSUME_ALWAYS_YES=YES pkg add $opt_quit $opt_add * > $dev_out 2> $dev_err )
+                       ( cd "${TMPDIR}/pkg_inst_remote" && ln -s "$pkgarc" && env ASSUME_ALWAYS_YES=YES pkg add -fM $opt_quit $opt_add * > $dev_out 2> $dev_err )
                }
                pkg_inst_wild_verify_pkg ()
                {
index aac003c..6b123a5 100644 (file)
@@ -26,7 +26,11 @@ command_all_parse_args ()
                esac
                _command_parse_args__chk_no_arg $#
                ;;
-       do | options )
+       do )
+               misc_chk_privilege
+               _command_parse_args__chk_no_arg $#
+               ;;
+       options )
                _command_parse_args__chk_no_arg $#
                ;;
        *)
index 54a7048..71dd517 100644 (file)
@@ -440,6 +440,7 @@ This option conflicts with \fB\-I\fR.
 \fB\-\-exclude\-runtime\-dependencies\fR
 Exclude run\-time dependencies in evaluation of dependencies.
 This option affects behaviors of \fB\-t\fR, \fB\-T\fR and \fB\-q\fR options.
+Use of this option should be just for temporary diagnosis or salvage because the full-run-time requirements are needed for building a port in principle.
 .PD
 .IP \fB\-b\fR
 .PD 0
@@ -447,6 +448,7 @@ This option affects behaviors of \fB\-t\fR, \fB\-T\fR and \fB\-q\fR options.
 \fB\-\-include\-buildtime\-dependencies\fR
 Include build\-time dependencies in evaluation of dependencies.
 This option affects behaviors of \fB\-t\fR, \fB\-T\fR and \fB\-q\fR options.
+Use of this option will result in installation of the all build-time requirements regardless of the actual necessity for upgrade of installed packages.
 .PD
 .IP \fB\-C\fR
 .PD 0
@@ -598,6 +600,7 @@ Without \fB\-i\fR option, target ports must be already installed or inspected.
 Without \fB\-o\fR option, the temporary database is maintained to have complete data on dependencies of all installed and necessary ports.
 Combination with options \fB\-T\fR and \fB\-t\fR is available.
 The behavior can be modified by \fB\-B\fR, \fB\-b\fR, \fB\-i\fR and \fB\-o\fR options.
+Use of this option should be just for temporary diagnosis or salvage.
 .PD
 .IP \fB\-o\fR
 .PD 0
@@ -611,6 +614,7 @@ If given with \fB\-t\fR, targets themselves, their already-inspected dependents
 Ports outside of the scopes are kept untouched even if they are updated.
 It is noted that this option disables detection and deinstallation of new leaf ports.
 This option will be useful for quick upgrades or new installation (only) before complete construction of the temporary database for the all installed ports.
+Use of this option should be just for temporary diagnosis or salvage.
 .PD
 .IP \fB\-T\fR\ \fIglob1\fR[\fB:\fIglob2\fR[\fB:\fR...]]
 .PD 0
@@ -624,6 +628,7 @@ Without \fB\-i\fR option, target ports must be already installed or inspected.
 Without \fB\-o\fR option, the temporary database is maintained to have complete data on dependencies of all installed and necessary ports.
 Combination with options \fB\-T\fR and \fB\-t\fR is available.
 The behavior can be modified by \fB\-B\fR, \fB\-b\fR, \fB\-i\fR and \fB\-o\fR options.
+Use of this option should be just for temporary diagnosis or salvage.
 .PD
 .IP \fB\-t\fR\ \fIglob1\fR[\fB:\fIglob2\fR[\fB:\fR...]]
 .PD 0
@@ -637,6 +642,7 @@ Without \fB\-i\fR option, target ports must be already installed or inspected.
 Without \fB\-o\fR option, the temporary database is maintained to have complete data on dependencies of all installed and necessary ports.
 Combination with options \fB\-T\fR and \fB\-t\fR is available.
 The behavior can be modified by \fB\-B\fR, \fB\-b\fR, \fB\-i\fR and \fB\-o\fR options.
+Use of this option should be just for temporary diagnosis or salvage.
 .PD
 .SS Group 6: Saved and transferred to restarted runs, renewable by \-L option
 Option settings in this group are saved at the first \fBdo\fR or \fBprepare\fR run, and transferred to the following runs.
@@ -1131,6 +1137,8 @@ Configuration file of \fBportupgrade\fR(1).
 .PP
 [IMPROVED] The batch mode is made more quiet typically about the output of package tools and make.
 .PP
+[BUG FIX] Adding packages sometimes failed due to lack of required packages.
+.PP
 [BUG FIX] \fBreset\fR command discarded the information of the initially installed packages.
 .PP
 [BUG FIX] Dependency inspection might have terminated with error when obsolete ports exist.