* Messages for package net-libs/webkit-gtk-2.4.9-r200: * ERROR: net-libs/webkit-gtk-2.4.9-r200::gentoo failed (pretend phase): * You need at least GCC 4.7.x or Clang >= 3.3 for C++11-specific compiler flags This happens when I try to install previously-built webkit-gtk binary package. And it happens because Portage restores old value of CXX which is no longer valid. I'd say two bugs here. @gnome faulting at checking compiler flags during binary package install, and @dev-portage for restoring old values of CXX and other configuration variables for pkg_pretend().
(In reply to Michał Górny from comment #0) > @dev-portage for restoring old values of CXX and > other configuration variables for pkg_pretend(). We could define a list of special environment variables somewhere, for compatibility between package managers.
(In reply to Zac Medico from comment #1) > (In reply to Michał Górny from comment #0) > > @dev-portage for restoring old values of CXX and > > other configuration variables for pkg_pretend(). > > We could define a list of special environment variables somewhere, for > compatibility between package managers. https://projects.gentoo.org/pms/5/pms.html#x1-12200011.2 "Note: pkg_pretend is not part of the normal call sequence, and does not take part in environment saving."
(In reply to Ulrich Müller from comment #2) > (In reply to Zac Medico from comment #1) > > (In reply to Michał Górny from comment #0) > > > @dev-portage for restoring old values of CXX and > > > other configuration variables for pkg_pretend(). > > > > We could define a list of special environment variables somewhere, for > > compatibility between package managers. > > https://projects.gentoo.org/pms/5/pms.html#x1-12200011.2 > "Note: pkg_pretend is not part of the normal call sequence, and does not > take part in environment saving." But for binary packages, it makes sense to call the pkg_pretend function _from_ the saved build-time environment, since the ebuilds/eclasses that the binary package was built with might not even be available when pkg_pretend is executed. Since pkg_pretend originates from a saved environment, doesn't if follow that some of the environment variables might also come from the saved environment?
(In reply to Zac Medico from comment #3) > (In reply to Ulrich Müller from comment #2) > > https://projects.gentoo.org/pms/5/pms.html#x1-12200011.2 > > "Note: pkg_pretend is not part of the normal call sequence, and does not > > take part in environment saving." > > But for binary packages, it makes sense to call the pkg_pretend function > _from_ the saved build-time environment, since the ebuilds/eclasses that the > binary package was built with might not even be available when pkg_pretend > is executed. Since pkg_pretend originates from a saved environment, doesn't > if follow that some of the environment variables might also come from the > saved environment? No objections to this interpretation. The problem is with the ebuild, which shouldn't rely on any particular state of the environment (i.e. being saved, or not being saved) in pkg_pretend().
A condition like [[ ${MERGE_TYPE} != binary ]] might be useful in the webkit-gtk pkg_pretend.
Do we need to clarify the spec? "Note: pkg_pretend is not part of the normal call sequence, and does not take part in environment saving. For binary packages, variables in pkg_pretend may have a value that was assigned previously in the build sequence; ebuilds must not rely on this."
The spec is supposed not to cover binary packages, so I'm not sure if it's the right thing to mention problems with Portage implementation of them. If at all, I would go for something like 'you can't rely on environment variables having any sane values'.
Thanks, that was an obvious mistake in our ebuild, should be fixed now. Reassigning remaining half of the issue to portage, since I don't thing there is anything left for gnome to do :) + 26 Jul 2015; Alexandre Rostovtsev <tetromino@gentoo.org> + webkit-gtk-2.4.8.ebuild, webkit-gtk-2.4.8-r200.ebuild, + webkit-gtk-2.4.9.ebuild, webkit-gtk-2.4.9-r200.ebuild, + webkit-gtk-2.6.5.ebuild, webkit-gtk-2.6.6.ebuild, webkit-gtk-2.8.3.ebuild: + Don't check for c++11 support in pkg_pretend when installing binpkg (bug + #555374, thanks to Michał Górny). Check for disk space in pkg_setup under + the same conditions as in pkg_pretend (this logic was accidentally dropped in + the 2.6.x bump).