Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 72181 - FEATURES="collision-protect" doesn't protect against collisions of slotted versions of the same package
Summary: FEATURES="collision-protect" doesn't protect against collisions of slotted ve...
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
Depends on:
Blocks:
 
Reported: 2004-11-22 19:51 UTC by Harald van Dijk (RETIRED)
Modified: 2006-05-11 17:55 UTC (History)
0 users

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


Attachments
slot-check.patch (slot-check.patch,505 bytes, patch)
2004-12-04 08:41 UTC, Harald van Dijk (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Harald van Dijk (RETIRED) gentoo-dev 2004-11-22 19:51:17 UTC
Hi,
I have collision-protect in my FEATURES and I had only gcc 3.4 installed. When I installed gcc 3.3, it overwrote two files (/sbin/fix_libtool_files.sh and /lib/rcscripts/awk/fixlafiles.awk) that were owned by gcc 3.4. I think portage should have blocked the installation of gcc 3.3.

Reproducible: Always
Steps to Reproduce:
1. emerge '=gcc-3.4*'
2. emerge -P gcc
3. emerge '=gcc-3.3*'
Actual Results:  
Both gcc 3.3 and 3.4 are installed.

Expected Results:  
gcc 3.3 should have been blocked.

Portage 2.0.51-r3 (default-linux/x86/2004.2/gcc34/2.6, gcc-3.4.3,
glibc-2.3.4.20041102-r0, 2.6.9-cko3 i686)
=================================================================
System uname: 2.6.9-cko3 i686 Intel(R) Pentium(R) M processor 1400MHz
Gentoo Base System version 1.6.6
distcc 2.18.2 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
Autoconf: sys-devel/autoconf-2.59-r5
Automake: sys-devel/automake-1.8.5-r1
Binutils: sys-devel/binutils-2.15.92.0.2-r1
Headers:  sys-kernel/linux26-headers-2.6.8.1-r1
Libtools: sys-devel/libtool-1.5.2-r7
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -mcpu=i686 -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config
/usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/
/usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -mcpu=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig candy ccache collision-protect distlocks
notitles sandbox sfperms userpriv usersandbox"
GENTOO_MIRRORS="http://ftp.easynet.nl/mirror/gentoo http://gentoo.osuosl.org
http://www.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/mnt/hda3/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/etc/portage/overlay"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X aalib accessibility acl alsa apache2 apm audiofile avi berkdb bidi
bitmap-fonts cdparanoia cdr cjk crypt cscope debugger dga divx4linux dvd dvdread
encode erandom esd f77 fbcon ffi flac foomaticdb fortran gdbm gif gnome gnutls
gpm graphviz gstreamer gtk gtk2 hal imagemagick imlib ipv6 ithreads javascript
jpeg lcms libcaca libg++ libwww live mad mikmod mmx mmx2 mng mozdevelop mozilla
moznoxft mozsvg mozxmlterm mpeg ncurses nethack network nls no-old-linux
no_wxgtk1 noplugin nptl objc offensive oggvorbis opengl oss pam pcre pdflib perl
perlsuid pic png postgres python quicktime readline real rtc samba sdl slang
speex spell sqlite sse ssl svg tcpd tetex theora threads tiff truetype unicode
userlocales wmf wxwindows x86 xgetdefault xml xml2 xprint xv xvid zlib
linguas_en_GB linguas_en linguas_ja linguas_nl"
Comment 1 Marius Mauch (RETIRED) gentoo-dev 2004-11-22 19:59:46 UTC
Yeah, I haven't implemented the SLOT check yet.
Comment 2 Harald van Dijk (RETIRED) gentoo-dev 2004-12-04 08:41:35 UTC
Created attachment 45274 [details, diff]
slot-check.patch

Would this be enough? It looks like it...
Comment 3 Nicholas Jones (RETIRED) gentoo-dev 2005-01-10 18:37:28 UTC
That is not a valid check. Multiple slots per version are legal,
just not well implemented in the database yet.

They do gcc-3.3 and gcc-3.4 do not block because they do not
affect the same files.
Comment 4 Harald van Dijk (RETIRED) gentoo-dev 2005-01-10 19:40:39 UTC
> That is not a valid check. Multiple slots per version are legal,
> just not well implemented in the database yet.

If that is allowed, that is not well implemented in portage in general. I changed the SLOT in a custom ebuild to "1", and when I pass it to emerge -pv, portage tells me it will replace the current version (with SLOT="0"), not install another version in another slot. Also, if multiple slots per version are legal, it would be impossible for a function to get the slot of an installed package when only knowing the name and version number, yet there is a function (getslot) which does this. I have no doubt that it is indended to be possible with a future version of portage, but are you sure it is allowed now?

> They do gcc-3.3 and gcc-3.4 do not block because they do not
> affect the same files.

The two files I listed in my bug report are provided by both gcc 3.3 and gcc 3.4, and equery belongs confirmed this.
Comment 5 Wernfried Haas (RETIRED) gentoo-dev 2005-12-01 06:45:01 UTC
I had the same problem (but the other way around) when upgrading to gcc 3.4.4.
Gcc 3.3.6 was installed, 3.4.4 installed as slotted version, some voodoo (emerge
-e system, revdep-rebuild, etc) was done. On uninstalling gcc 3.3.6
/sbin/fix_libtool_files.sh got removed. I had to emerge gcc (3.4.4) again to
have this file back. Same for /lib/rcscripts/awk/fixlafiles.awk of course.
It seems /sbin/fix_libtool_files.sh is exactly the same file with the same
md5sum in both versions.
FWIW i also have collision-protect enabled in my features.
Comment 6 SpanKY gentoo-dev 2005-12-01 07:31:53 UTC
this is a bug in gcc itself, not portage

i'll have the gcc issue fixed shortly
Comment 7 Harald van Dijk (RETIRED) gentoo-dev 2005-12-01 07:50:48 UTC
collision-protect is supposed to protect against this. That's the whole point of
collision-protect...
Comment 8 SpanKY gentoo-dev 2005-12-01 08:17:08 UTC
oh, i read the report inversed ... i thought people were complaining
that portage was flagging a collision between SLOT-ed packages and
they wished for it to not do so
Comment 9 Alec Warner (RETIRED) archtester gentoo-dev Security 2006-05-11 17:55:53 UTC
this is broken for binpkgs...but otherwise it's in -r3012, half-fixed in -r3339, completely fixed once I get a new patch.

Released in 2.1_pre8-9ish, not sure which.