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

Bug 523182

Summary: sys-apps/portage-2.2.13 (was: sys-apps/biosdevname-0.4.1) - default_src_prepare() is not supported in EAPI='4' in phase src_prepare
Product: Portage Development Reporter: Konstantin (elxa) <ktrackfd>
Component: Core - Ebuild SupportAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: critical CC: aidecoe, darkbasic, gentoo, gmturner007, jer, josef64, kdvgent, nictki, phil.tooley, pms, qa, renesanso, silvio.gerli
Priority: Normal Keywords: InVCS, REGRESSION
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 563798, 484436    

Description Konstantin (elxa) 2014-09-19 03:09:11 UTC
* ERROR: sys-apps/biosdevname-0.4.1::gentoo failed (prepare phase):
 *   default_src_prepare() is not supported in EAPI='4' in phase src_prepare

Reproducible: Always

Steps to Reproduce:
emerge -1 =sys-apps/biosdevname-0.4.1
Actual Results:  
 * Package:    sys-apps/biosdevname-0.4.1
 * Repository: gentoo
 * Maintainer: aidecoe@gentoo.org
 * USE:        abi_x86_64 amd64 elibc_glibc kernel_linux userland_GNU
 * FEATURES:   preserve-libs sandbox splitdebug userpriv usersandbox
