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

Bug 197810

Summary: sys-apps/portage-2.1.6.4: emerge shouldn't downgrade package due to a digest error when the package is already installed
Product: Portage Development Reporter: Pacho Ramos <pacho>
Component: Core - Interface (emerge)Assignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: trivial CC: carlo, esigra, jakub
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 252167    
Bug Blocks: 155723    

Description Pacho Ramos gentoo-dev 2007-11-01 19:56:41 UTC
I am having one problem with the digest of sdl-sound (bug 197808) and it's causing emerge want to downgrade sdl-sound causing this error:

Calculating world dependencies -!!! Digest verification failed:
!!! /usr/portage/media-libs/sdl-sound/sdl-sound-1.0.1-r2.ebuild
!!! Reason: Filesize does not match recorded size
!!! Got: 1745
!!! Expected: 1739
 -
!!! Multiple versions within a single package slot have been
!!! pulled into the dependency graph:

('ebuild', '/', 'media-libs/flac-1.1.2-r8', 'merge') pulled in by
  ('ebuild', '/', 'media-libs/sdl-sound-1.0.1-r1', 'merge')

('installed', '/', 'media-libs/flac-1.2.1-r1', 'nomerge') pulled in by
  ('installed', '/', 'media-libs/xine-lib-1.1.8', 'nomerge')
  ('installed', '/', 'media-plugins/gst-plugins-flac-0.10.6', 'nomerge')
  ('installed', '/', 'media-sound/flac123-0.0.11', 'nomerge')
  ('installed', '/', 'kde-base/kaudiocreator-3.5.7', 'nomerge')
  ('installed', '/', 'media-sound/soundkonverter-0.3.6', 'nomerge')
  ('installed', '/', 'kde-base/kdemultimedia-kioslaves-3.5.7', 'nomerge')
  ('installed', '/', 'media-sound/vorbis-tools-1.1.1-r3', 'nomerge')
  ('installed', '/', 'games-engines/scummvm-0.10.0', 'nomerge')
  ('installed', '/', 'media-libs/tunepimp-0.5.3', 'nomerge')
  ('installed', '/', 'media-libs/libsndfile-1.0.17-r1', 'nomerge')
  ('installed', '/', 'media-sound/timidity++-2.13.2-r5', 'nomerge')

It may be possible to solve this problem by using package.mask to
prevent one of those packages from being selected. However, it is also
possible that conflicting dependencies exist such that they are
impossible to satisfy simultaneously. If such a conflict exists in the
dependencies of two different packages, then those packages can not be
installed simultaneously.

For more information, see MASKED PACKAGES section in the emerge man page
or refer to the Gentoo Handbook.

!!! Depgraph creation failed.

But I don't understand why portage wants to downgrade sdl-sound, because the affected version is already installed. I think that downgrade this when the package is already installed is not really needed

Thanks a lot
Portage 2.1.3.16 (default-linux/x86/2007.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.22-gentoo-r8 i686)
=================================================================
System uname: 2.6.22-gentoo-r8 i686 Genuine Intel(R) CPU T2300 @ 1.66GHz
Timestamp of tree: Thu, 01 Nov 2007 19:20:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p17
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python:     2.4.4-r6
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.9-r2
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.22-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -pipe -fomit-frame-pointer -march=pentium-m -mfpmath=sse -msse3"
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/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -pipe -fomit-frame-pointer -march=pentium-m -mfpmath=sse -msse3"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks fixpackages metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://mirror.ovh.net/gentoo-distfiles/ "
LANG="es_ES.UTF-8"
LC_ALL="es_ES.UTF-8"
LINGUAS="es es_ES en_US"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/sunrise /usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac acpi aim alsa ape arts asf audiofile avahi avi bash-completion bcmath beagle bitmap-fonts bonobo bzip2 bzlib cairo caps cdb cddb cdparanoia cdr cdrparanoia cli cpdflib cracklib cross crypt css cups curl curlwrappers daap dbus divx4linux dts dv dvb dvd dvdr dvdread emerald encode escreen esd exif fam fbcon ffmpeg firefox flac foomaticdb fortran ftp galago gb gcj gd gif gimp gimpprint glitz glut glx gmp gnome gphoto2 gpm gstreamer gtk gtk2 gtkhtml guile hal iconv imagemagick imlib ipv6 isdnlog jabber jack java jikes jpeg kde kdeenablefinal kdehiddenvisibility latex lcms lesstif libnotify logrotate mac mad mbox midi mikmod mime ming mmap mmx mmxext mng modplug mono motif mp3 mpeg mpi mplayer mudflap musepack musicbrainz nas ncurses nethack nls nocd nptl nptlonly nsplugin ntfs nvidia ogg oggvorbis openal opengl openmp opnegl pam pcmcia pcre pdf pdflib perl pic png pnp posix ppds pppd python qt qt3 qt4 quicktime readline real reflection reiserfs rpm rtc ruby scanner sdl seamonkey session slang slp smp sndfile sockets socks5 speex spell spl sse sse2 sse3 ssl startup-notification svg syslog tcltk tcpd tetex tga theora threads tiff timidity tk truetype truetype-fonts trusted type1-fonts unicode usb userlocales v4l v4l2 vcd videos vim vorbis wifi win32codecs wma wmf wxwindows x86 xcomposite xine xml xorg xpm xv xvid zlib" ALSA_CARDS="hda-intel" 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" DVB_CARDS=" " ELIBC="glibc" INPUT_DEVICES="keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="es es_ES en_US" USERLAND="GNU" VIDEO_CARDS="nvidia nv vesa fbdev"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS



