Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 405299 - app-portage/mirrorselect fails on postinst/postrm phases on python3-only setup
Summary: app-portage/mirrorselect fails on postinst/postrm phases on python3-only setup
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-22 16:47 UTC by Ben Kohler
Modified: 2012-02-25 19:32 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 Ben Kohler gentoo-dev 2012-02-22 16:47:07 UTC
New stage3's do (on x86 now) or will (on other arches later this week) have only python-3.1.4 installed & active.  app-portage/mirrorselect (all versions currently in the tree) seems to make some assumptions about python-2 so there are failures.

Reproducible: Always

Steps to Reproduce:
1.  unpack stage3-i686-20120221.tar.bz2, chroot, etc per handbook
2.  emerge mirrorselect
Actual Results:  
Calculating dependencies  
 * IMPORTANT: 2 news items need reading for repository 'gentoo'.
 * Use eselect news to read news items.

... done!

>>> Verifying ebuild manifests

>>> Emerging (1 of 1) app-portage/mirrorselect-2.1.0-r3
openpty failed: 'out of pty devices'
 * mirrorselect-2.1.0.tar.bz2 RMD160 SHA1 SHA256 size ;-) ...            [ ok ]
>>> Unpacking source...
>>> Unpacking mirrorselect-2.1.0.tar.bz2 to /var/tmp/portage/app-portage/mirrorselect-2.1.0-r3/work
>>> Source unpacked in /var/tmp/portage/app-portage/mirrorselect-2.1.0-r3/work
>>> Preparing source in /var/tmp/portage/app-portage/mirrorselect-2.1.0-r3/work/mirrorselect-2.1.0 ...
 * Applying 0001-Fix-rsync-mirror-selectection.patch ...
 [ ok ]
 * Applying 0002-Check-for-a-valid-mirrorselect-test-file.patch ...
 [ ok ]
 * Converting shebang in 'main.py'
 * Converting shebang in 'mirrorselect/mirrorparser3.py'
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/app-portage/mirrorselect-2.1.0-r3/work/mirrorselect-2.1.0 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/app-portage/mirrorselect-2.1.0-r3/work/mirrorselect-2.1.0 ...
>>> Source compiled.
>>> Test phase [not enabled]: app-portage/mirrorselect-2.1.0-r3

>>> Install mirrorselect-2.1.0-r3 into /var/tmp/portage/app-portage/mirrorselect-2.1.0-r3/image/ category app-portage
>>> Completed installing mirrorselect-2.1.0-r3 into /var/tmp/portage/app-portage/mirrorselect-2.1.0-r3/image/

ecompressdir: bzip2 -9 /usr/share/man

>>> Installing (1 of 1) app-portage/mirrorselect-2.1.0-r3
 * ERROR: app-portage/mirrorselect-2.1.0-r3 failed (postrm phase):
 *   python_mod_cleanup(): python_pkg_setup() or python_execute_function() not called
 * 
 * Call stack:
 *     ebuild.sh, line   85:  Called pkg_postrm
 *   environment, line 2555:  Called python_mod_cleanup 'mirrorselect'
 *   environment, line 4092:  Called die
 * The specific snippet of code:
 *               die "${FUNCNAME}(): python_pkg_setup() or python_execute_function() not called";
 * 
 * If you need support, post the output of 'emerge --info =app-portage/mirrorselect-2.1.0-r3',
 * the complete build log and the output of 'emerge -pqv =app-portage/mirrorselect-2.1.0-r3'.
 * The complete build log is located at '/var/tmp/portage/._unmerge_/app-portage/mirrorselect-2.1.0-r3/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/._unmerge_/app-portage/mirrorselect-2.1.0-r3/temp/environment'.
 * S: '/var/tmp/portage/._unmerge_/app-portage/mirrorselect-2.1.0-r3/work/mirrorselect-2.1.0'
!!! FAILED postrm: 1
 * The 'postrm' phase of the 'app-portage/mirrorselect-2.1.0-r3' package
 * has failed with exit value 1.
 * 
 * The problem occurred while executing the ebuild file named
 * 'mirrorselect-2.1.0-r3.ebuild' located in the '/var/db/pkg/app-
 * portage/mirrorselect-2.1.0-r3' directory. If necessary, manually remove
 * the environment.bz2 file and/or the ebuild file located in that
 * directory.
 * 
 * Removal of the environment.bz2 file is preferred since it may allow the
 * removal phases to execute successfully. The ebuild will be sourced and
 * the eclasses from the current portage tree will be used when necessary.
 * Removal of the ebuild file will cause the pkg_prerm() and pkg_postrm()
 * removal phases to be skipped entirely.
 * ERROR: app-portage/mirrorselect-2.1.0-r3 failed (postinst phase):
 *   python_mod_optimize(): python_pkg_setup() or python_execute_function() not called
 * 
 * Call stack:
 *     ebuild.sh, line   85:  Called pkg_postinst
 *   environment, line 2553:  Called python_mod_optimize 'mirrorselect'
 *   environment, line 4185:  Called die
 * The specific snippet of code:
 *                   die "${FUNCNAME}(): python_pkg_setup() or python_execute_function() not called";
 * 
 * If you need support, post the output of 'emerge --info =app-portage/mirrorselect-2.1.0-r3',
 * the complete build log and the output of 'emerge -pqv =app-portage/mirrorselect-2.1.0-r3'.
 * The complete build log is located at '/var/tmp/portage/app-portage/mirrorselect-2.1.0-r3/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-portage/mirrorselect-2.1.0-r3/temp/environment'.
 * S: '/var/tmp/portage/app-portage/mirrorselect-2.1.0-r3/work/mirrorselect-2.1.0'
