
quietemerge
This program is used to perform the emerge in Gentoo Linux with pretty output.
Gentoo Forum page
How it works
The script first checks if the emerge process will proceed properly, by
doing a emerge --pretend
. If the emerge process was successful, then the
script launches emerge via
emerge -q <rest of the command line options> 2>&1 > output_file &
The program then repeatedly checks the output of emerge in output_
file for
updates and accordingly provides an updated terminal output.
Usage
The script should be run simply as if you were running emerge. To facilitate a nice output as shown in the screenshot, it is
recommended to not use emerge options such as -c
, -C
,
--sync
. The script itself takes no arguments other than -h
or --help
and passes all the rest of the arguments to emerge.
If the script detects any unsupported arguments, then it simply executes emerge directly, bypassing all the other setup in the script.
This is a bash script and its compatibility with other shells is unknown.
It will definitely produce tons of errors if called as some other shell.
So you can either
1. make the script executable (chmod 755 quietemerge
) and then just run it as quietemerge
, or
1. run it as bash quietemerge
.
In order to temporarily override the settings present in the config file, prepend the variable with an underscore _
and provide it as an environment variable.
An example where I want to override the config file setting temporarily, and/or provide a temporary setting:
_DELAY=2 _MOUNT_TMPFS=1 quietemerge -a eselect
Examples
quietemerge -1 glibc vim
quietemerge --resume
quietemerge -auDvN --jobs=3 --load-average=4 --keep-going world
Download
You can download releases from Github at https://github.com/ppurka/quietemerge/releases
Installation
Copy the script to some directory which is in $PATH of root. Personally, I have it installed in /usr/local/bin.
Dependencies
Till version 20100407: The script depends on app-portage/genlop.
From version 20110422: No dependency on genlop.
Configuration
The script creates a configuration file $HOME/.config/quietemerge.config. It is not mandatory to modify that file,- I have tried to keep the defaults sane. However, if you want to mount tmpfs on to /var/tmp/portage or run your favourite config update utility after emerge is over, I would suggest looking at the configuration file.
zsh completion configuration
If you use zsh, then you can perform the following steps to enable command line autocompletion of quietemerge in zsh.
#
New instructions for zsh-completion
1. Install zsh-completion:
emerge zsh-completion
1. Add the following line to the beginning of your $HOME/.zshrc
[[ -f /etc/zsh/zprofile ]] && . /etc/zsh/zprofile
1. Enable the zsh completion:
echo "compdef quietemerge=emerge" >> $HOME/.zshrc
exec zsh
Old instructions for zsh-completion
1. Install zsh-completion:
emerge zsh-completion
1. Add the following line to the beginning of your $HOME/.zshrc
[[ -f /etc/zsh/zprofile ]] && . /etc/zsh/zprofile
1. Create a directory /etc/zsh/zsh-functions
1. Enable this new zsh completion path:
echo "fpath=( /etc/zsh/zsh-functions \$fpath )" >> /etc/zsh/zprofile
1. Copy _quietemerge to /etc/zsh/zsh-functions
1. Run the commands
env-update
exec zsh
Bash completion configuration
Command line completion of quietemerge in bash can be achieved by executing the following steps.
1. Install and configure gentoo-bashcomp
emerge gentoo-bashcomp
eselect bashcomp enable --global base
eselect bashcomp enable --global gentoo
1. Add the following two lines to the end of your $HOME/.bashrc
[[ -f /etc/profile.d/bash-completion.sh ]] && source /etc/profile.d/bash-completion.sh
complete -o filenames -F _emerge quietemerge
1. Run the command
exec bash