Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 459180 - dev-python/pygobject:2: illegal D usage in pkg_preinst, breaks binpkgs
Summary: dev-python/pygobject:2: illegal D usage in pkg_preinst, breaks binpkgs
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal major (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL: http://bugs.sabayon.org/show_bug.cgi?...
Whiteboard:
Keywords: NeedPatch
: 481682 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-02-25 17:43 UTC by Fabio Erculiani (RETIRED)
Modified: 2013-10-02 17:17 UTC (History)
2 users (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 Fabio Erculiani (RETIRED) gentoo-dev 2013-02-25 17:43:44 UTC
As per specs: http://dev.gentoo.org/~ulm/pms/5/pms.html#x1-11700011
You cannot use it.
Please fix.

Reproducible: Always
Comment 1 Fabio Erculiani (RETIRED) gentoo-dev 2013-02-25 17:45:25 UTC
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.
Comment 2 Gilles Dartiguelongue (RETIRED) gentoo-dev 2013-08-25 16:17:56 UTC
*** Bug 481682 has been marked as a duplicate of this bug. ***
Comment 3 Gilles Dartiguelongue (RETIRED) gentoo-dev 2013-09-08 18:02:02 UTC
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 ?
Comment 4 Fabio Erculiani (RETIRED) gentoo-dev 2013-09-08 18:05:45 UTC
It is set in src_install().
Which is not called at all for binpkgs.
Comment 5 Alexandre Rostovtsev (RETIRED) gentoo-dev 2013-09-08 19:01:00 UTC
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.
Comment 6 Alexandre Rostovtsev (RETIRED) gentoo-dev 2013-10-02 17:17:29 UTC
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).