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

Bug 239006

Summary: =dev-java/ant-antlr-1.7.1 and others: EAPI change without version change
Product: Portage Development Reporter: Robert W. <slrn_robert>
Component: Core - DependenciesAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: major CC: ciaran.mccreesh, java, software, tb
Priority: High Keywords: InVCS
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 240304    
Attachments: only use live ebuild's *DEPEND if the EAPI is supported

Description Robert W. 2008-09-29 07:30:33 UTC
The EAPI of =dev-java/antlr-1.7.1 has been changed to EAPI 2, but the version of package remained the same. This break the dependency trees for those, which have installed this package earlier. The result is, that any update fails. The current fixes I see:
1) Maintaining my own overlay with the risk of future versioning conflicts
2) upgrading portage to a version, which supports EAPI 2

The first option is a lot of work, the second option a deep change in the package management, which perhaps introduces new problems. Therefore, I vote for a third option:
3) Create a new version, when changing EAPI

There are other packages, having the same problem, it may take a while for me to identify them, because I must fix each single dependency one by one.

Reproducible: Always

Steps to Reproduce:
1. Have installed =dev-java/ant-antlr-1.7.1 earlier using <sys-apps/portage-2.2
2. try to update the installed packages
3. Dependency resolution will fail

Actual Results:  
waltraud ~ # emerge -vuDp world

These are the packages that would be merged, in order:

Calculating world dependencies \
 \
emerge: there are no ebuilds to satisfy ">=dev-java/antlr-2.7.5-r3:0[java]".
(dependency required by "dev-java/ant-antlr-1.7.1" [installed])

!!! Problem resolving dependencies for dev-util/eclipse-sdk
!!! Depgraph creation failed.

Expected Results:  
=dev-java/ant-antlr-1.7.1 should have sticked to EAPI 1, while a second ebuild, e.g. =dev-java/ant-antlr-1.7.1-r1 could have been provided for EAPI 2. Either of them could be unmasked separately selecting the one needed.

