Implement and document the NICE config option

Thanks to Joni Martikainen for the suggestion.

(While editing the NEWS file, I also moved the -r item to FEATURES
since, while legal, -r combos weren't useful and now they are, so I
guess it's more a featureling than a modification.)
This commit is contained in:
slakmagik 2011-05-29 18:00:54 +00:00
parent e3169d9cbe
commit 0da03f28ff
5 changed files with 44 additions and 6 deletions

View File

@ -30,6 +30,7 @@ CLEANUP=${CLEANUP:-NO}
DEBUG_UPDATES=${DEBUG_UPDATES:-0}
KEEPLOG=${KEEPLOG:-YES}
MKDIR_PROMPT=${MKDIR_PROMPT:-YES}
NICE=${NICE:-10}
REPO_BRANCH=${REPO_BRANCH:-13.37}
REPO_NAME=${REPO_NAME:-SBo}

View File

@ -10,6 +10,15 @@ sbopkg xxxVERSIONxxx (xxxDATExxx)
the feature request and some testing and to Mauro Giachero for
the initial patch and discussion and review of additional
patching.
* It is now possible to combine the -r flag with other flags
such that a sync is performed first. For example 'sbopkg -ri
foo' will synchronize with the repo and install the latest
foo.
* There is a new configuration option, NICE, which enables the
user to specify a niceness for the execution of the
SlackBuild. Previously, this was hardcoded to 10 (which is
still the default). Thanks to Joni Martikainen for the
suggestion.
MODIFICATIONS
@ -19,10 +28,6 @@ sbopkg xxxVERSIONxxx (xxxDATExxx)
* The 'Build' option in a package's info menu has been renamed
to 'Process', along with many other minor informational
changes throughout the UI.
* It is now possible to combine the -r flag with other flags
such that a sync is performed first. For example 'sbopkg -ri
foo' will synchronize with the repo and install the latest
foo.
sbopkg 0.35.0 (2011-04-28 02:48 UTC)

View File

@ -78,3 +78,4 @@ Thank you!
875 dmotaleite (suggestion)
894 Sergey V. (bash completion)
905 Kristoffer Karlsson (suggestion)
911 Joni Martikainen (suggestion)

View File

@ -222,6 +222,36 @@ The default assignment is:
\fCxxxMKDIR_PROMPTxxx\fP
.\"---------------------------------------------------------------------
.TP
.B NICE
Integer.
.IP
This value is passed to
.BR nice (1)
as its
.B \-n
argument.
.\" I had to 'hardcode' the default here to explain things so, while the
.\" 'The default assignment is' will be automatically updated, remember
.\" to also change this text if we ever set the niceness to something
.\" other than nice's default. (Not that we will.)
If this value is unset or left at the default,
.B sbopkg
will execute SlackBuilds with
.BR nice 's
default niceness, which is
.B 10.
If you do not wish the priority to be effected, be sure to set it to
.BR 0 .
Note that this only affects SlackBuild execution and does not affect the
priority of
.B sbopkg
as a whole.
.IP
The default assignment is:
.IP
\fCxxxNICExxx\fP
.\"---------------------------------------------------------------------
.TP
.B OUTPUT
Path.
.IP
@ -576,6 +606,7 @@ slakmagik
.SH SEE ALSO
.BR diff (1),
.BR mktemp (1),
.BR nice (1),
.BR rsync (1),
.BR sbopkg (8),
.BR uname (1),

View File

@ -3454,10 +3454,10 @@ build_package() {
# deleting too much or leaving garbage behind us), a nice
# approach is to use sbopkg's own temp directory.
export TMP=$SBOPKGTMP
nice sh $PKGNAME.SlackBuild.build
nice -n ${NICE:-10} sh $PKGNAME.SlackBuild.build
echo "Cleaning up..."
else
nice sh $PKGNAME.SlackBuild.build
nice -n ${NICE:-10} sh $PKGNAME.SlackBuild.build
fi
)
}