Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 233252 - warning from func (qt_min_version) used in depstring (doxygen's RDEPEND) yields confusing error from emerge
Summary: warning from func (qt_min_version) used in depstring (doxygen's RDEPEND) yiel...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Ebuild Support (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
: 233250 (view as bug list)
Depends on:
Blocks: 200044
  Show dependency tree
 
Reported: 2008-07-29 10:11 UTC by SpanKY
Modified: 2008-11-28 23:50 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 SpanKY gentoo-dev 2008-07-29 10:11:32 UTC
doxygen ebuild does:
inherit qt3
RDEPEND="qt3? ( $(qt_min_version 3.3) )

the qt3 eclass does:
qt_min_version() {
    ewarn "qt_min_version() is deprecated. Use slot dependencies instead."

all of this fun stuff leads to:
# emerge world -Dup

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

Calculating dependencies \Traceback (most recent call last):
  File "/usr/bin/emerge", line 18, in <module>
    retval = _emerge.emerge_main()
  File "/usr/lib/portage/pym/_emerge/__init__.py", line 9434, in emerge_main
    myopts, myaction, myfiles, spinner)
  File "/usr/lib/portage/pym/_emerge/__init__.py", line 8611, in action_build
    retval, favorites = mydepgraph.select_files(myfiles)
  File "/usr/lib/portage/pym/_emerge/__init__.py", line 2880, in select_files
    if not self._create_graph():
  File "/usr/lib/portage/pym/_emerge/__init__.py", line 2155, in _create_graph
    allow_unsatisfied=allow_unsatisfied):
  File "/usr/lib/portage/pym/_emerge/__init__.py", line 2438, in _add_pkg_deps
    allow_unsatisfied=allow_unsatisfied):
  File "/usr/lib/portage/pym/_emerge/__init__.py", line 2183, in _add_dep
    onlydeps=dep.onlydeps)
  File "/usr/lib/portage/pym/_emerge/__init__.py", line 3055, in _select_pkg_highest_available
    ret = self._select_pkg_highest_available_imp(root, atom, onlydeps=onlydeps)
  File "/usr/lib/portage/pym/_emerge/__init__.py", line 3069, in _select_pkg_highest_available_imp
    atom = portage.dep.Atom(atom)
  File "/usr/lib/portage/pym/portage/dep.py", line 400, in __init__
    raise InvalidAtom(s)
portage.exception.InvalidAtom: slot

well wtf is this ?  if i run with --debug, i find the real issue:
Parent:    ('installed', '/', 'app-doc/doxygen-1.5.4', 'nomerge')
Depstring: qt3? ( * qt_min_version() is deprecated. Use slot dependencies instead. =x11-libs/qt-3.3* ) latex? ( virtual/latex-base ) dev-lang/python virtual/libiconv virtual/ghostscript !nodot? ( >=media-gfx/graphviz-2.6 media-libs/freetype )
Priority: medium
Virtual Parent:    virtual/libiconv-0
Virtual Depstring: elibc_FreeBSD? ( dev-libs/libiconv ) elibc_NetBSD? ( dev-libs/libiconv ) elibc_OpenBSD? ( dev-libs/libiconv ) elibc_DragonFly? ( dev-libs/libiconv )
Virtual Parent:    virtual/ghostscript-0
Virtual Depstring: || ( app-text/ghostscript-gpl >=app-text/ghostscript-esp-8 app-text/ghostscript-gnu app-text/ghostscript-esp )
Candidates: ['slot', 'Use', '=x11-libs/qt-3.3*', '>=media-gfx/graphviz-2.6', 'is', 'deprecated.', '=virtual/libiconv-0', '\x1b[33;01m*\x1b[0m', 'dependencies', 'dev-lang/python', 'qt_min_version', '>=app-text/ghostscript-esp-8', '=virtual/ghostscript-0', 'instead.', 'media-libs/freetype']

portage should be better about this kind of thing i would think ... so while we should fix doxygen short term, long term we should also address this in emerge