Portage 2.1.4.4 (default/linux/x86/2008.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.26.5-1 i686)
=================================================================
System uname: 2.6.26.5-1 i686 AMD Athlon(tm) MP 2200+
Timestamp of tree: Sun, 28 Sep 2008 22:15:01 +0000
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.5.2-r7
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r2
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon-mp -O3 -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/4.1/env /usr/kde/4.1/share/config /usr/kde/4.1/shutdown /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CPPFLAGS="-march=athlon-mp -O3 -fomit-frame-pointer -pipe"
CXXFLAGS="-march=athlon-mp -O3 -fomit-frame-pointer -pipe"
DISTDIR="/var/portage/distfiles"
FEATURES="autoaddcvs ccache distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://pandemonium.tiscali.de/pub/gentoo/ http://gentoo.mneisen.org/"
LC_ALL="de_DE.utf8"
LDFLAGS="-Wl,-z,now"
LINGUAS="de en_GB"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/var/portage"
PORTDIR_OVERLAY="/var/portage/local/crossdev /var/portage/local/layman/java-overlay /var/portage/local/layman/postgresql-testing /var/portage/local/layman/haskell /var/portage/local/layman/kdesvn-portage /usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac aalib acl acpi alsa arts bash-completion berkdb bitmap-fonts blas bluetooth branding bzip2 cairo caps cddb cdparanoia cdr cli cracklib crypt cscope css cups curl dbus doc dri dts dvd dvdr dvdread eds emacs emboss encode evo examples fam ffmpeg fftw firefox flac foomaticdb fortran ftp gdbm ggi gif gimp gpm graphviz hal hdf5 htmlhandbook iconv idn imap ipod ipv6 isdnlog java java6 jpeg kde latex lcms leim libnotify lm_sensors logitech-mouse mad mailwrapper mbox midi mikmod mmx mmxext modplug motif mp3 mpeg mplayer mudflap musepack musicbrainz ncurses nepomuk nls nptl nptlonly nsplugin ogg opengl openmp pam pcre pda pdf perl plasma plotutils png postgres ppds pppd python qt qt3 qt3support qt4 quicktime readline reflection rtsp samba sasl scanner session smp socks5 speex spell spl sse ssl startup-notification svg sysfs tcpd theora threads tiff truetype truetype-fonts type1-fonts unicode usb vcd vim-syntax vorbis wavpack win32codecs wma x264 x86 xattr xcomposite xine xinerama xml xorg xrandr xscreensaver xv xvid zeroconf zlib" ALSA_CARDS="emu10k1" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="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 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" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de en_GB" USERLAND="GNU" VIDEO_CARDS="mga vesa fbdev"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2008-09-29 09:56:14 UTC
Well, only ~arch ebuilds were changed this way. The general rule is that only stable arch and ~arch as a whole are supported, and combinations of something ~arch unmasked while e.g. portage stays stable is not officially supported.
So yes, you should do "upgrading portage to a version, which supports EAPI 2".
But I'll leave this open for Betelgeuse's opinion as it was him updating the ebuilds to new EAPI.
Comment 2 Petteri Räty (RETIRED) gentoo-dev 2008-09-29 10:02:13 UTC
I thought Portage would be using the info from vdb for installed stuff nowadays if the main tree things weren't usable but I guess I was wrong. Any way why doesn't Portage give the normal update notice in this situation?
Comment 3 Serkan Kaba (RETIRED) gentoo-dev 2008-09-29 13:04:48 UTC
*** Bug 239032 has been marked as a duplicate of this bug. ***
Comment 4 Zac Medico gentoo-dev 2008-09-29 15:31:49 UTC
(In reply to comment #2)
> I thought Portage would be using the info from vdb for installed stuff nowadays
> if the main tree things weren't usable but I guess I was wrong. Any way why
> doesn't Portage give the normal update notice in this situation?

As workaround for odd dependencies in the tree, portage uses *DEPEND from ebuilds in the live tree instead of from the vdb. Historically, this has served to solve problems such as those caused by modification of the QT3VERSIONS variable in q3.eclass. When this hanging this variable is changed to accommodate a new qt version, it renders the *DEPEND outdated for all installed packages whose dependencies were generated from an earlier QT3VERSIONS setting.

If all the packages exhibiting problems such as this have been fixed, then eventually we can remove the live *DEPEND workaround from portage. However, we shouldn't do it until we are sure that the most stable users no longer have such problematic dependencies in their installed packages.
Comment 5 Zac Medico gentoo-dev 2008-09-29 17:03:52 UTC
In svn r11600 I've changed the behavior so that it will always use the vdb metadata in cases when the live ebuild's EAPI is unsupported.
Comment 6 Petteri Räty (RETIRED) gentoo-dev 2008-09-29 18:20:00 UTC
*** Bug 239066 has been marked as a duplicate of this bug. ***
Comment 7 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2008-09-30 09:30:02 UTC
(In reply to comment #4)
> If all the packages exhibiting problems such as this have been fixed, then
> eventually we can remove the live *DEPEND workaround from portage. However, we
> shouldn't do it until we are sure that the most stable users no longer have
> such problematic dependencies in their installed packages.
 
Please let's discuss this on the -dev ML before you implement this. I personally quite dislike the idea of revbumping on each dependency version restriction, for example...
Comment 8 Ciaran McCreesh 2008-09-30 15:05:55 UTC
(In reply to comment #7)
> Please let's discuss this on the -dev ML before you implement this. I
> personally quite dislike the idea of revbumping on each dependency version
> restriction, for example...

What's stopping you from writing correct deps to begin with now?
Comment 9 Zac Medico gentoo-dev 2008-09-30 16:01:46 UTC
(In reply to comment #7)
> Please let's discuss this on the -dev ML before you implement this. I
> personally quite dislike the idea of revbumping on each dependency version
> restriction, for example...

We might consider implementing a metadata update protocol, similar to the one that's currently used for package moves and slot moves. This will give us an avenue to correct metadata problems without needing to reinstall the whole package.
Comment 10 Zac Medico gentoo-dev 2008-10-06 17:37:15 UTC
Created attachment 167471 [details, diff]
only use live ebuild's *DEPEND if the EAPI is supported

If this patch is saved as /tmp/eapi_supported.patch then it can be applied as follows:

patch /usr/lib/portage/bin/emerge /tmp/eapi_supported.patch
Comment 11 Zac Medico gentoo-dev 2008-10-09 17:10:01 UTC
This is fixed in portage-2.1.4.5.