Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 220689 - sys-apps/portage-2.1.5_rc7 suggests unneeded downgrades
Summary: sys-apps/portage-2.1.5_rc7 suggests unneeded downgrades
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS, REGRESSION
Depends on:
Blocks: 216231
  Show dependency tree
 
Reported: 2008-05-06 23:02 UTC by Marco Leogrande
Modified: 2008-05-09 09:32 UTC (History)
2 users (show)

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


Attachments
Output of 'emerge -up app-office/dia --debug' (debug.log,4.24 KB, text/plain)
2008-05-07 08:20 UTC, Marco Leogrande
Details
prevent unneeded downgrades (downgrade.patch,697 bytes, patch)
2008-05-08 17:00 UTC, Zac Medico
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marco Leogrande 2008-05-06 23:02:47 UTC
Today I upgraded to sys-apps/portage-2.1.5_rc7 and found a strange behavior about unneeded downgrades. Preamble: the latest stable version of the package that I'm using to explain the bug, app-office/dia, is 0.96.1-r1 on my arch (x86).

If I run 'emerge -p app-office/dia' the output is:
[ebuild   R   ] app-office/dia-0.96.1-r1  USE="cairo gnome gnome-print png python zlib -debug -doc" 4,342 kB 

while 'emerge -up app-office/dia' reports
[ebuild     UD] app-office/dia-0.95.1 [0.96.1-r1] USE="gnome png python zlib -debug (-cairo%*) (-doc%) (-gnome-print%*)" 4,105 kB 

Adding -u to the commandline options causes emerge to suggest a downgrade, while there's no need for it.
I temporarily downgraded portage to 2.1.5_rc6 and the problem disappeared. With the old version of portage, 'emerge -p app-office/dia' prints (correctly)

[ebuild   R   ] app-office/dia-0.96.1-r1  USE="cairo gnome gnome-print png python zlib -debug -doc" 4,342 kB 

while 'emerge -pu app-office/dia' shows no package to upgrade/downgrade/recompile.

$ emerge --info
Portage 2.1.5_rc7 (default/linux/x86/2008.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.25-gentoo-r2 i686)
=================================================================
System uname: 2.6.25-gentoo-r2 i686 Intel(R) Pentium(R) M processor 1.60GHz
Timestamp of tree: Tue, 06 May 2008 18:45:03 +0000
ccache version 2.4 [disabled]
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.4.4-r9
dev-python/pycrypto: 2.0.1-r6
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-r1
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.25-r1
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium-m -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /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="-march=pentium-m -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--tree"
FEATURES="candy distlocks fixpackages parallel-fetch sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://mirror.ing.unibo.it/gentoo/ http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ http://mirror.ing.unibo.it/gentoo/"
LANG="it_IT.UTF-8"
LC_ALL="it_IT.UTF-8"
LDFLAGS=""
LINGUAS="it en"
MAKEOPTS="-j2"
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="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/sunrise /usr/portage/local/layman/gnome /usr/portage/local/layman/java-overlay /usr/portage/local/layman/science /usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac aalib acpi alsa amr apache2 avi bash-completion bitmap-fonts bluetooth branding bzip2 cairo cddb cdparanoia cdr cli cracklib crypt ctype cups dbus djvu dri dvd dvdr dvdread dvi emacs encode esd exif fbcon ffmpeg flac fortran ftp gd gdbm gif gimp gimpprint gnome gnome-print gnutls gpm gstreamer gtk gtk2 gtkhtml hal hddtemp iconv ipv6 java javascript jce jikes jpeg libnotify libsamplerate logrotate mad midi mikmod mmx mmxext mng mp3 mpeg msn mudflap mysql mysqli nautilus ncurses nls nodrm nptl nptlonly nsplugin offensive ogg opengl openmp oss pam pch pcre pdf perl php png ppds python quicktime readline real samba sdl session slang sockets socks5 spell spl sse sse2 ssl startup-notification subversion svg symlink syslog tcpd theora threads tiff tokenizer truetype unicode usb v4l v4l2 vcd vorbis wifi win32codecs wmf wxwindows x86 xml xorg xulrunner xv xvid xvmc zip zlib" ALSA_CARDS="intel8x0" 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 auth_digest authn_anon authn_dbd 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 dbd deflate dir disk_cache env expires ext_filter file_cache filter headers imagemap 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 synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="it en" USERLAND="GNU" VIDEO_CARDS="i810 vesa fbdev"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORT
Comment 1 Zac Medico gentoo-dev 2008-05-07 01:29:03 UTC
The most likely explanation is that the lower version is being pulled in as a dependency of some other package. Please post --debug output for one of the commands that results in a downgrade.

