Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 669852 - =sys-devel/multilib-gcc-wrapper-0-r2: assumes trailing slash for ${ROOT} (EAPI=7)
Summary: =sys-devel/multilib-gcc-wrapper-0-r2: assumes trailing slash for ${ROOT} (EAP...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Michał Górny
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2018-10-28 12:04 UTC by Sergei Trofimovich (RETIRED)
Modified: 2018-11-01 10:01 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sergei Trofimovich (RETIRED) gentoo-dev 2018-10-28 12:04:00 UTC
Susupicious code:
  $ cat sys-devel/multilib-gcc-wrapper/multilib-gcc-wrapper-0-r2.ebuild

  EAPI=7
  ...
  pkg_postinst() {
        if [[ ${ROOT} == / && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then
                eselect compiler-shadow update all
        fi
  }

  pkg_postrm() {
        if [[ ${ROOT} == / && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then
                eselect compiler-shadow clean all
        fi
  }

does not seem to trigger symlink regeneration when installed.

Example fix to make it work again:

--- a/sys-devel/multilib-gcc-wrapper/multilib-gcc-wrapper-0-r2.ebuild
+++ b/sys-devel/multilib-gcc-wrapper/multilib-gcc-wrapper-0-r2.ebuild
@@ -61 +61 @@ pkg_postinst() {
-       if [[ ${ROOT} == / && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then
+       if [[ ${ROOT:-/} == / && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then
@@ -67 +67 @@ pkg_postrm() {
-       if [[ ${ROOT} == / && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then
+       if [[ ${ROOT:-/} == / && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then
Comment 1 Larry the Git Cow gentoo-dev 2018-11-01 10:01:32 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=98de4c1ba726c5ea67eb53847ee7998864e8d4a2

commit 98de4c1ba726c5ea67eb53847ee7998864e8d4a2
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2018-11-01 09:52:48 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2018-11-01 10:01:24 +0000

    sys-devel/multilib-gcc-wrapper: Fix EROOT in EAPI 7
    
    Closes: https://bugs.gentoo.org/669852
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 sys-devel/multilib-gcc-wrapper/multilib-gcc-wrapper-0-r2.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)