Merge "Update portage only if needed"
This commit is contained in:
commit
a2d3d340d3
@ -79,7 +79,9 @@ eval set -- "${TEMP}"
|
|||||||
while true; do
|
while true; do
|
||||||
case "${1}" in
|
case "${1}" in
|
||||||
-u )
|
-u )
|
||||||
|
if [[ ! -f /usr/portage/profiles ]]; then
|
||||||
emerge-webrsync -q
|
emerge-webrsync -q
|
||||||
|
fi
|
||||||
install_gentoo_packages -uDNv --with-bdeps=y --jobs=2 @world
|
install_gentoo_packages -uDNv --with-bdeps=y --jobs=2 @world
|
||||||
install_gentoo_packages --verbose=n --depclean
|
install_gentoo_packages --verbose=n --depclean
|
||||||
install_gentoo_packages -v --usepkg=n @preserved-rebuild
|
install_gentoo_packages -v --usepkg=n @preserved-rebuild
|
||||||
@ -122,10 +124,14 @@ if [[ -z "${PKGS}" ]]; then
|
|||||||
echo "Not running install-packages ${ACTION} with empty packages list"
|
echo "Not running install-packages ${ACTION} with empty packages list"
|
||||||
else
|
else
|
||||||
if [[ "${ACTION}" == 'install' ]]; then
|
if [[ "${ACTION}" == 'install' ]]; then
|
||||||
|
if [[ ! -f /usr/portage/profiles ]]; then
|
||||||
emerge-webrsync -q
|
emerge-webrsync -q
|
||||||
|
fi
|
||||||
install_gentoo_packages -q --jobs=2 --changed-use "${PKGS}"
|
install_gentoo_packages -q --jobs=2 --changed-use "${PKGS}"
|
||||||
elif [[ "${ACTION}" == 'remove' ]]; then
|
elif [[ "${ACTION}" == 'remove' ]]; then
|
||||||
|
if [[ ! -f /usr/portage/profiles ]]; then
|
||||||
emerge-webrsync -q
|
emerge-webrsync -q
|
||||||
|
fi
|
||||||
install_gentoo_packages -C "${PKGS}"
|
install_gentoo_packages -C "${PKGS}"
|
||||||
else
|
else
|
||||||
echo 'something when really wrong, install action is not install or remove'
|
echo 'something when really wrong, install action is not install or remove'
|
||||||
|
Loading…
Reference in New Issue
Block a user