Skip to content

Commit

Permalink
Merge pull request #7 from petronio/add_no_module_rebuild_arg
Browse files Browse the repository at this point in the history
Add flag to prevent automatically rebuilding external modules
  • Loading branch information
sakaki- authored Apr 27, 2019
2 parents 2819f9c + ea73088 commit fe73880
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
13 changes: 10 additions & 3 deletions genup
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ shopt -s nullglob

# ********************** variables *********************
PROGNAME="$(basename "${0}")"
VERSION="1.0.21"
VERSION="1.0.22"
ETCPROFILE="/etc/profile"
UPDATERSDIR="/etc/${PROGNAME}/updaters.d"
RED_TEXT="" GREEN_TEXT="" YELLOW_TEXT="" RESET_ATTS="" ALERT_TEXT=""
Expand Down Expand Up @@ -90,6 +90,7 @@ declare -i ARG_NO_PERL_CLEANER=0
declare -i ARG_NO_EIX_SYNC=0 ARG_ALERT=0
declare -i ARG_IGNORE_REQUIRED_CHANGES=0 ARG_NO_CUSTOM_UPDATERS=0
declare -i ARG_NO_EIX_METADATA_UPDATE=0 ARG_NO_NOCACHE=0
declare -i ARG_NO_MODULE_REBUILD=0
declare -i ADJUSTMENT=19
# force TERM if none found (e.g. when running from cron)
# otherwise mach builds (firefox etc.) will fail
Expand Down Expand Up @@ -323,6 +324,9 @@ update_all_packages_in_world_set_and_dependencies() {
fi
}
rebuild_external_modules_if_necessary() {
if ((ARG_NO_MODULE_REBUILD==1)); then
return
fi
show "Creating any necessary external modules (e.g., VirtualBox)..."
# exclude packages ending in '-bin'... by convention, these are binary
# packages which means they aren't going to rebuild anything
Expand Down Expand Up @@ -582,10 +586,12 @@ Options:
-m, --no-eix-metadata-update
don't attempt to update eix metadata at the
completion of the run
-M, --no-module-rebuild
don't attempt to rebuild external modules
-n, --no-kernel-upgrade
do not attempt to run buildkernel (implied if
buildkernel USE flag has not been set)
-N, --no--nocache do not attempt to use nocache with eix-sync, even
-N, --no-nocache do not attempt to use nocache with eix-sync, even
when the nocache USE flag has been set
-p, --no-perl-cleaner do not attempt to run perl-cleaner
-r, --adjustment=N add integer N to the build niceness -20<=N<=19
Expand Down Expand Up @@ -664,7 +670,7 @@ process_command_line_options() {
declare -i RC
set +e
# error trapping off, as we want to handle errors
TEMP="$(getopt -o aAb:cCde:EhikmnNpr:SvVx: --long ask,alert,buildkernel-args:,dispatch-conf,no-custom-updaters,deploy-from-staging,emerge-args:,no-emtee,help,ignore-required-changes,keep-old-distfiles,no-eix-metadata-update,no-kernel-upgrade,no-nocache,no-perl-cleaner,adjustment:,no-eix-sync,verbose,version,eix-sync-args: -n "${PROGNAME}" -- "${@}")"
TEMP="$(getopt -o aAb:cCde:EhikmMnNpr:SvVx: --long ask,alert,buildkernel-args:,dispatch-conf,no-custom-updaters,deploy-from-staging,emerge-args:,no-emtee,help,ignore-required-changes,keep-old-distfiles,no-eix-metadata-update,no-module-rebuild,no-kernel-upgrade,no-nocache,no-perl-cleaner,adjustment:,no-eix-sync,verbose,version,eix-sync-args: -n "${PROGNAME}" -- "${@}")"
RC="${?}"
set -e
if ((RC!=0)); then
Expand Down Expand Up @@ -695,6 +701,7 @@ process_command_line_options() {
-i|--ignore-required-changes) ARG_IGNORE_REQUIRED_CHANGES=1 ; shift ;;
-k|--keep-old-distfiles) ARG_KEEP_OLD_DISTFILES=1 ; shift ;;
-m|--no-eix-metadata-update) ARG_NO_EIX_METADATA_UPDATE=1 ; shift ;;
-M|--no-module-rebuild) ARG_NO_MODULE_REBUILD=1 ; shift ;;
-n|--no-kernel-upgrade) ARG_NO_KERNEL_UPGRADE=1 ; shift ;;
-N|--no-nocache) ARG_NO_NOCACHE=1 ; shift ;;
-p|--no-perl-cleaner) ARG_NO_PERL_CLEANER=1 ; shift ;;
Expand Down
5 changes: 4 additions & 1 deletion genup.8
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH GENUP 8 "Version 1.0.21: April 2019"
.TH GENUP 8 "Version 1.0.22: April 2019"
.SH NAME
genup \- update Portage tree, all installed packages, and kernel
.SH SYNOPSIS
Expand Down Expand Up @@ -209,6 +209,9 @@ Do not perform an update of the \fBeix\fR metadata at the end-of-run (NB, specif
this may cause odd results to be reported when using the \fBeix\fR tool
subsequently).
.TP
.BR \-M ", " \-\-no\-module\-rebuild
Do not attempt to rebuild external modules by default.
.TP
.BR \-n ", " \-\-no\-kernel\-upgrade
Do not perform (in non-interactive mode) or offer to perform (in interactive
mode) a kernel recompile, even should a newer version be available.
Expand Down

0 comments on commit fe73880

Please sign in to comment.