From ea0ea68fce543e75a3e86c810b5b7a61884513ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Tue, 9 Oct 2018 10:12:13 +0200 Subject: sys-apps/personal-utils: improve emergefix Now it should rebuild on perl version update and it also rebuilds preserved packages. --- sys-apps/personal-utils/files/emergefix | 28 +++++++++++++++++----- .../personal-utils/personal-utils-1.5.4-r1.ebuild | 14 ----------- .../personal-utils/personal-utils-1.5.5-r1.ebuild | 14 +++++++++++ 3 files changed, 36 insertions(+), 20 deletions(-) delete mode 100644 sys-apps/personal-utils/personal-utils-1.5.4-r1.ebuild create mode 100644 sys-apps/personal-utils/personal-utils-1.5.5-r1.ebuild 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.4-r1.ebuild deleted file mode 100644 index 2cd5bcb..0000000 --- a/sys-apps/personal-utils/personal-utils-1.5.4-r1.ebuild +++ /dev/null @@ -1,14 +0,0 @@ -EAPI=7 - -DESCRIPTION="My simple personal system utilities" -HOMEPAGE="http://git.cynerd.cz/gentoo-personal-overlay/" -S="${WORKDIR}" - -LICENSE="GPL-3.0+" -SLOT="0" -KEYWORDS="amd64 x86" - -src_install() { - dosbin "${FILESDIR}/emergefix" - dosbin "${FILESDIR}/gentoo-mount" -} diff --git a/sys-apps/personal-utils/personal-utils-1.5.5-r1.ebuild b/sys-apps/personal-utils/personal-utils-1.5.5-r1.ebuild new file mode 100644 index 0000000..2cd5bcb --- /dev/null +++ b/sys-apps/personal-utils/personal-utils-1.5.5-r1.ebuild @@ -0,0 +1,14 @@ +EAPI=7 + +DESCRIPTION="My simple personal system utilities" +HOMEPAGE="http://git.cynerd.cz/gentoo-personal-overlay/" +S="${WORKDIR}" + +LICENSE="GPL-3.0+" +SLOT="0" +KEYWORDS="amd64 x86" + +src_install() { + dosbin "${FILESDIR}/emergefix" + dosbin "${FILESDIR}/gentoo-mount" +} -- cgit v1.2.3