Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 122858 - unsuccesful slotting of mysql
Summary: unsuccesful slotting of mysql
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Francesco R. (RETIRED)
URL: http://forums.gentoo.org/viewtopic-t-...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-14 16:14 UTC by Fedor
Modified: 2006-02-14 17:54 UTC (History)
0 users

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 Fedor 2006-02-14 16:14:25 UTC
The eselect mysql set 1 does not execute correctly. 

# eselect mysql list
Available MySQL versions:
[1] 5.0.x
# eselect mysql show
Current default MySQL version:
(unset)
# eselect mysql set 1
# eselect mysql show
Current default MySQL version:
(unset) 

More gentoo users seem to have this problem, see the attached url.

I tried to track down this problem. I think it's got something to do with line 218 in mysql.eselect:

[[ -f "${filename}" ]] || [[ -d "${filename}" ]] \
                       || filename="${filename}.gz"

The filename is set instead of being checked here. I'm not quite sure how to fix it. 



System uname: 2.6.15-gentoo-r1 i686 Intel(R) Pentium(R) M processor 1.70GHz
Gentoo Base System version 1.12.0_pre15
dev-lang/python:     2.3.5-r2, 2.4.2-r1
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 -mtune=pentium-m -march=pentium-m  -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /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 -mtune=pentium-m -march=pentium-m  -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://ftp.easynet.nl/mirror/gentoo/ ftp://ftp.easynet.nl/mirror/gentoo/ http://ftp.snt.utwente.nl/pub/os/linux/gentoo ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo ftp://mirror.scarlet-internet.nl/pub/gentoo ftp://mirror.nutsmaas.nl/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.nl.gentoo.org/gentoo-portage"
USE="x86 X aac aalib acpi alsa apm avi bash-completion berkdb bitmap-fonts bluetooth bzip2 cdr crypt cups dba directfb dvd dvdr dvdread eds emacs emboss encode esd ethereal fbcon ffmpeg flac foomaticdb fortran gdbm gif gnome gnuplot gpm gps gstreamer gtk gtk2 guile hal imap imlib innodb ipv6 java javascript jpeg jython lcms libg++ libwww mad maildir mikmod mmx motif mozilla mp3 mpeg mysql mythtv ncurses nls numeric offensive ogg oggvorbis opengl oss pam pcmcia pcre pdflib perl png postgis postgres python qt quicktime readline ruby sdl session spell sse sse2 ssl svg tcltk tcpd tetex theora tidy tiff truetype truetype-fonts type1-fonts unicode usb vorbis win32codecs xemacs xine xml xml2 xmlrpc xmms xosd xsl xv xvid zlib elibc_glibc kernel_linux userland_GNU"
Unset:  ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
Comment 1 Francesco R. (RETIRED) gentoo-dev 2006-02-14 17:53:08 UTC
you tracked the problem correctly, the problem is there, but that one need to be an assignment, because when the list of files to be created the ebuild can't know if the file will have the .gz extension (man pages are compressed after it's creation) (another bug has been already filled for that).

The mistake here is to use $filename , we are already in the directory and filename is a complete path to the file, if you see fe lines below, another var is defined $linkname, this one contain only the name of the file, we need to use this one, also the check is'nt complete, it's stupid assume that if a file is neither a "file" or a "directory" it will for sure be a gzip compressed file.

so the check and assignment must looklike this one:

linkname="$(basename "${filename}")"
if ! [[ -f "${linkname}" ]] \
&& ! [[ -d "${linkname}" ]] \
&& [[ -f "${linkname}.gz" ]]
then
    linkname="${linkname}.gz"
fi

thanks for your effort
Comment 2 Francesco R. (RETIRED) gentoo-dev 2006-02-14 17:54:27 UTC
please wait a couple of hours, then emerge --sync and upgrade eselect-mysql