summaryrefslogtreecommitdiff
path: root/sys-apps
diff options
context:
space:
mode:
authorKarel Kočí <karel.koci@nic.cz>2018-10-09 10:12:13 +0200
committerKarel Kočí <karel.koci@nic.cz>2018-10-09 10:12:13 +0200
commitea0ea68fce543e75a3e86c810b5b7a61884513ef (patch)
treeb3d0848997e8e4b3aa155b8b04cffc2da6c4391f /sys-apps
parent6b1401b6507450bde60a49e3198d9a36346b3d1a (diff)
downloadgentoo-personal-overlay-ea0ea68fce543e75a3e86c810b5b7a61884513ef.tar.gz
gentoo-personal-overlay-ea0ea68fce543e75a3e86c810b5b7a61884513ef.tar.bz2
gentoo-personal-overlay-ea0ea68fce543e75a3e86c810b5b7a61884513ef.zip
sys-apps/personal-utils: improve emergefix
Now it should rebuild on perl version update and it also rebuilds preserved packages.
Diffstat (limited to 'sys-apps')
-rwxr-xr-xsys-apps/personal-utils/files/emergefix28
-rw-r--r--sys-apps/personal-utils/personal-utils-1.5.5-r1.ebuild (renamed from sys-apps/personal-utils/personal-utils-1.5.4-r1.ebuild)0
2 files changed, 22 insertions, 6 deletions
diff --git a/sys-apps/personal-utils/files/emergefix b/sys-apps/personal-utils/files/emergefix
index 8104342..56754bf 100755
--- a/sys-apps/personal-utils/files/emergefix
+++ b/sys-apps/personal-utils/files/emergefix
@@ -1,15 +1,31 @@
#!/bin/sh
set -e
-echo -e '\e[1;34m========== Update packages ==========\e[0m'
-emerge -auDN --with-bdeps=y --keep-going=y @world "$@" || {
+fail_ask() {
echo -ne "\e[1;31mContinue?\e[0m "
read
}
-echo -e '\e[1;34m========== Rebuil packages ==========\e[0m'
-revdep-rebuild -- "$@" || {
- echo -ne "\e[1;31mContinue?\e[0m "
- read
+
+get_perl_version() {
+ equery list -F '$version' dev-lang/perl
}
+
+#################################################################################
+perl_version="$(get_perl_version)"
+
+echo -e '\e[1;34m========== Update packages ==========\e[0m'
+emerge -auDN --with-bdeps=y --keep-going=y @world "$@" || fail_ask
+
+if [ "$(get_perl_version)" != "$perl_version" ]; then
+ echo -e '\e[1;34m========== Rebuil perl (cleaner) ==========\e[0m'
+ perl-cleaner --all -- -1a --keep-going=y || fail_ask
+fi
+
+echo -e '\e[1;34m========== Rebuil packages ==========\e[0m'
+revdep-rebuild -- "$@" || fail_ask
+
+echo -e '\e[1;34m========== Rebuild preserved ones ==========\e[0m'
+emerge --keep-going=y @preserved-rebuild || fail_ask
+
echo -e '\e[1;34m========== Clean packages ==========\e[0m'
emerge --depclean -a "$@"
diff --git a/sys-apps/personal-utils/personal-utils-1.5.4-r1.ebuild b/sys-apps/personal-utils/personal-utils-1.5.5-r1.ebuild
index 2cd5bcb..2cd5bcb 100644
--- a/sys-apps/personal-utils/personal-utils-1.5.4-r1.ebuild
+++ b/sys-apps/personal-utils/personal-utils-1.5.5-r1.ebuild