| Summary: | media-libs/qhull-2012.1-r1 - Installation of a symlink is blocked by a directory: '/usr/include/qhull' | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Yann Leprince <y> |
| Component: | [OLD] Library | Assignee: | Gentoo Science Mathematics related packages <sci-mathematics> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | dev-portage |
| Priority: | Normal | ||
| Version: | unspecified | ||
| Hardware: | AMD64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
|
Description
Yann Leprince
2012-09-14 10:41:18 UTC
Hi, thanks for your report, but I think this is not a bug, but just some old files still on your system. Please unmerge all versions of qhull and check if you still have a directory /usr/include/qhull. (you should not). If you still have one, then please check with equery b /usr/include/qhull if a package claims ownership. If not, it is safe to delete that directory. Please reopen if you still have problems after that procedure. Thanks. it reproducable here. emerge =qhull-2010* emerge =qhull-2012* and you get this bug. (In reply to comment #2) > it reproducable here. > > emerge =qhull-2010* > emerge =qhull-2012* > > and you get this bug. Hmm, is that a portage bug? Since > emerge =qhull-2010* > emerge -C qhull > emerge =qhull-2012* works I would think so. The problem seems to be that on this upgrade path /usr/include/qhull changes from a directoy to a symlink and the symlink. (In reply to comment #3) > Hmm, is that a portage bug? Since works I would think so. The problem seems > to be that on this upgrade path /usr/include/qhull changes from a directoy to a > symlink and the symlink. That's the intended behavior, since PMS forbids packages to replace directories with symlinks (see bug #326685). Normally, it bails out at the collision-protect phase, but I guess the user temporarily disable collision protection. You can use src_install and pkg_preinst to resolve the collision like this: src_install() { # remove symlink to avoid triggering collision-protect or protect-owned rm "${D}"/usr/include/qhull } pkg_preinst() { # remove directory in $ROOT that collides with symlink rm -rf "${ROOT}"usr/include/qhull # create symlink in $D to be merged where the directory was ln -s libqhull "${D}"/usr/include/qhull } (In reply to comment #4) > That's the intended behavior, since PMS forbids packages to replace > directories with symlinks (see bug #326685). Normally, it bails out at the > collision-protect phase, but I guess the user temporarily disable collision > protection. There are two separate things to consider: This package has two versions 2010 and 2012 say. When upgrading to version 2012, the directory /usr/include/qhull is moved to /usr/include/libqhull and for backwords compatibility a symlink is put in /usr/include/qhull. Appearently this is forbidden by PMS. Therefore I introduced pkg_preinst() { rm -rf "${ROOT}"usr/include/qhull } in qhull version 2012. Now, if a user tries to downgrade back to version 2010, they run into a collision protect situation. Your source install method will not prevent this. Therefore I used the same trick and added the same pkg_preinst to version one of the ebuild. It is a hack, but I don't see another way to comply with PMS here. I did the replacements in the stable versions since users who already installed this should not be affected. I did not touch qhull-3.1-r1 since that is EAPI=0. Downgrading from 2012 to this version is therefore not supported. |