cpt

Carbs Packaging Tools
git clone git://git.carbslinux.org/cpt
Log | Files | Refs | README | LICENSE

commit 1fe32892268fc20b5b924c327118b944dcb4989a
parent 3b64ad423b738cce7502ea19c4697d473e223116
Author: Cem Keylan <cem@ckyln.com>
Date:   Sun,  7 Feb 2021 13:03:57 +0300

as_root(): reflect rename: sls -> ssu

See https://github.com/illiliti/ssu/issues/2

sls is moved to the end of preference order, and will be removed at the
end of May. A deprecation notice is printed every time as_root is called
with sls.

Diffstat:
Msrc/cpt-lib.in | 11++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/cpt-lib.in b/src/cpt-lib.in @@ -423,7 +423,11 @@ as_root() { "$@" case ${su##*/} in - sls|sudo|doas) "$su" -u "$user" -- env "$@" ;; + sls) + warn "'sls' is deprecated, use 'ssu' instead." + "$su" -u "$user" -- env "$@" + ;; + ssu|sudo|doas) "$su" -u "$user" -- env "$@" ;; su) su -c "env $* <&3" "$user" 3<&0 </dev/tty ;; *) die "Invalid CPT_SU value: $su" ;; esac @@ -1979,9 +1983,10 @@ create_cache() { # Figure out which 'sudo' command to use based on the user's choice or # what is available on the system. - su=${CPT_SU:-$(command -v sls || + su=${CPT_SU:-$(command -v ssu || + command -v doas || command -v sudo || - command -v doas)} || su=su + command -v sls)} || su=su # Store the date and time of script invocation to be used as the name # of the log files the package manager creates uring builds.