>>> Unpacking source...
>>> Unpacking biosdevname-0.4.1.tar.gz to /var/tmp/portage/sys-apps/biosdevname-0.4.1/work
>>> Source unpacked in /var/tmp/portage/sys-apps/biosdevname-0.4.1/work
>>> Preparing source in /var/tmp/portage/sys-apps/biosdevname-0.4.1/work/biosdevname-0.4.1 ...
 * ERROR: sys-apps/biosdevname-0.4.1::gentoo failed (prepare phase):
 *   default_src_prepare() is not supported in EAPI='4' in phase src_prepare
 * 
 * Call stack:
 *            ebuild.sh, line  93:  Called src_prepare
 *          environment, line 775:  Called default
 *   phase-functions.sh, line 770:  Called default_src_prepare
 *   phase-functions.sh, line 763:  Called die
 * The specific snippet of code:
 *      done
 * 
 * If you need support, post the output of `emerge --info '=sys-apps/biosdevname-0.4.1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sys-apps/biosdevname-0.4.1::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/sys-apps/biosdevname-0.4.1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-apps/biosdevname-0.4.1/temp/environment'.
 * Working directory: '/var/tmp/portage/sys-apps/biosdevname-0.4.1/work/biosdevname-0.4.1'
 * S: '/var/tmp/portage/sys-apps/biosdevname-0.4.1/work/biosdevname-0.4.1'

Expected Results:  
Successful build.
Comment 1 Konstantin (elxa) 2014-09-19 03:10:14 UTC
Portage 2.2.13 (python 2.7.8-final-0, default/linux/amd64/13.0/desktop/gnome/systemd, gcc-4.9.1, glibc-2.19-r1, 3.16.2-gentoo x86_64)
=================================================================
System uname: Linux-3.16.2-gentoo-x86_64-Intel-R-_Core-TM-_i7-2720QM_CPU_@_2.20GHz-with-gentoo-2.2
KiB Mem:    20399772 total,   1151060 free
KiB Swap:          0 total,         0 free
Timestamp of tree: Wed, 17 Sep 2014 23:15:01 +0000
ld GNU gold (Gentoo git 2.24.51.20140918) 1.11
distcc 3.1 x86_64-pc-linux-gnu [disabled]
app-shells/bash:          4.2_p47
dev-java/java-config:     2.2.0
dev-lang/python:          2.7.8, 3.3.5-r1, 3.4.1
dev-util/cmake:           3.0.2
dev-util/pkgconfig:       0.28-r2
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.13.1
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.10.3, 1.11.6, 1.12.6, 1.14.1
sys-devel/binutils:       9999
sys-devel/gcc:            4.8.3, 4.9.1
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2-r1
sys-devel/make:           4.0-r1
sys-kernel/linux-headers: 3.16 (virtual/os-headers)
sys-libs/glibc:           2.19-r1
Repositories: gentoo tlp gnome x11 sublime-text bumblebee qt tox-overlay local
Installed sets: @ebftpd, @qt5-addons, @qt5-essentials, @tox
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-pipe -march=native -O3 -flto=9 -fuse-linker-plugin -fomit-frame-pointer -floop-interchange -ftree-loop-distribution -floop-strip-mine -floop-block -ftree-vectorize"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/easy-rsa /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-pipe -march=native -O3 -flto=9 -fuse-linker-plugin -fomit-frame-pointer -floop-interchange -ftree-loop-distribution -floop-strip-mine -floop-block -ftree-vectorize"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--jobs --keep-going"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo http://gentoo.mneisen.org/ http://mirror.netcologne.de/gentoo/ ftp://mirror.netcologne.de/gentoo/ http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/ ftp://ftp.halifax.rwth-aachen.de/gentoo/ http://ftp.halifax.rwth-aachen.de/gentoo/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu -Wl,--sort-common -Wl,--as-needed -pipe -march=native -O3 -flto=9 -fuse-linker-plugin -fomit-frame-pointer -floop-interchange -ftree-loop-distribution -floop-strip-mine -floop-block -ftree-vectorize"
MAKEOPTS="-j5 -l5"
PKGDIR="/usr/portage/packages"
PORTAGE_COMPRESS="xz"
PORTAGE_COMPRESS_FLAGS="-9"
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"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/tlp /var/lib/layman/gnome /var/lib/layman/x11 /var/lib/layman/sublime-text /var/lib/layman/bumblebee /var/lib/layman/qt /var/lib/layman/tox-overlay /usr/local/portage"
USE="X a52 aac acl acpi aio airplay amd64 audit avahi avx berkdb bluetooth bluray branding bzip2 cairo call cdda cdr clang cli clutter colord connection-sharing cracklib crypt cryptsetup css cups custom-cflags custom-cpuopts custom-optimization cxx dbus dri dts dvd dvdr eds efi emboss encode evo exif fam fasteap ffmpeg firefox flac fortran fprint gdbm geoip gif glamor gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk gtk3 gtkstyle hdaps highlight hires-icons iconv icq icu introspection ios ipod ipv6 irc jabber jpeg laptop lastfm lcms ldap libnotify libsecret lzma mad map mmx mng modules mp3 mp4 mpeg multilib nautilus ncurses networkmanager nls nptl ogg opengl openmp optimization optimized-qmake pam pango pcre pdf pgo playlist png policykit ppds pulseaudio qemu qt3support qt4 readline scanner sdl sendto session sip sna socialweb spell sse sse2 sse3 sse4_1 sse4_2 ssl ssse3 startup-notification strong-optimization svg systemd taglib tcpd telepathy theora threads thunderbird tiff tls truetype udev udisks unicode upower usb v4l vaapi vdpau virt-network vnc vorbis vpx wavpack webm webrtc-aec wifi wxwidgets x264 xcb xinerama xml xv xvid zeitgeist zeroconf 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" DRACUT_MODULES="biosdevname crypt systemd" 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="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="de en" NETBEANS_MODULES="cnd enterprise gsf ide j2ee java javafx nb profiler xml soa visualweb webcommon websvccommon mobility" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" QEMU_SOFTMMU_TARGETS="arm i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby21" USERLAND="GNU" VIDEO_CARDS="intel nvidia" 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:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_RSYNC_EXTRA_OPTS, SYNC, USE_PYTHON
Comment 2 Yixun Lan archtester gentoo-dev 2014-09-19 04:29:51 UTC
CC @portage team..

seems a regression from portage-2.2.13, since this ebuild works fine with portage-2.2.12-r1.

using portage-2.2.13, and revert commit [1], problem gone


[1] 772ed29fd9e7cf722aed943adbe33a27f250e1ff
Author: Michał Górny <mgorny@gentoo.org>
Date:   Mon Aug 18 13:54:15 2014 +0200

    Rewrite default ebuild phase setting code
    
    Replace the ebuild phase setting code for EAPI 2 and newer with a
    simpler approach; first set proper default_* functions, and call them
    within the phase. Disallow calling default_* for other phase functions
    than the one being run.
Comment 3 Konstantin (elxa) 2014-09-19 04:37:06 UTC
Thanks, I confirm that downgrading sys-apps/portage-2.2.13 to sys-apps/portage-2.2.12 solved the issue.
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-09-19 06:28:31 UTC
It's not a regression, it's increase in strictness. You aren't allowed to call defaults that don't exist. Lemme just get my QA hat...
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-09-19 06:30:32 UTC
@@ -4,0 +5,4 @@
+  19 Sep 2014; Michał Górny <mgorny@gentoo.org> biosdevname-0.3.11-r1.ebuild,
+  biosdevname-0.4.0.ebuild, biosdevname-0.4.1.ebuild:
+  Do not call non-existing default_src_prepare(), bug #523182.
Comment 6 Arfrever Frehtes Taifersar Arahesis 2014-09-19 06:51:35 UTC
(In reply to Michał Górny from comment #4)
> It's not a regression, it's increase in strictness. You aren't allowed to
> call defaults that don't exist. Lemme just get my QA hat...

It is regression.

http://dev.gentoo.org/~ulm/pms/5/pms.html#x1-141002r21 (slightly above)

"default
  Calls the default_ function for the current phase (see section 9.1.17).
  Must not be called if the default_ function does not exist for the current
  phase in the current EAPI. Only available in EAPIs listed in table 11.21."


http://dev.gentoo.org/~ulm/pms/5/pms.html#x1-1110009.1.17

"9.1.17 default_ Phase Functions
  In EAPIs listed in table 9.9 as supporting default_ phase functions,
  a function named default_(phase) that behaves as the default implementation
  for that EAPI shall be defined when executing any ebuild phase listed in
  the table. Ebuilds must not call these functions except when in the phase
  in question.

Table 9.9: EAPIs supporting default_ phase functions
  EAPI   Supports default_ functions in phases
  ...
  4      pkg_nofetch, src_unpack, src_prepare, src_configure, src_compile,
         src_install, src_test"

                                  ^^^^^^^^^^^
Comment 7 Ulrich Müller gentoo-dev 2014-09-19 07:00:32 UTC
I confirm comment #6.

There was nothing wrong with the ebuild, but it is a regression in Portage. Reopening and increasing severity.
Comment 8 Ulrich Müller gentoo-dev 2014-09-19 07:18:08 UTC
*** Bug 523184 has been marked as a duplicate of this bug. ***
Comment 9 Zac Medico gentoo-dev 2014-09-19 10:52:15 UTC
The previous version of bin/phase-functions.sh and bin/save-ebuild-env.sh was perfectly fine, so we can simply revert 772ed29fd9e7cf722aed943adbe33a27f250e1ff.
Comment 10 Zac Medico gentoo-dev 2014-09-20 17:55:28 UTC
It's reverted in git now:

https://github.com/gentoo/portage/commit/c775565a9f0c2aa5872559f3927d6608e840cb1d
Comment 11 Jeroen Roovers (RETIRED) gentoo-dev 2014-09-20 20:01:07 UTC
*** Bug 523320 has been marked as a duplicate of this bug. ***
Comment 12 Jeroen Roovers (RETIRED) gentoo-dev 2014-09-20 20:01:26 UTC
*** Bug 523026 has been marked as a duplicate of this bug. ***
Comment 13 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-09-20 20:14:42 UTC
Seriously? Yeah, let's revert everything because adding src_prepare() to the stupid list is *that hard*.
Comment 14 Zac Medico gentoo-dev 2014-09-20 20:23:54 UTC
(In reply to Michał Górny from comment #13)
> Seriously? Yeah, let's revert everything because adding src_prepare() to the
> stupid list is *that hard*.

Are you sure that was all that needed to change, in order to conform with the sections of PMS quoted in comment #6? If so, then that's great. Why didn't you say anything earlier? :)
Comment 15 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-09-20 20:44:15 UTC
Because nobody bothered asking me? Nor waiting till we actually find out if the whole thing isn't just a stupid mistake in PMS since src_prepare() is the only no-op phase that supposedly has default but no implementation.
Comment 16 Ulrich Müller gentoo-dev 2014-09-20 20:54:29 UTC
(In reply to Michał Górny from comment #15)
> Nor waiting till we actually find out if the whole thing isn't just a stupid
> mistake in PMS

Even if it is, we cannot change the spec retroactively for previous EAPIs.

> since src_prepare() is the only no-op phase that supposedly has default but
> no implementation.

We are about to change this in EAPI 6. (With the added bonus that we need not change the list of default_* functions from EAPI 5. :)
Comment 17 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-09-20 21:09:00 UTC
(In reply to Ulrich Müller from comment #16)
> (In reply to Michał Górny from comment #15)
> > Nor waiting till we actually find out if the whole thing isn't just a stupid
> > mistake in PMS
> 
> Even if it is, we cannot change the spec retroactively for previous EAPIs.

Of course we can't. We never did this in the past, and definitely not for a lesser reason.

> > since src_prepare() is the only no-op phase that supposedly has default but
> > no implementation.
> 
> We are about to change this in EAPI 6. (With the added bonus that we need
> not change the list of default_* functions from EAPI 5. :)

Except that every ebuild will need to change anyway.
Comment 18 Jeroen Roovers (RETIRED) gentoo-dev 2014-09-22 08:13:02 UTC
*** Bug 523426 has been marked as a duplicate of this bug. ***
Comment 19 Jeroen Roovers (RETIRED) gentoo-dev 2014-09-23 16:53:16 UTC
*** Bug 523536 has been marked as a duplicate of this bug. ***
Comment 20 Jeroen Roovers (RETIRED) gentoo-dev 2014-09-25 17:55:40 UTC
*** Bug 523714 has been marked as a duplicate of this bug. ***
Comment 21 Jeroen Roovers (RETIRED) gentoo-dev 2014-09-25 17:57:17 UTC
Still not package.masked or removed yet?
Comment 22 Brian Dolbec (RETIRED) gentoo-dev 2014-09-25 19:12:09 UTC
This release is package.masked now.  We are working to get a new release out with all new regressions fixed in the next few days.
Comment 23 Jeroen Roovers (RETIRED) gentoo-dev 2014-09-26 09:04:27 UTC
*** Bug 523760 has been marked as a duplicate of this bug. ***
Comment 24 Brian Dolbec (RETIRED) gentoo-dev 2014-09-26 19:19:48 UTC
portage-2.2.13 has been removed. Fixes are released in portage-2.2.14_rc1
Comment 25 Jeroen Roovers (RETIRED) gentoo-dev 2014-10-10 06:47:20 UTC
*** Bug 524910 has been marked as a duplicate of this bug. ***