Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 642402 - sys-power/iasl: fix hardcoded PREFIX ?= /usr
Summary: sys-power/iasl: fix hardcoded PREFIX ?= /usr
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2017-12-27 13:57 UTC by Pengcheng Xu
Modified: 2019-11-19 12:50 UTC (History)
4 users (show)

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


Attachments
iasl-usr-eprefix.patch (iasl-usr-eprefix.patch,422 bytes, patch)
2018-10-02 02:18 UTC, Pengcheng Xu
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pengcheng Xu 2017-12-27 13:57:14 UTC
The current way will break this on Gentoo Prefix. The current patch fixes this:

--- /tmp/iasl-20171215.ebuild   2017-12-27 21:55:24.939039543 +0800
+++ /Users/jsteward/Gentoo/usr/portage/sys-power/iasl/iasl-20171215.ebuild      2017-12-27 21:51:12.595668795 +0800
@@ -44,7 +44,7 @@

        find "${S}" -type f -name 'Makefile*' -print0 | \
                xargs -0 -I '{}' \
-               sed -r -e 's:-\<Werror\>::g' -i '{}' \
+               sed -r -e 's:-\<Werror\>::g' -e "s:/usr:${EPREFIX}/usr:g" -i '{}' \
                || die

        # BITS is tied to ARCH - please set appropriately if you add new keywords
@@ -90,8 +90,8 @@
                ebegin "Creating Test Tarball"
                tar -cjf "${tb}" -C "${ASLTSDIR}"/tmp/RESULTS .  || die "tar failed"
                eend $?
-               dodir /usr/share/${PF}
-               insinto /usr/share/${PF}
+               dodir "${EPREFIX}"/usr/share/${PF}
+               insinto "${EPREFIX}"/usr/share/${PF}
                doins ${tb}
        fi
Comment 1 Benda Xu gentoo-dev 2018-10-01 02:54:42 UTC
(In reply to Pengcheng Xu from comment #0)
> The current way will break this on Gentoo Prefix. The current patch fixes
> this:
> 
> --- /tmp/iasl-20171215.ebuild   2017-12-27 21:55:24.939039543 +0800
> +++ /Users/jsteward/Gentoo/usr/portage/sys-power/iasl/iasl-20171215.ebuild  
> 2017-12-27 21:51:12.595668795 +0800
> @@ -44,7 +44,7 @@
> 
>         find "${S}" -type f -name 'Makefile*' -print0 | \
>                 xargs -0 -I '{}' \
> -               sed -r -e 's:-\<Werror\>::g' -i '{}' \
> +               sed -r -e 's:-\<Werror\>::g' -e "s:/usr:${EPREFIX}/usr:g" -i
> '{}' \
>                 || die
> 
>         # BITS is tied to ARCH - please set appropriately if you add new
> keywords
> @@ -90,8 +90,8 @@
>                 ebegin "Creating Test Tarball"
>                 tar -cjf "${tb}" -C "${ASLTSDIR}"/tmp/RESULTS .  || die "tar
> failed"
>                 eend $?
> -               dodir /usr/share/${PF}
> -               insinto /usr/share/${PF}
> +               dodir "${EPREFIX}"/usr/share/${PF}
> +               insinto "${EPREFIX}"/usr/share/${PF}

ebuild helpers does not use preifixified directories.

Thanks!  Could you please upload the patch as an attachment?
Comment 2 Pengcheng Xu 2018-10-02 02:18:37 UTC
Created attachment 548786 [details, diff]
iasl-usr-eprefix.patch
Comment 3 Larry the Git Cow gentoo-dev 2019-11-19 12:50:53 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4674c955ea141bb74e94fb381be32c8072e66580

commit 4674c955ea141bb74e94fb381be32c8072e66580
Author:     Lars Wendler <polynomial-c@gentoo.org>
AuthorDate: 2019-11-19 12:50:33 +0000
Commit:     Lars Wendler <polynomial-c@gentoo.org>
CommitDate: 2019-11-19 12:50:47 +0000

    sys-power/iasl: Respect prefix
    
    Thanks-to: Pengcheng Xu <i@jsteward.moe>
    Closes: https://bugs.gentoo.org/642402
    Package-Manager: Portage-2.3.79, Repoman-2.3.18
    Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>

 sys-power/iasl/iasl-20190703.ebuild | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)