Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 334271 - QA shebang complaints on Cygwin or "//home/..." is an invalid path
Summary: QA shebang complaints on Cygwin or "//home/..." is an invalid path
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: x86 Other
: High normal (vote)
Assignee: Gentoo Prefix
URL: http://portage.prefix.freens.org/pref...
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2010-08-24 11:44 UTC by Al
Modified: 2010-09-05 19:45 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 Al 2010-08-24 11:44:46 UTC
While bootstrapping on Cygwin emerge dies due to QA concerns in from portage/bin/misc-function.sh




Reproducible: Always

Steps to Reproduce:
Bootstrap on Cygwin. Run emerge something.
Actual Results:  
"*** has explicit EPREFIX in shebang but target not found ***"
"QA Notice: the following files use invalid (possible non-prefixed) shebangs:"
"Aborting due to QA concerns: invalid shebangs found"




For Cygwin a path that starts with a double slash differs from one that starts with a single slash. "//home/user/gentoo/bin/bash" is not found. 

Reason is line 645 of the Prefix patched misc-functions.sh:

-------------------------------------------------------------------
# does the shebang start with ${EPREFIX}, and does it exist?
if [[ ${line[0]} == ${EPREFIX}/* ]] ; then
  if [[ ! -e ${ROOT}${line[0]} && ! -e ${D}${line[0]} ]] ; then
    # hmm, refers explicitly to $EPREFIX, but doesn't exist,
    # if it's in PATH that's wrong in any case
-------------------------------------------------------------------

where ${ROOT} is "/" and ${line[0]} "/home/user/gentoo/bin/bash".

Workaround: Strip ${ROOT} from that line temporarly.

Remark: It has been reported that the blocker for bootstrapping on Cygwin is the .exe postfix on executables. I can't confirm that. This is rather one of the problems if tools can't be addressed.
Comment 1 Fabian Groffen gentoo-dev 2010-08-24 11:49:08 UTC
Ok, I see, ${ROOT%/} is probably the right thing to use here.  Same for ${D}, should be ${D%/}.  (We know that ${line[0]} starts with a forward slash here due to the test before.)
Comment 2 Fabian Groffen gentoo-dev 2010-09-02 19:40:10 UTC
committed the fix, can't release at the moment due to the very broken state of prefix portage in git.
Comment 3 Fabian Groffen gentoo-dev 2010-09-05 19:45:47 UTC
released in portage-2.2.01.16270