Reproducible: Always
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-11-01 19:59:07 UTC
(In reply to comment #0)
> But I don't understand why portage wants to downgrade sdl-sound, because the
> affected version is already installed.

Because the ebuild is masked by corruption (the digest is broken). It's not like that the problem would be any less or more serious when you have the package already installed.
Comment 2 Zac Medico gentoo-dev 2007-11-02 07:07:05 UTC
I'm pretty sure this issue is solved in trunk by the fix for bug 149816.
Comment 3 Pacho Ramos gentoo-dev 2007-11-02 11:13:39 UTC
(In reply to comment #1)
> (In reply to comment #0)
> > But I don't understand why portage wants to downgrade sdl-sound, because the
> > affected version is already installed.
> 
> Because the ebuild is masked by corruption (the digest is broken). It's not
> like that the problem would be any less or more serious when you have the
> package already installed.
> 

Sorry, I meant:
"But I don't understand why portage wants to downgrade sdl-sound when the affected version is already installed."

because -> when 

My english is too poor and it was typo :-S
Comment 4 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2007-11-02 16:39:21 UTC
(In reply to comment #2)
> I'm pretty sure this issue is solved in trunk

It isn't solved in trunk (r8382).
Comment 5 Zac Medico gentoo-dev 2008-02-14 07:37:31 UTC
This should be fixed now in trunk r9336.
Comment 6 Zac Medico gentoo-dev 2008-02-29 19:33:34 UTC
This is fixed in 2.2_pre3.
Comment 7 Pacho Ramos gentoo-dev 2008-02-29 22:40:18 UTC
(In reply to comment #6)
> This is fixed in 2.2_pre3.
> 

Closing this bug then?

Thanks a lot for fixing it :-)
Comment 8 Zac Medico gentoo-dev 2008-03-19 10:44:38 UTC
Actually, I'm not sure if this is really fixed since I don't encounter this case very often. Has anybody tested it lately?
Comment 9 Zac Medico gentoo-dev 2008-03-30 01:37:26 UTC
I've tested this and it appears to be all fixed now.
Comment 10 Zac Medico gentoo-dev 2008-03-30 01:39:12 UTC
*** Bug 215308 has been marked as a duplicate of this bug. ***
Comment 11 Zac Medico gentoo-dev 2008-04-04 22:22:49 UTC
This is fixed in 2.1.5_rc1.
Comment 12 Pacho Ramos gentoo-dev 2008-04-13 10:35:49 UTC
(In reply to comment #11)
> This is fixed in 2.1.5_rc1.
> 

I have read that this change has been reverted in 2.1.5_rc3:

Unlike earlier 2.1.5_rc releases, emerge is now fixed
to automatically downgrade masked packages when appropriate (solves a
side effect from the fix for bug #197810).

What is the new behavior? Has this been reverted or fixed in other way?

Thanks a lot for information :-)
Comment 13 Zac Medico gentoo-dev 2008-04-13 15:29:24 UTC
(In reply to comment #12)
> What is the new behavior? Has this been reverted or fixed in other way?

It's fixed in a different way. In the case that this bug addresses, the ebuild that is masked by corruption and the installed package with the same version are considered as a two separate packages with different masking status. If the installed package itself is not in fact masked (such as by package.mask), there is no reason to downgrade it.
Comment 14 Pacho Ramos gentoo-dev 2008-04-14 13:45:17 UTC
OK, thanks a lot for replying :-) and sorry for the inconvenience 
Comment 15 Pacho Ramos gentoo-dev 2009-01-28 22:10:22 UTC
This is still valid as seen just now:
# emerge -pvuDN world

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

Calculating dependencies | * Digest verification failed:
 * /usr/portage/x11-libs/libxcb/libxcb-1.1.ebuild
 * Reason: Filesize does not match recorded size
 * Got: 1132
 * Expected: 1133
... done!
[ebuild     U ] sys-apps/hdparm-9.6 [9.3] 93 kB [?=>0]
[ebuild     UD] x11-proto/xcb-proto-1.0 [1.1] 70 kB [0]
[ebuild     UD] x11-libs/libxcb-1.0 [1.1] USE="-debug (-doc%)" 410 kB [0]

Total: 3 packages (1 upgrade, 2 downgrades), Size of downloads: 572 kB
Portage tree and overlays:
 [0] /usr/portage
 [?] indicates that the source repository could not be determined

emerge wants to downgrade already installed packages because of being digest failure

My emerge --info:
Portage 2.1.6.4 (default/linux/amd64/2008.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.28-tuxonice-r1 x86_64)
=================================================================
System uname: Linux-2.6.28-tuxonice-r1-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T9300_@_2.50GHz-with-glibc2.2.5
Timestamp of tree: Wed, 28 Jan 2009 21:00:01 +0000
distcc 3.0 x86_64-pc-linux-gnu [disabled]
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7-r1, 2.1.6-r1
dev-lang/python:     2.5.2-r7
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.4.8
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
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.27-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=nocona -fomit-frame-pointer"
CHOST="x86_64-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/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -pipe -march=nocona -fomit-frame-pointer"
DISTDIR="/usr/distfiles"
FEATURES="autoaddcvs ccache collision-protect cvs distlocks fixpackages multilib-strict parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://ftp.free.fr/mirrors/ftp.gentoo.org"
LANG="es_ES.UTF-8"
LC_ALL="es_ES.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="es es_ES en_US"
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="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/layman/sunrise /usr/local/portage/layman/java-overlay /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 amr avahi bash-completion berkdb bluetooth branding bzip2 cairo cdda cddb cdparanoia cdr cli consolekit cracklib crypt css cups daap dbus dell dirac divx djvu dts dvd dvdr dvdread dvi eds emboss emovix encode epiphany evo exif fam fbcondecor fbsplash ffmpeg flac fortran fuse galago gdbm gif glitz gmedia gnome gnome-keyring gpm gsm gstreamer gtk hal iconv ieee1394 ipv6 isdnlog java java6 jpeg jpeg2k kdeenablefinal kdehiddenvisibility kpathsea ladspa laptop latex lcms ldap libnotify lirc lzma mad midi mikmod mjpeg mmx mmxext mono moonlight mp3 mpeg mudflap multilib musepack musicbrainz nautilus ncurses network network-cron networkmanager nls nptl nptlonly ntp ogg opengl openmp pam pch pcre pdf perl png ppds pppd python qt3 qt3support qt4 quicktime readline realmedia reflection scanner schroedinger sdl session smp sms speex spell spl sse sse2 sse3 ssl ssse3 startup-notification svg sysfs t1lib tcpd theora threads tiff totem truetype unicode usb v4l2 vcd vhook vorbis wmf wmp x264 xattr xcb xft xinetd xml xorg xulrunner xv xvid zeroconf zlib" ALSA_CARDS="hda-intel" 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 synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="es es_ES en_US" USERLAND="GNU" VIDEO_CARDS="nvidia nv"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 16 Zac Medico gentoo-dev 2009-01-28 22:22:48 UTC
This is a side-effect from the changes that fixed bug #252167. We'll have to fix it to distinguish "masked by corruption" from other mask types.
Comment 17 Pacho Ramos gentoo-dev 2015-11-16 09:33:01 UTC
this is solved in 2.2.20.1