Skip to content

Commit

Permalink
app-portage/cfg-update: fix ROOT check in pkg_postinst
Browse files Browse the repository at this point in the history
With EAPI 7+, ROOT and others will be blank (not /).

Signed-off-by: Sam James <[email protected]>
  • Loading branch information
thesamesam committed Apr 22, 2022
1 parent 1d46cd3 commit ebabb03
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 1999-2021 Gentoo Authors
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8
Expand All @@ -22,7 +22,7 @@ RDEPEND="
S="${WORKDIR}/rich0-cfg-update-2f10786"

pkg_prerm() {
if [[ ${ROOT} == / ]]
if [[ -z ${ROOT} ]]
then
ebegin "Disabling portage hook"
cfg-update --ebuild --disable-portage-hook
Expand Down Expand Up @@ -80,7 +80,7 @@ pkg_postinst() {
echo
fi

if [[ ${ROOT} == / ]]
if [[ -z ${ROOT} ]]
then
ebegin "Moving backups to /var/lib/cfg-update/backups"
/usr/bin/cfg-update --ebuild --move-backups
Expand Down

0 comments on commit ebabb03

Please sign in to comment.