freeman portage # eselect mysql list Available MySQL versions: [1] 5.0.x freeman portage # eselect mysql set 1 !!! Error: File "/usr/bin/mysql_explain_log-500" is not suitable for symlink (2) exiting. Portage 2.1_pre4-r1 (default-linux/x86, gcc-3.4.5, glibc-2.3.6-r2, 2.6.15 i686) ================================================================= System uname: 2.6.15 i686 Intel(R) Pentium(R) 4 CPU 3.00GHz Gentoo Base System version 1.12.0_pre15 dev-lang/python: 2.3.5-r2, 2.4.2 sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1 sys-devel/binutils: 2.16.1-r1 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r3 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -pipe -fomit-frame-pointer -march=pentium4" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/texmf/web2c /etc/env.d" CXXFLAGS="-O2 -pipe -fomit-frame-pointer -march=pentium4" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks sandbox sfperms strict" GENTOO_MIRRORS="ftp://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ ftp://gentoo.chem.wisc.edu/gentoo/ ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/opt/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.us.gentoo.org/gentoo-portage/" USE="X Xaw3d a52 aac aalib acl acpi aim alsa apache2 audiofile avi bash-completion berkdb bitmap-fonts bluetooth bmp bzip2 cairo caps cddb cdparanoia cdr cgi clamav cracklib crypt cups curl dar32 dar64 dba dbm dbus dga directfb divx4linux doc dts dv dvb dvd dvdr dvdread encode ethereal expat fam fbcon ffmpeg firefox flac fltk foomaticdb ftp gd gdbm ggi gif gnutls gpm graphviz gstreamer gtk gtk2 gtkhtml hal imagemagick imap imlib innodb ithreads jabber jack java javascript jikes jpeg kde kdeenablefinal kerberos ldap lesstif libcaca libg++ libwww live lm_sensors logitech-mouse lzo mad maildir mailwrapper matroska mbox mikmod mime ming mmap mmx mmxext mng modplug motif mozdevelop mozilla moznocompose moznoirc mozsvg mp3 mpeg mplayer msn musicbrainz mysql ncurses network nis nptl nsplugin odbc offensive ogg oggvorbis openal openexr opengl oscar pam pcre pda pdflib perl php png posix povray ppds python qt quicktime readline real ruby samba sasl sdl sharedmem slang slp sndfile snmp spell srvdir sse sse2 ssl svg svga sysfs sysvipc tcltk tetex theora threads tidy tiff truetype truetype-fonts type1-fonts udev unicode usb v4l vcd verbose vhosts videos vidix visualization vorbis wifi win32codecs wmf wxwindows x86 xcomposite xine xinerama xml xml2 xmlrpc xmms xosd xpm xscreensaver xsl xv xvid xvmc yahoo zeroconf zlib elibc_glibc kernel_linux userland_GNU video_cards_radeon" Unset: ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, LANG, LC_ALL, LDFLAGS, LINGUAS
$ equery list mysql [ Searching for package 'mysql' in all categories among: ] * installed packages [I--] [ ] app-admin/eselect-mysql-1.0.0-r1 (0) [I--] [ ] dev-perl/DBD-mysql-2.9007 (0) [I--] [ ] dev-db/mysql-administrator-1.1.5 (0) [I--] [ ] dev-db/mysql-5.0.18-r30 (500)
CCing portage devs, this one is at least the third signal of emerge _not_ removing files when unmerge mysql, please enlighten us. The situation need manual fix, who had installed 4.0.16-r30 need to replace all occourences of "-500" with "-401" . [code] cd / TMPLIST=$( cat /var/lib/eselect/mysql/mysql-500.filelist | sed -e 's!-500!!' ) ls -l $TMPLIST #[the list should be only symlinks] tar -jcpvf ~/my-backup.tar.bz2 $TMPLIST rm -rf $TMPLIST [/code] this will backup and remove all the files that still exist in the current filesystem (and should not).
please post the "equery b /usr/bin/mysql_explain_log" before to do that
(In reply to comment #3) > please post the "equery b /usr/bin/mysql_explain_log" before to do that > whardin@freeman ~ $ equery b /usr/bin/mysql_explain_log [ Searching for file(s) /usr/bin/mysql_explain_log in *... ] whardin@freeman ~ $ echo $? 0 whardin@freeman ~ $ no results, no errors.
Just some additional info: I recently upgraded from mysql-5.0.18 to mysql-5.0.18-r30 Also, a 'multislot' USE keyword would be nice for mysql, because I for one, do not desire to have multiple versions installed and slotting it adds unwanted complexity
(In reply to comment #5) > Just some additional info: > > I recently upgraded from mysql-5.0.18 to mysql-5.0.18-r30 > > Also, a 'multislot' USE keyword would be nice for mysql, because I for one, do > not desire to have multiple versions installed and slotting it adds unwanted > complexity > Sorry the "multislot" option is not viable, instead has been suggested to remove totally the slotted ebuilds. If there is enough consensus on this I will remove it totally, leaving only un-slotted ebuilds, so try for example a forum enquiry or something similar and report to me the results.
(In reply to comment #2) > CCing portage devs, this one is at least the third signal of emerge _not_ > removing files when unmerge mysql, please enlighten us. > > The situation need manual fix, who had installed 4.0.16-r30 need to replace all > occourences of "-500" with "-401" . > > [code] > cd / > TMPLIST=$( cat /var/lib/eselect/mysql/mysql-500.filelist | sed -e 's!-500!!' ) > ls -l $TMPLIST > #[the list should be only symlinks] > tar -jcpvf ~/my-backup.tar.bz2 $TMPLIST > rm -rf $TMPLIST > [/code] > > this will backup and remove all the files that still exist in the current > filesystem (and should not). > the results of "cat /var/lib/eselect/mysql/mysql-500.filelist | sed -e 's!-500!!'" are actually ALL regular files, 91 files in total, there are no symlinks in the list at all. and since I had time to kill, I also ran "equery belongs" on each file and none of them belong to any package
That's exactly why I added portage team to the CC list. Portage does not remove a file if it's time has changed as far as I know. This could be one cause. For the moment remove them with the procedure shown, also pick some other file in /usr/bin directory and try to "equery b it" Some further testing you can do: Chose a little (and fast to reemerge) package that you installed at around the same time you installed the old mysql, and that has files in /usr/bin and uninstall it, once done check if the files it owned in /usr/bin are still there. Take note of this and reinstall the package.
I get this # eselect mysql set 1 !!! Error: File "/usr/bin/mysql_install_db-500" is not suitable for symlink (2) exiting. # ls -l /usr/bin/mysql_install_db-500 -rwxr-xr-x 1 root root 8842 Jan 31 23:27 /usr/bin/mysql_install_db-500 # equery b /usr/bin/mysql_install_db-500 [ Searching for file(s) /usr/bin/mysql_install_db-500 in *... ] dev-db/mysql-5.0.18-r30 (/usr/bin/mysql_install_db-500) emerge --info Portage 2.1_pre4-r1 (default-linux/x86/2005.1, gcc-4.0.2, glibc-2.3.6-r2, 2.6.15-gentoo-r2 i686) ================================================================= System uname: 2.6.15-gentoo-r2 i686 Intel(R) Pentium(R) M processor 2.00GHz Gentoo Base System version 1.12.0_pre15 dev-lang/python: 2.4.2 sys-apps/sandbox: 1.2.12 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1 sys-devel/binutils: 2.16.1 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=pentium-m -fomit-frame-pointer -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config /usr/share/X11/xkb /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/splash /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -march=pentium-m -fomit-frame-pointer -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks sandbox sfperms strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 X a52 aac acl acpi alsa apache2 arts audiofile avi bash-completion berkdb bitmap-fonts bzip2 cdr crypt cups curl dbus dvd dvdr dvdread emboss encode exif ffmpeg firefox foomaticdb gdbm gif glut gmp gpm gstreamer gtk gtk2 hal idn ieee1394 imlib java jpeg junit kde kerberos lcms ldap libg++ libwww logrotate mad mhash mikmod mmx mng motif mp3 mpeg mysql ncurses nls nptl nvidia odbc ogg oggvorbis opengl oracle pam pcmcia pcre pdflib perl php png python qt quicktime readline samba sdl spell sse sse2 ssl tcltk tcpd threads tiff truetype truetype-fonts type1-fonts udev unicode usb vorbis wifi xine xml2 xmms xv xvid zlib elibc_glibc input_devices_keyboard input_devices_mouse input_devices_joystick input_devices_synaptics kernel_linux userland_GNU video_cards_nvidia" Unset: ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, LANG, LC_ALL, LDFLAGS, LINGUAS
(In reply to comment #9) > I get this > > # eselect mysql set 1 > !!! Error: File "/usr/bin/mysql_install_db-500" is not suitable for symlink (2) > exiting. > # ls -l /usr/bin/mysql_install_db-500 > -rwxr-xr-x 1 root root 8842 Jan 31 23:27 /usr/bin/mysql_install_db-500 > # equery b /usr/bin/mysql_install_db-500 the error message isn't that clear but you need to look for the existance of /usr/bin/mysql_install_db without the ending "-500" because eselect mysql want to link /usr/bin/mysql_install_db to /usr/bin/mysql_install_db-500 and if the /usr/bin/mysql_install_db exist and is a regular file it can't do that job, follow the instruction in comment #2 on how to manually remove those files .
What exactly is the issue here? The OP with comments 1 and 2 are not enough information... If you're after the set of cases where portage does not remove files on unmerge, I think you've already covered it. To repeat though, portage doesn't remove files if the MD5 has changed, the file size has changed, the modified timestamp has changed or the filetype has changed.
betting that the ebuild/eclasses creation of files during preinst/postinst is probably at fault for orphaning files (exactly why I stated in irc that this shouldn't be done)... Thing is, you haven't stated exactly what is being orphaned here...
(In reply to comment #12) > betting that the ebuild/eclasses creation of files during preinst/postinst is > probably at fault for orphaning files (exactly why I stated in irc that this > shouldn't be done)... the ebuild the users are un-installing contain only this code regarding external files: === #secure the logfiles... does this bother anybody? touch "${ROOT}${MY_LOGDIR}"/mysql.{log,err} chown mysql:mysql "${ROOT}${MY_LOGDIR}"/mysql* chmod 0660 "${ROOT}${MY_LOGDIR}"/mysql* === > > Thing is, you haven't stated exactly what is being orphaned here... > Users (and at least one dev) report about 90 files orphaned /usr/bin . Sorry but I fail to see how this could be related. In the current ebuild/eclass the image directory is walked by "find" in preinst, then file and directory is created in "/var/lib/eselect/mysql/mysql-XYZ.filelist" during postinst. If this is a problem please provide a workaround. _No_ user at the moment reported if they changed something mentioned in comment #11 by Jason. But I find strange the number of bug report of this kind I've received.
eclass/ebuild are doing evil things, has nothing to do with portage.
I cast a strong request for un-slotting this ebuild; I would [somewhat] understand slotting between 4.x and 5.x versions, but have been badly bitten by the mysql-5.0.18 to mysql-5.0.18-r30 bug. I'm going to mask it and go back.
The work-around posted in comment #2 indeed fixes the error-message that I had originally > # eselect mysql set 1 > !!! Error: File "/usr/bin/mysql_install_db-500" is not suitable for symlink (2) > exiting. However this still does not help me in starting MySQL. eselect mysql set 1 gives no errors anymore. But a subsequent eselect mysql show now gives the following output Current default MySQL version: (unset) So clearly the eselect is not functioning as it should. To put it mildly a pretty annoying bug as it already took a lot of time to get to this point. ps) I'm using the most up-to-date version of eselect-mysql which is eselect-mysql-1.0.0-r4.ebuild ps2) I've located similar comments in the forum. Downgrading to r1 or r2 was mentioned to help, but I've not yet located the corresponding ebuilds.
(In reply to comment #14) > eclass/ebuild are doing evil things, has nothing to do with portage. > This is what it would seem; after getting my "production" box back-revisioned and cleaning it up, I did a bit of post-mortem on the install on my desktop. It just seems... a bit messy; slotting this may eventually work, but right now there are missing/dangling links, abandoned binaries and configs, and such. I would recommend maybe masking the slotted 5.x versions in package.mask until more testing/integration can be done to bring them up to the level that the other slotted stuff seems to be at - it doesn't seem to be "unstable" (I interpret as "unproven"), more "testing/development."
I've had problems on every machine I've tried to install the new slotted version on. The most recent problem is as below which is the same as comment #16 and widespread on the forum too [1][2]. Any help would be much appreciated. I don't need slotting and if life would be easier without it then I'd be inclined to say remove slotting. Either that or mask and test like crazy. harry ~ # eselect mysql list Available MySQL versions: [1] 5.0.x harry ~ # eselect mysql set 1 harry ~ # eselect mysql show Current default MySQL version: (unset) The above does not create symlinks but does not complain either leaving me with no mysql. [1] http://forums.gentoo.org/viewtopic-t-430014.html [2] http://forums.gentoo.org/viewtopic-p-3101569.html#3101569
After two days messing with this bug I now give up. Dev-db/mysql-5.0.18-r30 >> is going in package.masked As a result I am moving back to the unslotted version. Both in the forum as here I can't find no other solution given then going back to the unslotted version. As stated earlier and in detail in comment #18 eselect mysql simply does not set the version correctly on my system with all related problems. I don't know if it is relevant, but I upgraded from mysql 5.0.18 using the upgrade guide. But this clearly went completely bogus on me. btw) Seeing the impact I am amazed how little activity this bugreport shows.
I've just done a completely clean install of gentoo, and I don't think I've upgraded mysql at all. I have: [I--] [ ] app-admin/eselect-mysql-1.0.0-r4 (0) [I--] [ ] dev-db/mysql-5.0.18-r30 (500) [I--] [ ] dev-perl/DBD-mysql-3.0002_p4 (0) Here's an example of what I do: # eselect mysql list Available MySQL versions: [1] 5.0.x # eselect mysql show Current default MySQL version: (unset) # eselect mysql set 5.0.x # eselect mysql show Current default MySQL version: (unset) So even though I didn't get any error at all at the 'eselect mysql set' step, it seems to have had no effect. I don't see any symlinks at all of any of the mysql binaries at all. Doing a tab-complete of mysql<tab> shows me: mysql-500 mysqlanalyze-500 mysql_client_test-500 mysqlbinlog-500 mysql_client_test_embedded-500 mysqlbug-500 mysql_config mysqlcheck-500 mysql_config-500 mysqld-500 mysql_convert_table_format-500 mysqld_multi-500 mysql_create_system_tables-500 mysqld_safe-500 mysql_explain_log-500 mysqldump-500 mysql_find_rows-500 mysqldumpslow-500 mysql_fix_extensions-500 mysqlhotcopy-500 mysql_fix_privilege_tables-500 mysqlimport-500 mysql_install_db-500 mysqlmanager-500 mysql_secure_installation-500 mysqloptimize-500 mysql_setpermission-500 mysqlrepair-500 mysql_tableinfo-500 mysqlshow-500 mysql_tzinfo_to_sql-500 mysqltest-500 mysql_waitpid-500 mysqltest_embedded-500 mysql_zap-500 mysqltestmanager-500 mysqlaccess-500 mysqltestmanager-pwgen-500 mysqladmin-500 mysqltestmanagerc-500 Any tips at all would be helpful, I'd like to get mysql running...
I'd really vote for unslotted ebuilds as well.. I installed 4.1.18 via my local overlay (just copying 4.1.14 or .16 to .18 worked for me) because I ran into the same issues here. Why is there a need for all those symlinks anyway? This whole idea only makes sense for using 4.x and 5.x next to each other, imo. I'm not sure what setup would do that, though.. And what good are those symlinks? Would the admin constantly switch with eselect between versions or stick to $ mysql -u foo -p (for the current default) and $ mysql-5.1.0 -u foo -p anyway? Frankly I don't see any reason for this step. Call me ignorant, but it seems to be too much work, causing quite a headache and doesn't solve any real world problem?
Ah, now that I've actually *READ* the info about slotted ebuilds and added the line "mysql_slot_500=( )" to my /etc/conf.d/mysql, everything is starting to work. I still find it annoying that the slotted ebuilds require the commands 'mysql-500' and 'mysqladmin-500' - I would like some way to make symlinks to all those commands for the "default" install. I erroneously assumed that's what 'eselect' was supposed to do.
Comment #22: The purpose of eselect mysql *is* to create those symlinks. It's just that it seems not to work for some.
not only for some, "-r4" is totally broken , "eselect-mysql-1.0.0-r5" is in the tree right now :-(
for those with !!! Error: File "/usr/bin/mysql_explain_log-500" is not suitable for symlink error an "action" has been added to eselect mysql, "distclean". It remove any files left from previous install of MySQL, it do a "rm -rf" so please prior to run that check how it work in /usr/share/eselect/modules/mysql.eselect , the function is do_distclean() at the end of the module and it's long no more than 15 rows.