Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 526234 - app-arch/unp-2.0_pre7: fails to build because of wrong ${S}
Summary: app-arch/unp-2.0_pre7: fails to build because of wrong ${S}
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Hanno Böck
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-21 13:49 UTC by Michał Górny
Modified: 2014-11-14 15:18 UTC (History)
1 user (show)

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 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-10-21 13:49:50 UTC
>>> Install unp-2.0_pre7 into /tmp/portage/app-arch/unp-2.0_pre7/image/ category app-arch
!!! dobin: unp does not exist
dobin failed
 * ERROR: app-arch/unp-2.0_pre7::gentoo failed (install phase):
 *   dobin failed

This is because the implicit S=${WORKDIR} fallback takes effect and it looks for files in the wrong directory.

While at it, please bump the package to a modern EAPI. EAPI 5 would catch the error much sooner by stating openly that ${S} is incorrect.
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-10-21 13:54:45 UTC
Oh, sorry, I didn't notice the unstandard location of S= assignment. It's actually more fun than that -- it seems that sometimes bash performs '~' substitution into homedir. Using ${PV/_/\~} seems to fix that.
Comment 2 Hanno Böck gentoo-dev 2014-10-21 13:59:46 UTC
seems this is a behaviour change in bash 4.3.

bash 4.2:
export a="x"; echo "${a/x/~}"
~

bash 4.3:
export a="x"; echo "${a/x/~}"
/root

However here it gets tricky: using \~ breaks in bash 4.2. I don't have a smart idea yet how to make this portable to work in both 4.2/4.3.
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-10-21 14:13:16 UTC
The only trick that comes into my mind is making sure that tilde isn't first character of substituted string, i.e.:

  ${PV/0_/0~}

though that isn't very friendly. Maybe versionator.eclass...
Comment 4 Ulrich Müller gentoo-dev 2014-10-21 16:12:10 UTC
${PV/_/"~"} doesn't work?
Comment 5 Ulrich Müller gentoo-dev 2014-10-21 16:19:54 UTC
(In reply to Ulrich Müller from comment #4)
> ${PV/_/"~"} doesn't work?

Within double quotes and in bash-4.2 it doesn't, indeed.

${PV/a/$'\x7e'} then. :)
Comment 6 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-10-21 16:21:03 UTC
We should put my new version syntax proposal in EAPI 7 and then the package would be named 'unp-2.0~pre7', issue solved!
Comment 7 Ulrich Müller gentoo-dev 2014-10-21 16:21:50 UTC
(In reply to Ulrich Müller from comment #5)
> ${PV/a/$'\x7e'} then. :)

That should read ${PV/_/$'\x7e'} of course. Sorry for the bug spam.
Comment 8 Hanno Böck gentoo-dev 2014-11-14 15:18:09 UTC
the very latest upstream version is called unp~pre7+nmu1 which requires even more version number oddness. Have something working committed now. It's not nice, but it works (I considered just hardcoding the version number).

Hope this is done now, please re-open or open new bug if issues remain.