Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 478120

Summary: =app-i18n/ibus-anthy-1.5.0 - ERROR: app-i18n/ibus-anthy-1.5.0 failed (postinst phase): python_optimize is not to be used in pre/post* phases
Product: Gentoo Linux Reporter: Yuta SATOH <nigoro.dev>
Component: Current packagesAssignee: CJK Team <cjk>
Status: RESOLVED FIXED    
Severity: normal Keywords: PATCH
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: sample patch for ibus-anthy-1.5.0.ebuild

Description Yuta SATOH 2013-07-25 11:37:52 UTC
New python eclass can not contain python_optimize in pkg_postinst().

 * The new Python eclasses expect the compiled Python files to
 * be controlled by the Package Manager. For this reason,
 * the python_optimize function can be used only during src_* phases
 * (src_install most commonly) and not during pkg_* phases.
 * ERROR: app-i18n/ibus-anthy-1.5.0 failed (postinst phase):
 *   python_optimize is not to be used in pre/post* phases
 *
 * Call stack:
 *     ebuild.sh, line   93:  Called pkg_postinst
 *   environment, line 3211:  Called python_optimize
 *   environment, line 3693:  Called die
 * The specific snippet of code:
 *           die "python_optimize is not to be used in pre/post* phases";
 *
 * If you need support, post the output of `emerge --info '=app-i18n/ibus-anthy-1.5.0'`,


Reproducible: Always

Steps to Reproduce:
1. emerge =app-i18n/ibus-anthy-1.5.0
2.
3.
Comment 1 Yuta SATOH 2013-07-25 11:40:19 UTC
Created attachment 354162 [details, diff]
sample patch for ibus-anthy-1.5.0.ebuild

move python_optimize to src_install().
Comment 2 Naohiro Aota gentoo-dev 2013-07-28 10:58:02 UTC
fixed. Thank you for your catch.