Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 568034 - dev-libs/zziplib-0.13.62: with app-eselect/eselect-python-20151117-r1 _python_initial_sanity_checks() in python.eclass fails with /usr/bin/python' is not a valid symlink
Summary: dev-libs/zziplib-0.13.62: with app-eselect/eselect-python-20151117-r1 _python...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
: 568062 (view as bug list)
Depends on:
Blocks: python-symlink
  Show dependency tree
 
Reported: 2015-12-11 23:25 UTC by Toralf Förster
Modified: 2015-12-14 07:39 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
dev-libs:zziplib-0.13.62:20151211-223420.log (dev-libs:zziplib-0.13.62:20151211-223420.log,1.47 KB, text/plain)
2015-12-11 23:25 UTC, Toralf Förster
Details
die.env (die.env,311.18 KB, text/plain)
2015-12-11 23:25 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,50.41 KB, text/plain)
2015-12-11 23:26 UTC, Toralf Förster
Details
zziplib-0.13.62-r1.ebuild (zziplib-0.13.62-r1.ebuild,2.25 KB, text/plain)
2015-12-12 03:44 UTC, Mr. Bones. (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2015-12-11 23:25:53 UTC
 This is the 2nd unstable chroot tinderbox image which suddenly gave this :
 
 
 * Maintainer: vapier@gentoo.org mr_bones_@gentoo.org
 * USE:        abi_x86_64 amd64 elibc_glibc kernel_linux userland_GNU
 * FEATURES:   preserve-libs sandbox userpriv usersandbox
 * '/usr/bin/python' is not a valid symlink.
 * Use `eselect python set ${python_interpreter}` to fix this problem.
 * ERROR: dev-libs/zziplib-0.13.62::gentoo failed (setup phase):
 *   '/usr/bin/python' is not a valid symlink
 * 
 * Call stack:
 *                ebuild.sh, line  133:  Called pkg_setup
 *   zziplib-0.13.62.ebuild, line   27:  Called python_set_active_version '2'


$ cat ./info.txt
  -----------------------------------------------------------------

  This is an unstable amd64 chroot image (named amd64-13.0-unstable_20151211-113822) at a hardened host acting as a tinderbox.

  -----------------------------------------------------------------

  Portage 2.2.26 (python 3.4.3-final-0, default/linux/amd64/13.0, gcc-4.9.3, glibc-2.22-r1, 4.1.7-hardened-r1 x86_64)
=================================================================
System uname: Linux-4.1.7-hardened-r1-x86_64-Intel-R-_Core-TM-_i7-3770_CPU_@_3.40GHz-with-gentoo-2.2
KiB Mem:    16164644 total,   2039376 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Fri, 11 Dec 2015 17:02:00 +0000
sh bash 4.3_p42
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
app-shells/bash:          4.3_p42::gentoo
dev-java/java-config:     2.2.0::gentoo
dev-lang/perl:            5.22.0::gentoo
dev-lang/python:          2.7.11::gentoo, 3.4.3-r5::gentoo
dev-util/cmake:           3.4.1::gentoo
dev-util/pkgconfig:       0.29::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.19.1::gentoo
sys-apps/sandbox:         2.9::gentoo
sys-devel/autoconf:       2.69-r1::gentoo
sys-devel/automake:       1.13.4::gentoo, 1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.9.3::gentoo
sys-devel/gcc-config:     1.8::gentoo
sys-devel/libtool:        2.4.6-r1::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.3::gentoo (virtual/os-headers)
sys-libs/glibc:           2.22-r1::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.de.gentoo.org/gentoo-portage/
    priority: 1

local
    location: /usr/local/portage
    masters: gentoo
    priority: 2

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.6/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/var/tmp/distfiles"
EMERGE_DEFAULT_OPTS="--deep --color=n --nospinner --tree --quiet-build --accept-properties=-interactive --accept-restrict=-fetch"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync network-sandbox news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://ftp.uni-erlangen.de/pub/mirrors/gentoo rsync://mirror.netcologne.de/gentoo/ ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gor.bytemark.co.uk/gentoo/ rsync://ftp.snt.utwente.nl/gentoo"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
USE="acl aes-ni alsa amd64 berkdb bzip2 cairo cdb cgi cli cracklib crypt custom-cflags cxx dnssec dri drmkms ecc egl fontconfig fortran ftp gd gdbm help hpn iconv ipv6 jadetex javascript kvm ldap libkms mmx mmxext mod modules mssql multilib multimedia mysql ncurses nls nptl nscd obj offensive opencv openmp pam pax_kernel pcre pkcs11 pulseaudio pwquality qt3support readline sddm seccomp session smartcard sockets spice sse sse2 sse4_2 ssl svg system-jpeg tcpd theora unicode video wxwidgets xattr xmlreader xscreensaver zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_GB" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby20 ruby21" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Toralf Förster gentoo-dev 2015-12-11 23:25:55 UTC
Created attachment 419002 [details]
dev-libs:zziplib-0.13.62:20151211-223420.log
Comment 2 Toralf Förster gentoo-dev 2015-12-11 23:25:58 UTC
Created attachment 419004 [details]
die.env
Comment 3 Toralf Förster gentoo-dev 2015-12-11 23:26:00 UTC
Created attachment 419006 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2015-12-11 23:51:30 UTC
and indeed :

~/amd64-13.0-unstable_20151211-113822/usr/bin $ ls -l python*
-rwxr-xr-x 1 root root  1461 Dec 11 12:53 python
-rwxr-xr-x 1 root root  1461 Dec 11 12:53 python2
-rwxr-xr-x 1 root root  6048 Dec 11 13:40 python2.7
-rwxr-xr-x 1 root root  1463 Dec 11 13:40 python2.7-config
lrwxrwxrwx 1 root root    31 Dec 11 12:53 python2-config -> ../lib/python-exec/python-exec2
-rwxr-xr-x 1 root root  1461 Dec 11 12:53 python3
lrwxrwxrwx 1 root root    10 Dec 11 13:37 python3.4 -> python3.4m
lrwxrwxrwx 1 root root    17 Dec 11 13:37 python3.4-config -> python3.4m-config
-rwxr-xr-x 1 root root 10200 Dec 11 13:37 python3.4m
-rwxr-xr-x 1 root root  2842 Dec 11 13:37 python3.4m-config
lrwxrwxrwx 1 root root    31 Dec 11 12:53 python3-config -> ../lib/python-exec/python-exec2
lrwxrwxrwx 1 root root    31 Dec 11 12:53 python-config -> ../lib/python-exec/python-exec2
Comment 5 Toralf Förster gentoo-dev 2015-12-11 23:53:07 UTC
and :

Fri Dec 11 12:53:24 2015 <<< dev-lang/python-exec-2.0.1-r1
Fri Dec 11 12:53:26 2015 >>> dev-lang/python-exec-2.1
Fri Dec 11 12:53:36 2015 <<< app-eselect/eselect-python-20111108
Fri Dec 11 12:53:38 2015 >>> app-eselect/eselect-python-20151117-r1
Comment 6 Mr. Bones. (RETIRED) gentoo-dev 2015-12-12 03:44:41 UTC
Created attachment 419010 [details]
zziplib-0.13.62-r1.ebuild

Does this ebuild work better?
Comment 7 Denis Dupeyron (RETIRED) gentoo-dev 2015-12-12 05:07:28 UTC
(In reply to Mr. Bones. from comment #6)
> Created attachment 419010 [details]
> zziplib-0.13.62-r1.ebuild
> 
> Does this ebuild work better?

It does fix the same issue here.
Comment 8 Matthias Maier gentoo-dev 2015-12-12 06:16:37 UTC
This issue is due to a check in the python.eclass:

347 _python_initial_sanity_checks() {                                                
[...]
349         # Ensure that /usr/bin/python and /usr/bin/python-config are valid.      
350         if [[ "$(readlink "${EPREFIX}/usr/bin/python")" != "python-wrapper" ]]; then
351             eerror "'${EPREFIX}/usr/bin/python' is not a valid symlink."         
[...]
361 }

and is also hit by other packages, for example media-libs/libkate that happens to have this innocent call in package_setup():

28 pkg_setup() {                                                                    
29     if use wxwidgets; then                                                       
30         python_set_active_version 2                                              
31         python_pkg_setup                                                         
32     fi                                                                           
33 }

I'd say this is a clear bug in the python.eclass, isn't it?
Comment 9 Matthias Maier gentoo-dev 2015-12-12 06:25:39 UTC
For the record, I believe this is due to the following change in app-eselect/eselect-python:

commit f28f2e793b1639b91e2e47ba50886bf25d0d28d6
Author: Michał Górny <mgorny@gentoo.org>
Date:   Wed Nov 25 13:35:51 2015 +0100

    app-eselect/eselect-python: Replace python{,2,3} symlinks with files
    
    Copy python-exec script to /usr/bin/python{,2,3} rather than symlinking
    it because a lot of Python scripts like to readlink(sys.executable) and
    don't expect to find python-exec in there...


CC'ing python herd. Shall we reassign the bug?
Comment 10 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-12-12 07:05:58 UTC
We could fix the old eclass (bleeeeh), or wait a bit more to see how many more old ebuilds people are using :-P.
Comment 11 Toralf Förster gentoo-dev 2015-12-12 09:51:20 UTC
(In reply to Michał Górny from comment #10)
> We could fix the old eclass (bleeeeh), or wait a bit more to see how many
> more old ebuilds people are using :-P.

Ick, so instead ignoring this type of bug in my tinderboxes I should rather file bugs as blocker of this ?
Comment 12 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-12-12 11:11:35 UTC
That won't really be helpful. I'm more curious how many packages are not used at all.
Comment 13 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-12-12 13:00:43 UTC
I've killed the check in python.eclass. Seems to work on my box.
Comment 14 SpanKY gentoo-dev 2015-12-14 04:34:18 UTC
*** Bug 568062 has been marked as a duplicate of this bug. ***