Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 335195 - sys-process/htop-0.8.3-r1 python script shebang fix
Summary: sys-process/htop-0.8.3-r1 python script shebang fix
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-30 07:00 UTC by Benda Xu
Modified: 2010-09-03 19:00 UTC (History)
1 user (show)

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


Attachments
python shebang fix (htop-0.8.3-r1.ebuild.patch,348 bytes, patch)
2010-08-30 07:01 UTC, Benda Xu
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benda Xu gentoo-dev 2010-08-30 07:00:33 UTC
${S}/scripts/MakeHeader.py contains a "#!/usr/bin/python" shebang, which may not exist (or too old)) on host system. We need to modify it into python in prefix.

Reproducible: Always

Steps to Reproduce:
1. delete /usr/bin/python
2. emerge htop


Expected Results:  
prefix building should not depend on external python.
Comment 1 Benda Xu gentoo-dev 2010-08-30 07:01:53 UTC
Created attachment 245315 [details, diff]
python shebang fix
Comment 2 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-08-31 18:38:34 UTC
(In reply to comment #1)
> Created an attachment (id=245315) [details]
> python shebang fix
> 

That is a useless use of cat. The concept is correct though. Adding maintainer for approval.
Comment 3 Benda Xu gentoo-dev 2010-09-01 02:50:49 UTC
(In reply to comment #2)

> 
> That is a useless use of cat. The concept is correct though. Adding maintainer
> for approval.
> 

So it's better to be written as

sed "s,!/usr,!${EPREFIX}/usr," ${S}/scripts/MakeHeader.py >\
        ${S}/scripts/MakeHeader.py

?
Comment 4 Fabian Groffen gentoo-dev 2010-09-01 07:15:19 UTC
I would actually just do
sed -i -e '1c\#!'"${EPREFIX}"'/usr/bin/python' \
    ${S}/scripts/MakeHeader.py
Comment 5 Fabian Groffen gentoo-dev 2010-09-03 19:00:21 UTC
fixed, thanks