Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

app-text/ghostscript-gpl: fix double PREFIX-ing bug reinstroduced in -r2, add quotes #4419

Closed
wants to merge 2 commits into from
Closed

app-text/ghostscript-gpl: fix double PREFIX-ing bug reinstroduced in -r2, add quotes #4419

wants to merge 2 commits into from

Conversation

mmokrejs
Copy link
Contributor

No description provided.

@gentoo-repo-qa-bot gentoo-repo-qa-bot added the assigned PR successfully assigned to the package maintainer(s). label Apr 13, 2017
@gentoo-repo-qa-bot
Copy link
Collaborator

Pull Request assignment

Areas affected: ebuilds
Packages affected: app-text/ghostscript-gpl

app-text/ghostscript-gpl: @gentoo/printing

@@ -226,7 +226,7 @@ src_install() {
mv "${ED}/usr/share/ghostscript/${PVM}/Resource/Init/cidfmap"{,.GS} || die

# install our own cidfmap to handle CJK fonts
insinto /usr/share/ghostscript/${PVM}/Resource/Init
insinto "/usr/share/ghostscript/${PVM}/Resource/Init"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you quote it here…

@@ -236,7 +236,7 @@ src_install() {
fi
done

# install the CMaps from poppler-data properly, bug #409361
# install the CMaps from poppler-data properly, bug #409361 but avoid double PREFIX-ing
dosym /usr/share/poppler/cMaps /usr/share/ghostscript/${PVM}/Resource/CMap
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

…but not here?

# install the CMaps from poppler-data properly, bug #409361
dosym "${EPREFIX}/usr/share/poppler/cMaps" "/usr/share/ghostscript/${PVM}/Resource/CMap"
# install the CMaps from poppler-data properly, bug #409361 but avoid double PREFIX-ing
dosym "/usr/share/poppler/cMaps" "/usr/share/ghostscript/${PVM}/Resource/CMap"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you saying that dosym automatically prepends EPREFIX to the first argument? This doesn't look good.

However, in this particular case I think it'd be much better to create a relative symlinks. Could you make the patch do that instead? If you see any more absolute symlinks in the ebuild, feel free to update them as well.

…-r2, add quotes

Add missing quote. Emphasize some eclass is indeed adding ${EPREFIX} to all
dosym/dobin/dodoc, etc. commands otherwise we get two EPREFIXes prepended.
Manually we only need to prepend in e.g. mv "${ED}/usr/share/ghostscript/...
Stick to existing symlinks done in eclass.

Package-Manager: Portage-2.3.5, Repoman-2.3.2
@mgorny
Copy link
Member

mgorny commented Apr 19, 2017

This is a bug in Portage and we'll fix it there.

@mgorny mgorny closed this Apr 19, 2017
@mmokrejs
Copy link
Contributor Author

OK, please let me know when the fix lands into Gentoo::RAP tree.

@mgorny
Copy link
Member

mgorny commented Apr 19, 2017

Could you test the following Portage patch? I don't have any Prefix installs, and it should fix the issue you're experiencing.

https://archives.gentoo.org/gentoo-portage-dev/message/1f53040a5e4709d1654b549d2d3fac1d

@mmokrejs
Copy link
Contributor Author

mmokrejs commented Apr 19, 2017

Weird, I just re-synced and re-tested with ghostscript-gpl-9.20-r2.ebuild and I see /apps/gentoo/usr/lib64/portage/python2.7/ebuild-helpers/dosym still unpatched (just to emphasize the above patch would apply as expected). However, I cannot reproduce the problem. Were other changes in the code-base meanwhile? Please check what Gentoo::RAP overrides in some eclasses. I think you will be faster in installing your own instance, follow https://wiki.gentoo.org/wiki/Prefix/libc . It is just 4-5 commands to be executed. It is simple for you.

@mmokrejs
Copy link
Contributor Author

mmokrejs commented Apr 20, 2017

I am quite sure emerge was exiting with "double prefix error message" in the case of ghostscript-gpl-9.20-r2.ebuild. Anyway I was mainly undoing a change between -r1 and -r2. Although the hard-error is now not triggered I could reproduce at least a QA issue which I did not mention in patch description. The QA message also shows a doubled PREFIX in the path. You can see it here.

>>> Installing (1 of 1) app-text/ghostscript-gpl-9.20-r2::gentoo
 * QA Notice: Symbolic link /apps/gentoo/usr/share/ghostscript/9.20/Resource/CMap points to /apps/gentoo/apps/gentoo/usr/share/poppler/cMaps which does not exist.

And, your patch https://archives.gentoo.org/gentoo-portage-dev/message/1f53040a5e4709d1654b549d2d3fac1d fixes this problem.

>>> Installing (1 of 1) app-text/ghostscript-gpl-9.20-r2::gentoo

 * Messages for package app-text/ghostscript-gpl-9.20-r2:

 * Running elibtoolize in: ghostscript-9.20/ijs/
 *   We've already been run in this tree; you should
 *   avoid this if possible (perhaps by filing a bug)
>>> Auto-cleaning packages...
$ ls -altr /apps/gentoo/usr/share/ghostscript/9.20/Resource/CMap 
lrwxrwxrwx 1 mmokrejs mmokrejs 36 Apr 20 10:28 /apps/gentoo/usr/share/ghostscript/9.20/Resource/CMap -> /apps/gentoo/usr/share/poppler/cMaps
$ ls -altr /apps/gentoo/usr/share/poppler/cMaps
total 12
drwxr-xr-x 7 mmokrejs mmokrejs   85 Jan  6 23:46 ..
lrwxrwxrwx 1 mmokrejs mmokrejs   31 Jan  9 03:01 Adobe-CNS1-0 -> ../cMap/Adobe-CNS1/Adobe-CNS1-0
lrwxrwxrwx 1 mmokrejs mmokrejs   31 Jan  9 03:01 Adobe-CNS1-1 -> ../cMap/Adobe-CNS1/Adobe-CNS1-1
lrwxrwxrwx 1 mmokrejs mmokrejs   31 Jan  9 03:01 Adobe-CNS1-2 -> ../cMap/Adobe-CNS1/Adobe-CNS1-2
lrwxrwxrwx 1 mmokrejs mmokrejs   31 Jan  9 03:01 Adobe-CNS1-3 -> ../cMap/Adobe-CNS1/Adobe-CNS1-3
lrwxrwxrwx 1 mmokrejs mmokrejs   31 Jan  9 03:01 Adobe-CNS1-4 -> ../cMap/Adobe-CNS1/Adobe-CNS1-4
lrwxrwxrwx 1 mmokrejs mmokrejs   31 Jan  9 03:01 Adobe-CNS1-5 -> ../cMap/Adobe-CNS1/Adobe-CNS1-5
lrwxrwxrwx 1 mmokrejs mmokrejs   31 Jan  9 03:01 Adobe-CNS1-6 -> ../cMap/Adobe-CNS1/Adobe-CNS1-6
lrwxrwxrwx 1 mmokrejs mmokrejs   34 Jan  9 03:01 Adobe-CNS1-B5pc -> ../cMap/Adobe-CNS1/Adobe-CNS1-B5pc
lrwxrwxrwx 1 mmokrejs mmokrejs   37 Jan  9 03:01 Adobe-CNS1-ETen-B5 -> ../cMap/Adobe-CNS1/Adobe-CNS1-ETen-B5
lrwxrwxrwx 1 mmokrejs mmokrejs   35 Jan  9 03:01 Adobe-CNS1-H-CID -> ../cMap/Adobe-CNS1/Adobe-CNS1-H-CID
lrwxrwxrwx 1 mmokrejs mmokrejs   36 Jan  9 03:01 Adobe-CNS1-H-Host -> ../cMap/Adobe-CNS1/Adobe-CNS1-H-Host
...

So I can confirm your patch is helpful anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assigned PR successfully assigned to the package maintainer(s).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants