--- /dev/null
+# Bash completion for upgrayyedd
+# Install e.g. as /etc/bash_completion.d/upgrayyedd
+
+_upgrayyedd()
+{
+ local cur prev cmd
+ COMPREPLY=()
+
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+ cmd=${COMP_WORDS[1]}
+
+ local commands='\
+check \
+sync ref refresh \
+daily all \
+world dup \
+wbdeps wbd \
+pkg in \
+skipkernel \
+preserved \
+wholeworld \
+search se \
+clean rm \
+checkclean \
+live \
+flatpaks \
+kernel-live kernel-gentoo kernel-llvm kernel-git kernel-server \
+clean-kernels \
+log unlog \
+testify'
+
+ # First argument: upgrayyedd subcommand.
+ if (( COMP_CWORD == 1 )); then
+ COMPREPLY=( $(compgen -W "$commands" -- "$cur") )
+ return 0
+ fi
+
+ # Commands which forward additional arguments to emerge. Do not restrict
+ # them here; let normal shell/file completion remain available.
+ case "$cmd" in
+ daily|all|world|dup|wbdeps|wbd|pkg|in|skipkernel|search|se|clean|rm|checkclean)
+ if [[ $cur == -* ]]; then
+ local emerge_opts='\
+--ask --verbose --update --deep --newuse --changed-use \
+--getbinpkg --usepkg --usepkgonly --keep-going \
+--with-bdeps --binpkg-changed-deps --exclude --oneshot \
+--pretend --tree --emptytree --nodeps --depclean --search'
+ COMPREPLY=( $(compgen -W "$emerge_opts" -- "$cur") )
+ else
+ COMPREPLY=( $(compgen -f -- "$cur") )
+ fi
+ return 0
+ ;;
+ esac
+
+ return 0
+}
+
+complete -F _upgrayyedd upgrayyedd
--- /dev/null
+# Fish completion for upgrayyedd
+# Install as ~/.config/fish/completions/upgrayyedd.fish
+
+# Do not fall back to file completion for the command selector itself.
+complete -c upgrayyedd -f
+
+function __upgrayyedd_no_command
+ test (count (commandline -opc)) -eq 1
+end
+
+# Commands / aliases
+complete -c upgrayyedd -n __upgrayyedd_no_command -a check -d 'Check for world updates'
+complete -c upgrayyedd -n __upgrayyedd_no_command -a 'sync ref refresh' -d 'Force synchronization of all repositories'
+complete -c upgrayyedd -n __upgrayyedd_no_command -a 'daily all' -d 'Sync enabled repositories and update world'
+complete -c upgrayyedd -n __upgrayyedd_no_command -a 'world dup' -d 'Update world without repository sync'
+complete -c upgrayyedd -n __upgrayyedd_no_command -a 'wbdeps wbd' -d 'Update world including build dependencies'
+complete -c upgrayyedd -n __upgrayyedd_no_command -a 'pkg in' -d 'Install packages'
+complete -c upgrayyedd -n __upgrayyedd_no_command -a skipkernel -d 'Update world except kernel packages'
+complete -c upgrayyedd -n __upgrayyedd_no_command -a preserved -d 'Rebuild preserved libraries'
+complete -c upgrayyedd -n __upgrayyedd_no_command -a wholeworld -d 'Rebuild world from scratch using all CPUs'
+complete -c upgrayyedd -n __upgrayyedd_no_command -a 'search se' -d 'Search packages'
+complete -c upgrayyedd -n __upgrayyedd_no_command -a 'clean rm' -d 'Depclean orphaned packages'
+complete -c upgrayyedd -n __upgrayyedd_no_command -a checkclean -d 'Show packages eligible for depclean'
+complete -c upgrayyedd -n __upgrayyedd_no_command -a live -d 'Update live packages'
+complete -c upgrayyedd -n __upgrayyedd_no_command -a flatpaks -d 'Update Flatpaks'
+complete -c upgrayyedd -n __upgrayyedd_no_command -a kernel-live -d 'Build current kernel tree/config'
+complete -c upgrayyedd -n __upgrayyedd_no_command -a kernel-gentoo -d 'Build gentoo kernel flavor'
+complete -c upgrayyedd -n __upgrayyedd_no_command -a kernel-llvm -d 'Build llvm kernel flavor'
+complete -c upgrayyedd -n __upgrayyedd_no_command -a kernel-git -d 'Build git kernel flavor'
+complete -c upgrayyedd -n __upgrayyedd_no_command -a kernel-server -d 'Build server kernel flavor'
+complete -c upgrayyedd -n __upgrayyedd_no_command -a clean-kernels -d 'Remove old kernels'
+complete -c upgrayyedd -n __upgrayyedd_no_command -a log -d 'Show recently emerged packages'
+complete -c upgrayyedd -n __upgrayyedd_no_command -a unlog -d 'Show recently unmerged packages'
+complete -c upgrayyedd -n __upgrayyedd_no_command -a testify -d 'Show build cgroup placement'
+
+# Common emerge options for commands forwarding arguments to emerge.
+function __upgrayyedd_emerge_command
+ set -l words (commandline -opc)
+ test (count $words) -ge 2; or return 1
+
+ switch $words[2]
+ case daily all world dup wbdeps wbd pkg in skipkernel search se clean rm checkclean
+ return 0
+ end
+
+ return 1
+end
+
+complete -c upgrayyedd -n __upgrayyedd_emerge_command -l ask -d 'Ask before performing actions'
+complete -c upgrayyedd -n __upgrayyedd_emerge_command -l verbose -d 'Verbose output'
+complete -c upgrayyedd -n __upgrayyedd_emerge_command -l update -d 'Update packages'
+complete -c upgrayyedd -n __upgrayyedd_emerge_command -l deep -d 'Consider dependencies deeply'
+complete -c upgrayyedd -n __upgrayyedd_emerge_command -l newuse -d 'Rebuild for USE flag changes'
+complete -c upgrayyedd -n __upgrayyedd_emerge_command -l changed-use -d 'Rebuild for changed USE flags'
+complete -c upgrayyedd -n __upgrayyedd_emerge_command -l getbinpkg -d 'Fetch binary packages'
+complete -c upgrayyedd -n __upgrayyedd_emerge_command -l usepkg -d 'Use binary packages when available'
+complete -c upgrayyedd -n __upgrayyedd_emerge_command -l usepkgonly -d 'Use only binary packages'
+complete -c upgrayyedd -n __upgrayyedd_emerge_command -l keep-going -d 'Continue after build failures'
+complete -c upgrayyedd -n __upgrayyedd_emerge_command -l with-bdeps -d 'Include build dependencies'
+complete -c upgrayyedd -n __upgrayyedd_emerge_command -l binpkg-changed-deps -d 'Respect changed binary package dependencies'
+complete -c upgrayyedd -n __upgrayyedd_emerge_command -l exclude -r -d 'Exclude package atom'
+complete -c upgrayyedd -n __upgrayyedd_emerge_command -l oneshot -d 'Do not add package to world set'
+complete -c upgrayyedd -n __upgrayyedd_emerge_command -l pretend -d 'Show what would be done'
+complete -c upgrayyedd -n __upgrayyedd_emerge_command -l tree -d 'Display dependency tree'
+complete -c upgrayyedd -n __upgrayyedd_emerge_command -l emptytree -d 'Rebuild dependency tree from scratch'
+complete -c upgrayyedd -n __upgrayyedd_emerge_command -l nodeps -d 'Ignore dependencies'
+++ /dev/null
-#!/usr/bin/env bash
-
-BUILD_CGROUP="/sys/fs/cgroup/openrc.portage-cgroup"
-KERNEL_SRC="/usr/src/linux"
-
-# ----- generic helpers -------------------------------------------------------
-
-die() {
- echo "Error: $*" >&2
- exit 1
-}
-
-root_check() {
- (( EUID == 0 )) || die "You have to run this script with sudo"
-}
-
-require_gentoo() {
- grep -qi 'gentoo' /etc/os-release ||
- die "Dieses System basiert nicht auf Gentoo"
-}
-
-# ----- build cgroup ----------------------------------------------------------
-
-check_build_cgroup() {
- [[ -d "$BUILD_CGROUP" ]] ||
- die "Build cgroup does not exist: $BUILD_CGROUP"
-
- [[ -w "$BUILD_CGROUP/cgroup.procs" ]] ||
- die "Cannot write to $BUILD_CGROUP/cgroup.procs"
-}
-
-enter_build_cgroup() {
- check_build_cgroup
-
- echo "$BASHPID" > "$BUILD_CGROUP/cgroup.procs" ||
- die "Could not enter build cgroup"
-}
-
-run_in_build_cgroup() {
- (
- enter_build_cgroup
- exec "$@"
- )
-}
-
-emerge_build() {
- run_in_build_cgroup \
- schedtool -D -e \
- /usr/bin/emerge "$@"
-}
-
-# ----- portage operations ---------------------------------------------------
-
-sync_all_repos() {
- emaint sync -A
-}
-
-sync_repos_auto() {
- emaint sync -a
-}
-
-update_world() {
- emerge_build -avuDNg @world "$@"
-}
-
-daily_update() {
- sync_repos_auto && update_world "$@"
-}
-
-update_world_with_bdeps() {
- emerge_build \
- -avuDNg \
- --with-bdeps=y \
- --binpkg-changed-deps=y \
- @world "$@"
-}
-
-# ----- kernel build ---------------------------------------------------------
-
-cd_to_src() {
- [[ -L "$KERNEL_SRC" ]] ||
- die "Symlink $KERNEL_SRC ist nicht gesetzt"
-
- [[ -f "$KERNEL_SRC/Makefile" ]] ||
- die "$KERNEL_SRC zeigt nicht auf einen gueltigen Kernel-Quellbaum"
-
- cd "$KERNEL_SRC" ||
- die "Verzeichniswechsel nach $KERNEL_SRC fehlgeschlagen"
-}
-
-prepare_config() {
- local flavor=$1
- local config="/usr/src/config-$flavor"
-
- [[ -f "$config" ]] ||
- die "Kernel config does not exist: $config"
-
- cp -- "$config" .config ||
- die "Kopieren von $config nach .config fehlgeschlagen"
-}
-
-print_version() {
- echo
- echo "Building version:"
- head -n 5 Makefile
- echo
-}
-
-build_timeout() {
- local key
- read -n 1 -s -r -p "Press any key to continue" key
- echo
-}
-
-build_kernel_in_cgroup() {
- (
- # Enter the build cgroup once. All make processes and their children
- # inherit the cpuset/resource limits from here on.
- enter_build_cgroup
-
- local jobs
- jobs=$(nproc) || exit 2
-
- echo "Using $jobs build jobs from the cgroup CPU set."
- echo
-
- schedtool -D -e make oldconfig || exit 2
- schedtool -D -e make modules_prepare || exit 2
- schedtool -D -e make -j"$jobs" || exit 2
- schedtool -D -e make modules_install || exit 2
- schedtool -D -e make install || exit 2
- )
-}
-
-kernel_build() {
- local flavor=${1:-live}
-
- root_check
- cd_to_src
-
- if [[ "$flavor" == "live" ]]; then
- [[ -f .config ]] ||
- die "No .config found in $KERNEL_SRC"
- else
- make mrproper ||
- die "make mrproper failed"
-
- prepare_config "$flavor"
- fi
-
- print_version
- build_timeout
-
- build_kernel_in_cgroup ||
- die "Kernel build failed"
-
- emerge_build -avuDNg @module-rebuild ||
- die "Module rebuild failed"
-
- echo
- echo "Build completed."
-
- if [[ "$flavor" != "live" ]]; then
- echo "Remember to upgrayyedd /usr/src/config-* if necessary."
- fi
-}
-
-# ----- main -----------------------------------------------------------------
-
-require_gentoo
-
-case "${1:-}" in
- check)
- /usr/bin/emerge -puDNg @world
- ;;
-
- sync|ref|refresh)
- root_check
- sync_all_repos
- ;;
-
- daily|all)
- root_check
- daily_update "${@:2}"
- ;;
-
- world|dup)
- root_check
- update_world "${@:2}"
- ;;
-
- wbdeps|wbd)
- root_check
- update_world_with_bdeps "${@:2}"
- ;;
-
- pkg|in)
- root_check
- emerge_build -avg "${@:2}"
- ;;
-
- skipkernel)
- root_check
- emerge_build \
- -avuDNg \
- @world \
- --exclude=dist-kernel \
- --exclude=gentoo-kernel \
- --exclude=gentoo-sources \
- --exclude=git-sources \
- "${@:2}"
- ;;
-
- preserved)
- root_check
- emerge_build -av @preserved-rebuild
- ;;
-
- wholeworld)
- root_check
-
- # Intentional exception: this is the only build path outside the
- # Portage cgroup. A full world rebuild may use all CPUs because the
- # machine is expected to be otherwise idle / running only TTYs.
- schedtool -B -e /usr/bin/emerge \
- -avuDeg \
- --with-bdeps=y \
- --usepkg=n \
- --binpkg-changed-deps=n \
- --keep-going=y \
- @world \
- --exclude="acct-group/* acct-user/* virtual/* app-eselect/* sys-kernel/* sys-firmware/* dev-python/* dev-java/* dev-ruby/* dev-perl/* dev-lua/* dev-php/* dev-tex/* dev-texlive/* x11-themes/* */*-bin"
- ;;
-
- search|se)
- /usr/bin/emerge --search "${@:2}"
- ;;
-
- clean|rm)
- root_check
- /usr/bin/emerge -a --depclean "${@:2}"
- ;;
-
- checkclean)
- /usr/bin/emerge -apv --depclean "${@:2}"
- ;;
-
- live)
- root_check
- emerge_build -av @live-rebuild
- ;;
-
- flatpaks)
- flatpak update
- ;;
-
- kernel-live)
- kernel_build live
- ;;
-
- kernel-gentoo)
- kernel_build gentoo
- ;;
-
- kernel-llvm)
- kernel_build llvm
- ;;
-
- kernel-git)
- kernel_build git
- ;;
-
- kernel-server)
- kernel_build server
- ;;
-
- clean-kernels)
- root_check
-
- echo "Relevant files in /boot:"
- echo
-
- command ls -1 \
- /boot/System.map* \
- /boot/initramfs* \
- /boot/vmlinuz* 2>/dev/null
-
- eclean-kernel -aA -L std
- ;;
-
- log)
- grep -i --color=auto "completed" /var/log/emerge.log
- echo "note: use 'date -d @[unixtime]' to convert the timestamp"
- ;;
-
- unlog)
- grep -i --color=auto "unmerging" /var/log/emerge.log
- echo "note: use 'date -d @[unixtime]' to convert the timestamp"
- ;;
-
- testify)
- root_check
-
- run_in_build_cgroup bash -c '
- echo "PID: $$"
- echo
- echo "cgroup:"
- cat /proc/$$/cgroup
- echo
- echo "allowed CPUs:"
- grep Cpus_allowed_list /proc/$$/status
- echo
- echo "nproc:"
- nproc
- '
- ;;
-
- *)
- cat <<'HELP'
-
-Currently available commands:
-
-sync | ref | refresh forcibly synchronize all repositories
-check check for updates
-search | se search packages
-all | daily sync enabled repositories and update world
-world | dup update world without repository sync
-wbdeps | wbd update world including build dependencies
-pkg | in install packages given as arguments
-skipkernel update world except kernel packages
-
-live update all live packages
-flatpaks update flatpaks
-
-wholeworld rebuild everything from scratch using all CPUs
-
-kernel-live build current kernel tree/config
-kernel-gentoo build kernel flavor: gentoo
-kernel-llvm build kernel flavor: llvm
-kernel-git build kernel flavor: git
-kernel-server build kernel flavor: server
-
-checkclean check for orphans
-clean | rm clean orphaned packages
-preserved rebuild preserved libraries
-clean-kernels remove old kernels
-
-log view recently emerged files
-unlog view recently unmerged files
-testify show build cgroup placement
-
-HELP
- ;;
-esac
--- /dev/null
+#!/usr/bin/env bash
+
+BUILD_CGROUP="/sys/fs/cgroup/openrc.portage-cgroup"
+KERNEL_SRC="/usr/src/linux"
+
+# ----- generic helpers -------------------------------------------------------
+
+die() {
+ echo "Error: $*" >&2
+ exit 1
+}
+
+root_check() {
+ (( EUID == 0 )) || die "You have to run this script with sudo"
+}
+
+require_gentoo() {
+ grep -qi 'gentoo' /etc/os-release ||
+ die "Dieses System basiert nicht auf Gentoo"
+}
+
+# ----- build cgroup ----------------------------------------------------------
+
+check_build_cgroup() {
+ [[ -d "$BUILD_CGROUP" ]] ||
+ die "Build cgroup does not exist: $BUILD_CGROUP"
+
+ [[ -w "$BUILD_CGROUP/cgroup.procs" ]] ||
+ die "Cannot write to $BUILD_CGROUP/cgroup.procs"
+}
+
+enter_build_cgroup() {
+ check_build_cgroup
+
+ echo "$BASHPID" > "$BUILD_CGROUP/cgroup.procs" ||
+ die "Could not enter build cgroup"
+}
+
+run_in_build_cgroup() {
+ (
+ enter_build_cgroup
+ exec "$@"
+ )
+}
+
+emerge_build() {
+ run_in_build_cgroup \
+ schedtool -D -e \
+ /usr/bin/emerge "$@"
+}
+
+# ----- portage operations ---------------------------------------------------
+
+sync_all_repos() {
+ emaint sync -A
+}
+
+sync_repos() {
+ emaint sync -a
+}
+
+update_world() {
+ emerge_build -avuDNg @world "$@"
+}
+
+daily_update() {
+ sync_repos && update_world "$@"
+}
+
+update_world_with_bdeps() {
+ emerge_build \
+ -avuDNg \
+ --with-bdeps=y \
+ --binpkg-changed-deps=y \
+ @world "$@"
+}
+
+# ----- kernel build ---------------------------------------------------------
+
+cd_to_src() {
+ [[ -L "$KERNEL_SRC" ]] ||
+ die "Symlink $KERNEL_SRC ist nicht gesetzt"
+
+ [[ -f "$KERNEL_SRC/Makefile" ]] ||
+ die "$KERNEL_SRC zeigt nicht auf einen gueltigen Kernel-Quellbaum"
+
+ cd "$KERNEL_SRC" ||
+ die "Verzeichniswechsel nach $KERNEL_SRC fehlgeschlagen"
+}
+
+prepare_config() {
+ local flavor=$1
+ local config="/usr/src/config-$flavor"
+
+ [[ -f "$config" ]] ||
+ die "Kernel config does not exist: $config"
+
+ cp -- "$config" .config ||
+ die "Kopieren von $config nach .config fehlgeschlagen"
+}
+
+print_version() {
+ echo
+ echo "Building version:"
+ head -n 5 Makefile
+ echo
+}
+
+build_timeout() {
+ local key
+ read -n 1 -s -r -p "Press any key to continue" key
+ echo
+}
+
+build_kernel_in_cgroup() {
+ (
+ # Enter the build cgroup once. All make processes and their children
+ # inherit the cpuset/resource limits from here on.
+ enter_build_cgroup
+
+ local jobs
+ jobs=$(nproc) || exit 2
+
+ echo "Using $jobs build jobs from the cgroup CPU set."
+ echo
+
+ schedtool -D -e make oldconfig || exit 2
+ schedtool -D -e make modules_prepare || exit 2
+ schedtool -D -e make -j"$jobs" || exit 2
+ schedtool -D -e make modules_install || exit 2
+ schedtool -D -e make install || exit 2
+ )
+}
+
+kernel_build() {
+ local flavor=${1:-live}
+
+ root_check
+ cd_to_src
+
+ if [[ "$flavor" == "live" ]]; then
+ [[ -f .config ]] ||
+ die "No .config found in $KERNEL_SRC"
+ else
+ make mrproper ||
+ die "make mrproper failed"
+
+ prepare_config "$flavor"
+ fi
+
+ print_version
+ build_timeout
+
+ build_kernel_in_cgroup ||
+ die "Kernel build failed"
+
+ emerge_build @module-rebuild ||
+ die "Module rebuild failed"
+
+ echo
+ echo "Build completed."
+
+ if [[ "$flavor" != "live" ]]; then
+ echo "Remember to upgrayyedd /usr/src/config-* if necessary."
+ fi
+}
+
+# ----- main -----------------------------------------------------------------
+
+require_gentoo
+
+case "${1:-}" in
+ check)
+ /usr/bin/emerge -puDNg @world
+ ;;
+
+ sync|ref|refresh)
+ root_check
+ sync_all_repos
+ ;;
+
+ daily|all)
+ root_check
+ daily_update "${@:2}"
+ ;;
+
+ world|dup)
+ root_check
+ update_world "${@:2}"
+ ;;
+
+ wbdeps|wbd)
+ root_check
+ update_world_with_bdeps "${@:2}"
+ ;;
+
+ pkg|in)
+ root_check
+ emerge_build -avg "${@:2}"
+ ;;
+
+ skipkernel)
+ root_check
+ emerge_build \
+ -avuDNg \
+ @world \
+ --exclude=dist-kernel \
+ --exclude=gentoo-kernel \
+ --exclude=gentoo-sources \
+ --exclude=git-sources \
+ "${@:2}"
+ ;;
+
+ preserved)
+ root_check
+ emerge_build -av @preserved-rebuild
+ ;;
+
+ wholeworld)
+ root_check
+
+ # Intentional exception: this is the only build path outside the
+ # Portage cgroup. A full world rebuild may use all CPUs because the
+ # machine is expected to be otherwise idle / running only TTYs.
+ schedtool -B -e /usr/bin/emerge \
+ -avuDeg \
+ --with-bdeps=y \
+ --usepkg=n \
+ --binpkg-changed-deps=n \
+ --keep-going=y \
+ @world \
+ --exclude="acct-group/* acct-user/* virtual/* app-eselect/* sys-kernel/* sys-firmware/* dev-python/* dev-java/* dev-ruby/* dev-perl/* dev-lua/* dev-php/* dev-tex/* dev-texlive/* x11-themes/* */*-bin"
+ ;;
+
+ search|se)
+ /usr/bin/emerge --search "${@:2}"
+ ;;
+
+ clean|rm)
+ root_check
+ /usr/bin/emerge -a --depclean "${@:2}"
+ ;;
+
+ checkclean)
+ /usr/bin/emerge -apv --depclean "${@:2}"
+ ;;
+
+ live)
+ root_check
+ emerge_build -av @live-rebuild
+ ;;
+
+ flatpaks)
+ flatpak update
+ ;;
+
+ kernel-live)
+ kernel_build live
+ ;;
+
+ kernel-gentoo)
+ kernel_build gentoo
+ ;;
+
+ kernel-llvm)
+ kernel_build llvm
+ ;;
+
+ kernel-git)
+ kernel_build git
+ ;;
+
+ kernel-server)
+ kernel_build server
+ ;;
+
+ clean-kernels)
+ root_check
+
+ echo "Relevant files in /boot:"
+ echo
+
+ command ls -1 \
+ /boot/System.map* \
+ /boot/initramfs* \
+ /boot/vmlinuz* 2>/dev/null
+
+ eclean-kernel -aA -L std
+ ;;
+
+ log)
+ grep -i "completed" /var/log/emerge.log |
+ while IFS=' ' read -r ts rest; do
+ printf '%s %s\n' "$(date -d "@${ts%:}" '+%Y-%m-%d %H:%M:%S')" "$rest"
+ done
+ ;;
+ unlog)
+ grep -i "unmerging" /var/log/emerge.log |
+ while IFS=' ' read -r ts rest; do
+ printf '%s %s\n' "$(date -d "@${ts%:}" '+%Y-%m-%d %H:%M:%S')" "$rest"
+ done
+ ;;
+
+ testify)
+ root_check
+
+ run_in_build_cgroup bash -c '
+ echo "PID: $$"
+ echo
+ echo "cgroup:"
+ cat /proc/$$/cgroup
+ echo
+ echo "allowed CPUs:"
+ grep Cpus_allowed_list /proc/$$/status
+ echo
+ echo "nproc:"
+ nproc
+ '
+ ;;
+
+ *)
+ cat <<'HELP'
+
+Currently available commands:
+
+sync | ref | refresh forcibly synchronize all repositories
+check check for updates
+search | se search packages
+all | daily sync enabled repositories and update world
+world | dup update world without repository sync
+wbdeps | wbd update world including build dependencies
+pkg | in install packages given as arguments
+skipkernel update world except kernel packages
+
+live update all live packages
+flatpaks update flatpaks
+
+wholeworld rebuild everything from scratch using all CPUs
+
+kernel-live build current kernel tree/config
+kernel-gentoo build kernel flavor: gentoo
+kernel-llvm build kernel flavor: llvm
+kernel-git build kernel flavor: git
+kernel-server build kernel flavor: server
+
+checkclean check for orphans
+clean | rm clean orphaned packages
+preserved rebuild preserved libraries
+clean-kernels remove old kernels
+
+log view recently emerged files
+unlog view recently unmerged files
+testify show build cgroup placement
+
+HELP
+ ;;
+esac