Ticket #544 (closed defect: worksforme)
Value of default-scope variable is not preserved to pkg_postinst
| Reported by: | ulm | Owned by: | ciaranm |
|---|---|---|---|
| Priority: | Sometime | Milestone: | |
| Component: | core/paludis | Version: | 0.26.0_alpha13 |
| Keywords: | Cc: | ||
| Blocked By: | Blocking: | ||
| Distribution: |
Description
The value of a default-scope variable (set in src_unpack) is not preserved. It is void in pkg_postinst.
The concrete case is emacs-cvs-23.0.60-!r2.ebuild, variable FULL_VERSION. It is set in src_unpack, still available in src_install, but no longer in pkg_postinst.
PMS says in 11.2, The state of variables between functions: "Exported and default scope variables are saved between functions. A non-local variable set in a function earlier in the call sequence must have its value preserved for later functions, including functions executed as part of a later uninstall. Variables that were exported must remain exported in later functions; variables with default visibility may retain default visibility or be exported."
(And it also works in Portage, even for installation of a binpkg.)