emerge -up app-office/dia --debug > debug.log 2>&1
Comment 2 imgvg 2008-05-07 02:42:27 UTC
(In reply to comment #1)
> The most likely explanation is that the lower version is being pulled in as a
> dependency of some other package. Please post --debug output for one of the
> commands that results in a downgrade.
> 
> emerge -up app-office/dia --debug > debug.log 2>&1
> 

I'm not the original reporter, but I have a _very_ simple example, from the commandline:  emerge -uvp --debug mailbase

myaction None
myopts {'--pretend': True, '--debug': True, '--update': True, '--verbose': True}

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

Calculating dependencies      ebuild: net-mail/mailbase-0.00-r6
   ebuild: net-mail/mailbase-0.00-r6
^H^H... done!
[ebuild     UD] net-mail/mailbase-0.00-r6 [1] USE="(-pam%*)" 0 kB 

Total: 1 package (1 downgrade), Size of downloads: 0 kB

It appears to not even consider the currently installed (i.e. latest) version!
I hope this helps.
Comment 3 Marco Leogrande 2008-05-07 08:19:53 UTC
I don't think that app-office/dia is a dependency of some other package, as it is a mere office application (and it is listed in my world file). I will attach debug.log.
Comment 4 Marco Leogrande 2008-05-07 08:20:52 UTC
Created attachment 152217 [details]
Output of 'emerge -up app-office/dia --debug'
Comment 5 Zac Medico gentoo-dev 2008-05-07 21:21:48 UTC
I seems as if the code path from the patch for bug #219369 is being triggered. What KEYWORDS do the installed versions have?

cat /var/db/pkg/app-office/dia-0.96.1-r1/KEYWORDS

cat /var/db/pkg/net-mail/mailbase-1/KEYWORDS
Comment 6 Marco Leogrande 2008-05-07 22:37:32 UTC
dark@darkplace ~ $ cat /var/db/pkg/app-office/dia-0.96.1-r1/KEYWORDS
~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd

Yes, when I installed app-office/dia, it was unstable.
Comment 7 Guillaume Castagnino 2008-05-08 08:10:37 UTC
Hi,

I just get the same problem with mailbase-1

Strangelly, I have no /var/db/pkg/net-mail/mailbase-1/KEYWORDS file.
Such files should have been pulled by a portage version unpgraded after I installed this package ?

If I reinstall manually this package (emerge -av1 =mailbase-1), I have now the missing KEYWORDS file and the problem vanishes
Comment 8 Fabian Groffen gentoo-dev 2008-05-08 09:35:35 UTC
I have the same problem in prefix (so far on Linux only), emerge -Dua world gives a huge list with all packages being suggested to be downgraded.

I believe this behaviour started for me when I installed a portage based on revision 9962, coming from revision 9894.
Comment 9 Marius Mauch (RETIRED) gentoo-dev 2008-05-08 16:03:13 UTC
(In reply to comment #7)
> Strangelly, I have no /var/db/pkg/net-mail/mailbase-1/KEYWORDS file.
> Such files should have been pulled by a portage version unpgraded after I
> installed this package ?

IIRC <portage-2.1 did not record KEYWORDS in /var/db/pkg, so that could be the root problem here (on my server system only 184 of 334 installed packages have a KEYWORDS entry in vdb).
Comment 10 Zac Medico gentoo-dev 2008-05-08 17:00:04 UTC
Created attachment 152495 [details, diff]
prevent unneeded downgrades

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

patch /usr/lib/portage/bin/emerge /tmp/downgrade.patch
Comment 11 Marco Leogrande 2008-05-08 17:33:35 UTC
The patch provided above solves my problem and, at the moment, has no visible side effects.
Thanks.
Comment 12 Fabian Groffen gentoo-dev 2008-05-08 20:21:57 UTC
confirmed to work in r10249
Comment 13 Zac Medico gentoo-dev 2008-05-09 09:32:32 UTC
This is fixed in 2.1.5_rc8.