!!! FAILED postinst: 1
 * Messages for package app-portage/mirrorselect-2.1.0-r3:
 * The 'postrm' phase of the 'app-portage/mirrorselect-2.1.0-r3' package
 * has failed with exit value 1.
 * 
 * The problem occurred while executing the ebuild file named
 * 'mirrorselect-2.1.0-r3.ebuild' located in the '/var/db/pkg/app-
 * portage/mirrorselect-2.1.0-r3' directory. If necessary, manually remove
 * the environment.bz2 file and/or the ebuild file located in that
 * directory.
 * 
 * Removal of the environment.bz2 file is preferred since it may allow the
 * removal phases to execute successfully. The ebuild will be sourced and
 * the eclasses from the current portage tree will be used when necessary.
 * Removal of the ebuild file will cause the pkg_prerm() and pkg_postrm()
 * removal phases to be skipped entirely.
 * ERROR: app-portage/mirrorselect-2.1.0-r3 failed (postrm phase):
 *   python_mod_cleanup(): python_pkg_setup() or python_execute_function() not called
 * 
 * Call stack:
 *     ebuild.sh, line   85:  Called pkg_postrm
 *   environment, line 2555:  Called python_mod_cleanup 'mirrorselect'
 *   environment, line 4092:  Called die
 * The specific snippet of code:
 *               die "${FUNCNAME}(): python_pkg_setup() or python_execute_function() not called";
 * 
 * If you need support, post the output of 'emerge --info =app-portage/mirrorselect-2.1.0-r3',
 * the complete build log and the output of 'emerge -pqv =app-portage/mirrorselect-2.1.0-r3'.
 * The complete build log is located at '/var/tmp/portage/._unmerge_/app-portage/mirrorselect-2.1.0-r3/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/._unmerge_/app-portage/mirrorselect-2.1.0-r3/temp/environment'.
 * S: '/var/tmp/portage/._unmerge_/app-portage/mirrorselect-2.1.0-r3/work/mirrorselect-2.1.0'
 * Messages for package app-portage/mirrorselect-2.1.0-r3:
 * ERROR: app-portage/mirrorselect-2.1.0-r3 failed (postinst phase):
 *   python_mod_optimize(): python_pkg_setup() or python_execute_function() not called
 * 
 * Call stack:
 *     ebuild.sh, line   85:  Called pkg_postinst
 *   environment, line 2553:  Called python_mod_optimize 'mirrorselect'
 *   environment, line 4185:  Called die
 * The specific snippet of code:
 *                   die "${FUNCNAME}(): python_pkg_setup() or python_execute_function() not called";
 * 
 * If you need support, post the output of 'emerge --info =app-portage/mirrorselect-2.1.0-r3',
 * the complete build log and the output of 'emerge -pqv =app-portage/mirrorselect-2.1.0-r3'.
 * The complete build log is located at '/var/tmp/portage/app-portage/mirrorselect-2.1.0-r3/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-portage/mirrorselect-2.1.0-r3/temp/environment'.
 * S: '/var/tmp/portage/app-portage/mirrorselect-2.1.0-r3/work/mirrorselect-2.1.0'




>>> Auto-cleaning packages...

>>> No outdated packages were found on your system.

 * GNU info directory index is up-to-date.

 * IMPORTANT: 2 news items need reading for repository 'gentoo'.
 * Use eselect news to read news items.
Comment 1 Zac Medico gentoo-dev 2012-02-22 17:18:27 UTC
I've updated the dependencies to require python2, which should fix it.
Comment 2 Ben Kohler gentoo-dev 2012-02-22 21:40:25 UTC
Works great now, just tried w/ a fresh stage3 & emerge mirrorselect
Comment 3 Zac Medico gentoo-dev 2012-02-22 22:21:48 UTC
Ok, thanks for testing!
Comment 4 Arfrever Frehtes Taifersar Arahesis 2012-02-25 19:32:52 UTC
There were 2 bugs:
- Wrong dependencies in app-portage/mirrorselect.
- python.eclass wasn't detecting an error earlier (when python_pkg_setup() or
  python_execute_function() is called).
  (This bug wasn't occuring in EAPI="4-python", because REQUIRED_USE is
  then used.)
  I have fixed this bug:
  http://code.google.com/p/gentoo-progress/source/detail?r=1827