Portage 2.2_rc1 (default/linux/x86/2008.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.26 i686)
=================================================================
System uname: Linux-2.6.26-i686-Genuine_Intel-R-_CPU_T2500_@_2.00GHz-with-glibc2.0
Timestamp of tree: Tue, 29 Jul 2008 01:45:01 +0000
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.4.4-r13, 2.5.2-r5
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.2.5
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
sys-devel/binutils:  2.16.1-r3, 2.17-r1, 2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.25-r4
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium-m -pipe -Wimplicit-function-declaration"
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/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -march=pentium-m -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="buildsyspkg ccache collision-protect distlocks parallel-fetch preserve-libs sandbox sfperms splitdebug strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="en_US.UTF8"
LDFLAGS="-Wl,-O1"
LINGUAS="en de en_GB"
MAKEOPTS="-j6"
PKGDIR="/usr/portage/packages"
PORTAGE_COMPRESS="lzma"
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="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /usr/portage/local/layman/nouveau"
SYNC="rsync://gentoo/gentoo-portage"
USE="X a52 aac aalib acl acpi alsa apache2 arts asf audiofile berkdb bluetooth branding bzip2 cairo cddb cdparanoia cdr cli console cracklib crypt css cups curl cvs dbus directfb doc dri dts dv dvb dvd dvdr dvdread eds emboss encode evo exif fam fbcon ffmpeg firefox flac fontconfig fortran fpx gcj gd gdbm gif glitz glut gmp gphoto2 gpm gs gsm gstreamer gtk gtk2 hal httpd iconv idea ieee1394 imagemagick iproute2 ipv6 ipw3945 irda isdnlog javascript jbig joystick jpeg jpeg2k kde kerberos lame lcms ldap libcaca libnotify lirc live lzo mad madwifi matroska midi mikmod ming mjpeg mmx mmxext mng mod modplug mp3 mp4 mpeg mplayer mudflap multislot mysql ncurses nls nptl nptlonly nsplugin ntfs nvidia ogg openal openexr opengl openmp openntpd pam pcre pdf perl php png ppds pppd python qt qt3 qt3support qt4 quicktime readline real reflection reiserfs rtsp samba sasl scanner sdl session shout skey skins slp sndfile snmp socks5 speex spell spl sse sse2 ssl startup-notification stream subversion svg sysfs tcl tcpd tga theora tiff tk truetype unicode upnp usb v4l v4l2 vcd vdr vidix vorbis wideband wifi win32codecs wma wmf wxwindows x264 x86 xanim xcomposite xfs xine xinerama xinetd xml xorg xosd xpm xprint xrandr xscreensaver xv xvid xvmc zip zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter 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="en de en_GB" LIRC_DEVICES="sir" USERLAND="GNU" VIDEO_CARDS="nvidia nv vga sisusb"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Raúl Porcel (RETIRED) gentoo-dev 2008-07-29 10:22:13 UTC
Carlo is the one who has modified the eclass to do this without fixing the packages first.
Comment 2 Raúl Porcel (RETIRED) gentoo-dev 2008-07-29 10:22:43 UTC
*** Bug 233250 has been marked as a duplicate of this bug. ***
Comment 3 Carsten Lohrke (RETIRED) gentoo-dev 2008-07-29 10:51:16 UTC
(In reply to comment #1)
> Carlo is the one who has modified the eclass to do this without fixing the
> packages first.
> 

This wasn't the real problem. What I didn't expect (and still do not understand) is how calling ewarn() changes the callees parameters. I cannot even reproduce this is a reduced test case.
Comment 4 Raúl Porcel (RETIRED) gentoo-dev 2008-07-29 11:34:05 UTC
I'd say its pretty obvious, from qt3.eclass:
qt_min_version() {
	local list=$(qt_min_version_list "$@")
	ewarn "qt_min_version() is deprecated. Use slot dependencies instead."
	if [[ ${list%% *} == "${list}" ]]; then
		echo "${list}"
	else
		echo "|| ( ${list} )"
	fi
}

qt_min_version() returns the atom. With the ewarn, it returns the ewarn and the atom.

So, this is the result:

/var/cache/edb/dep/usr/portage/net-wireless/waveselect-0.1.2:RDEPEND=net-wireless/wireless-tools * qt_min_version() is deprecated. Use slot dependencies instead. || ( =x11-libs/qt-3.3.8b =x11-libs/qt-3.3.8-r4 =x11-libs/qt-3.3.8-r3 =x11-libs/qt-3.3.8-r2 =x11-libs/qt-3.3.8-r1 =x11-libs/qt-3.3.8 =x11-libs/qt-3.3.6-r5 =x11-libs/qt-3.3.6-r4 =x11-libs/qt-3.3.6-r3 =x11-libs/qt-3.3.6-r2 =x11-libs/qt-3.3.6-r1 =x11-libs/qt-3.3.6 =x11-libs/qt-3.3.5-r1 =x11-libs/qt-3.3.5 =x11-libs/qt-3.3.4-r9 =x11-libs/qt-3.3.4-r8 =x11-libs/qt-3.3.4-r7 =x11-libs/qt-3.3.4-r6 =x11-libs/qt-3.3.4-r5 =x11-libs/qt-3.3.4-r4 =x11-libs/qt-3.3.4-r3 =x11-libs/qt-3.3.4-r2 =x11-libs/qt-3.3.4-r1 =x11-libs/qt-3.3.4 =x11-libs/qt-3.3.3-r3 =x11-libs/qt-3.3.3-r2 =x11-libs/qt-3.3.3-r1 =x11-libs/qt-3.3.3 ) =x11-libs/qt-3* xinerama? ( x11-libs/libXinerama ) arts? ( kde-base/arts 

"* qt_min_version() is deprecated. Use slot dependencies instead." <- this is not an atom
Comment 5 Zac Medico gentoo-dev 2008-07-29 12:22:26 UTC
(In reply to comment #4)
> qt_min_version() returns the atom. With the ewarn, it returns the ewarn and the
> atom.

I need to update portage on the master rsync mirror. The ewarn message should go to stderr, but it doesn't in the old version of portage that I've got on the server.
Comment 6 Zac Medico gentoo-dev 2008-07-29 12:32:45 UTC
I've updated portage on the master mirror and touched the timestamp on qt3.eclass so the mirrors should have good metadata shortly.
Comment 7 Carsten Lohrke (RETIRED) gentoo-dev 2008-07-29 12:47:48 UTC
@Raúl: What you've quoted is the fixed eclass code and at least with Portage 2.1.4.4 this is handled fine. What Portage didn't grok was the previous revision.
Comment 8 Leonid Podolny 2008-07-29 13:47:30 UTC
(In reply to comment #6)
> I've updated portage on the master mirror and touched the timestamp on
> qt3.eclass so the mirrors should have good metadata shortly.
> 

Synced and verified. Looks like it is solved.
Comment 9 SpanKY gentoo-dev 2008-07-31 09:07:52 UTC
if packages in the tree now work properly (output goes to stderr and thus does not muck the depend string), then we can focus on portage here

instead of dumping a trace and complaining about invalid atom, portage should have presented a much more useful message.  something like:
 * Unable to resolve dependencies for 'app-doc/doxygen-1.5.4':
Depstring: qt3? ( * qt_min_version() is deprecated. Use slot dependencies instead. =x11-libs/qt-3.3* ) latex? ( virtual/latex-base ) dev-lang/python virtual/libiconv virtual/ghostscript !nodot? ( >=media-gfx/graphviz-2.6 media-libs/freetype )

this way end people should be able to clearly see the source of the problem and from there, work out a solution

(dropping CC for people who presumably dont care now that doxygen/qt work)
Comment 10 Zac Medico gentoo-dev 2008-08-01 11:14:03 UTC
This is fixed in 2.2_rc6.