diff options
author | bill-auger <mr.j.spam.me@gmail.com> | 2022-09-28 06:59:00 -0400 |
---|---|---|
committer | bill-auger <mr.j.spam.me@gmail.com> | 2023-12-14 14:56:05 -0500 |
commit | a4bccfe224b86083ea1eafcf817627fbc6e0f955 (patch) | |
tree | d7739116953b6f2311114485636bd54e6df85068 | |
parent | afeddb6e0864a58f7306767376e04518b1ff8713 (diff) |
obsolete 'noop' and 'update' modes
-rwxr-xr-x | src/chroot-tools/librechroot | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/chroot-tools/librechroot b/src/chroot-tools/librechroot index 869bccb..d7cecea 100755 --- a/src/chroot-tools/librechroot +++ b/src/chroot-tools/librechroot @@ -224,8 +224,8 @@ mkarchroot() { readonly DEF_PACMANCONF_DIR=/usr/share/pacman/defaults readonly COMMANDS=( - noop make sync delete - install-file install-name update clean-pkgs + make sync delete + install-file install-name upgrade clean-pkgs run enter clean-repo help ) @@ -327,7 +327,7 @@ usage() { flag 'Commands (packages):' \ "install-file $(_ FILES...)" 'Like `pacman -U FILES...`' \ "install-name $(_ NAMES...)" 'Like `pacman -S NAMES...`' \ - 'update' 'Like `pacman -Syu`' \ + 'upgrade' 'Like `pacman -Syu`' \ 'clean-pkgs' 'Remove all packages from the working copy that are not in `base-devel`, $CHROOTEXTRAPKG, or in the depends array @@ -437,7 +437,7 @@ main() { usage return $EXIT_SUCCESS :;; - make|sync|delete|update|enter|clean-pkgs|clean-repo) + make|sync|delete|upgrade|enter|clean-pkgs|clean-repo) if [[ $# -gt 0 ]]; then ExitInvalidArgument "$(_ 'Command `%s` does not take any arguments: %s')" "$mode" "$*" fi @@ -469,6 +469,13 @@ main() { ExitInvalidArgument "$(_ 'Command `%s` requires at least one argument')" "$mode" fi :;; + # obsolete commands + noop) # `noop` was inprecise and redundant + ExitInvalidArgument "$(_ 'Command `noop` is obsolete. Use `make` instead.')" + :;; + update) # `update` was semantically incorrect + ExitInvalidArgument "$(_ 'Command `update` is obsolete. Use `upgrade` instead.')" + :;; esac if (( use_tmp_pacmanconf )) && \ ! [[ -f "${def_pacmanconf}" && -f "${def_makepkgconf}" ]]; then @@ -580,7 +587,7 @@ main() { case "$mode" in # Create/copy/delete - noop|make|sync) :;; + make|sync) :;; delete) if [[ -d $copydir ]]; then delete_chroot "$copydir" @@ -595,7 +602,7 @@ main() { install-name) chroot-run "$copydir" pacman -Sy --noconfirm -- "$@" </dev/null ;; - update) + upgrade) chroot-run "$copydir" pacman -Syu --noconfirm </dev/null ;; clean-pkgs) |