As per specs: http://dev.gentoo.org/~ulm/pms/5/pms.html#x1-11700011 You cannot use it. Please fix. Reproducible: Always
pkg_preinst() { local f gnome2_pkg_preinst for f in ${unprotect_symlinks[@]}; do # $ROOT and $D, not $EROOT and $ED; $(python_get_sitedir) includes $EPREFIX einfo "Removing obsolete ${f} symlink" rm "${ROOT}${f}" mv "${D}${f}-${PVR}" "${D}${f}" || die done } You populate unprotect_symlinks in src_install and use it in pkg_preinst. This is totally wrong.
*** Bug 481682 has been marked as a duplicate of this bug. ***
Actually, my reading is like this: Variable | Legal in D | src_install D (continued) | pkg_preinst, pkg_postinst ROOT | pkg_* So I wonder were you picked that is was illegal ?
It is set in src_install(). Which is not called at all for binpkgs.
If I understand this correctly, this bug has *nothing* do to with D being illegal in pkg_preinst (and I am quite sure that D is legal in pkg_preinst). The real problem lies not with usage of D but with the usage of ROOT. Because the files that exist in ROOT during src_install (on the build machine) and during pkg_preinst (on the install machine for a binpkg) may be completely different. The unprotect_symlinks logic currently assumes that ROOT during src_install and pkg_preinst is the same filesystem - and that is a bad assumption.
Fixed by removing the code altogether. The alternatives symlinks were created by pygobject releases from several years ago, and we may as well drop support for upgrading from such old versions. +*pygobject-2.28.6-r54 (02 Oct 2013) + + 02 Oct 2013; Alexandre Rostovtsev <tetromino@gentoo.org> + +pygobject-2.28.6-r54.ebuild, + +files/pygobject-2.28.6-glib-2.36-class_init.patch: + Fix class interface setup to be compatible with glib-2.36. Remove old + alternatives symlink removal hack since it fails badly with binpkgs (bug + #459180, thanks to Fabio Erculiani).