Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 327441 - app-admin/eselect-postgresql - unmerge acting potentially dangerously
Summary: app-admin/eselect-postgresql - unmerge acting potentially dangerously
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High critical (vote)
Assignee: PgSQL Bugs
URL:
Whiteboard:
Keywords:
: 331919 (view as bug list)
Depends on:
Blocks: 343883
  Show dependency tree
 
Reported: 2010-07-08 07:48 UTC by Priit Laes (IRC: plaes)
Modified: 2011-04-02 12:09 UTC (History)
5 users (show)

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


Attachments
Random postgresql-* unmerge log (20100712-223456.log.gz,333 bytes, application/octet-stream)
2010-07-13 21:28 UTC, Jeroen Roovers (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Priit Laes (IRC: plaes) 2010-07-08 07:48:19 UTC
Why does it do this?
[snip]
>>> Unmerging dev-db/postgresql-base-8.1.21-r1...
Creating /usr/bin/bin symlink...
Creating /usr/bin/boot symlink...
Creating /usr/bin/core symlink...
Creating /usr/bin/dev symlink...
Creating /usr/bin/dump.sql symlink...
Creating /usr/bin/etc symlink...
Creating /usr/bin/home symlink...
Creating /usr/bin/lib symlink...
Creating /usr/bin/lib32 symlink...
Creating /usr/bin/lib64 symlink...
Creating /usr/bin/libufconfig.so symlink...
Creating /usr/bin/lost+found symlink...
Creating /usr/bin/media symlink...
Creating /usr/bin/mnt symlink...
!!! Error: /usr/bin/opt exists and is not a symbolic link
Call stack:
    * do_update (postgresql.eselect:256)
    * check_do (core.bash:24)
    * do_action (core.bash:89)
    * main (eselect:191)
exiting
>>> Unmerging dev-db/postgresql-server-8.1.21-r1...
Removing /usr/bin/bin symlink..
Removing /usr/bin/boot symlink..
Removing /usr/bin/clean_pending.pl symlink..
Removing /usr/bin/core symlink..
Removing /usr/bin/dbf2pg symlink..
Removing /usr/bin/DBMirror.pl symlink..
Removing /usr/bin/dev symlink..
Removing /usr/bin/dump.sql symlink..
Removing /usr/bin/etc symlink..
Removing /usr/bin/fti.pl symlink..
Removing /usr/bin/home symlink..
Removing /usr/bin/ipcclean symlink..
Removing /usr/bin/lib symlink..
Removing /usr/bin/lib32 symlink..
Removing /usr/bin/lib64 symlink..
Removing /usr/bin/libufconfig.so symlink..
Removing /usr/bin/lost+found symlink..
Removing /usr/bin/media symlink..
Removing /usr/bin/mnt symlink..
[/snip]
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2010-07-08 22:36:05 UTC
That doesn't look good. Please post your `emerge --info' (quickly, because I'm assigning now).
Comment 2 Priit Laes (IRC: plaes) 2010-07-09 05:33:18 UTC
plaes@chi ~ $ emerge --info
Portage 2.2_rc67 (default/linux/amd64/10.0/no-multilib, gcc-4.4.4, glibc-2.11.2-r0, 2.6.35-rc3-00391-g97e0214 x86_64)
=================================================================
System uname: Linux-2.6.35-rc3-00391-g97e0214-x86_64-Intel-R-_Core-TM-2_CPU_L7400_@_1.50GHz-with-gentoo-2.0.1
Timestamp of tree: Fri, 09 Jul 2010 05:00:23 +0000
distcc 3.1 x86_64-pc-linux-gnu [disabled]
ccache version 2.4 [enabled]
app-shells/bash:     4.1_p7
dev-java/java-config: 2.1.11
dev-lang/python:     2.6.5-r2, 3.1.2-r3
dev-util/ccache:     2.4-r8
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.1-r1
sys-apps/sandbox:    2.2
sys-devel/autoconf:  2.13, 2.65-r1
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.4-r1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.10
virtual/os-headers:  2.6.34
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -ggdb -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -ggdb -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests ccache collision-protect distlocks fixpackages multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="et_EE.UTF-8"
LDFLAGS="-Wl,--as-needed"
LINGUAS="en et"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
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="/var/lib/layman/tryton /var/lib/layman/esteid /home/plaes/code/gentoo/gnome /home/plaes/code/gentoo/local"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acpi adns alsa amd64 amr apache2 ares autoipd avahi berkdb blas bluetooth bogofilter branding bzip2 cairo cdr cjk cli consolekit cracklib crypt cups curl cxx daap dbus device-mapper dga dirac djvu dri dvd dvdr dvi eds empathy encode exif faac faad fam fat ffmpeg fftw flac fortran fuse galago gcj gd gdbm gif gimp git glib glitz gmp gnome gnome-keyring gnuplot gnutls gphoto2 gs gsl gstreamer gtk h323 hal hdri iconv idn imap introspection ipv6 jingle jpeg jpeg2k kdrive kpathsea lapack laptop latex lcms libffi libnotify lzma lzo mad mercurial mikmod mmx mng moonlight mozdevelop mp3 mpeg msn mtp mudflap music musicbrainz nautilus ncurses network network-cron networkmanager nls nptl nptlonly nsplugin numpy offensive ogg openexr opengl openmp pam pch pcmcia pcre pcsc-lite pdf perl png policykit pppd pygments python qt3support raw readline reflection resolvconf rtmp sasl schroedinger sdl session sip smartcard smp sound speex spl sse sse2 ssl ssse3 startup-notification subversion svg sysfs tcpd theora tiff truetype udev unicode upnp usb v4l v4l2 vaapi vdpau vim-syntax vorbis vpx webkit wifi wps x264 xcb xinerama xml xmp xorg xulrunner xv xvid xvmc zeroconf zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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 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 ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" CAMERAS="adc65 agfa_cl20 aox barbie canon casio_qv clicksmart310 digigr8 digita dimagev dimera3500 directory enigma13 fuji gsmart300 hp215 iclick jamcam jd11 jl2005a kodak_dc120 kodak_dc210 kodak_dc240 kodak_dc3200 kodak_ez200 konica konica_qm150 largan lg_gsm mars mustek panasonic_coolshot panasonic_dc1000 panasonic_dc1580 panasonic_l859 pccam300 pccam600 polaroid_pdc320 polaroid_pdc640 polaroid_pdc700 ptp2 ricoh ricoh_g3 samsung sierra sipix_blink sipix_blink2 sipix_web2 smal sonix sony_dscf1 sony_dscf55 soundvision spca50x sq905 stv0674 stv0680 sx330z template topfield toshiba_pdrm11" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en et" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2010-07-13 21:27:27 UTC
/usr/share/eselect/modules/postgresql.eselect
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2010-07-13 21:28:05 UTC
Created attachment 238639 [details]
Random postgresql-* unmerge log
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2010-07-13 21:30:22 UTC
(In reply to comment #4)
> Created an attachment (id=238639) [details]
> Random postgresql-* unmerge log

elmer ~ # for i in /*; do ls -l /usr/bin/$i; done
lrwxrwxrwx 1 root root 38 Jul 13 00:35 /usr/bin//aches -> /usr/lib/eselect-postgresql/binwrapper
lrwxrwxrwx 1 root root 38 Jul 13 00:35 /usr/bin//bin -> /usr/lib/eselect-postgresql/binwrapper
lrwxrwxrwx 1 root root 38 Jul 13 00:35 /usr/bin//boot -> /usr/lib/eselect-postgresql/binwrapper
lrwxrwxrwx 1 root root 38 Jul 13 00:35 /usr/bin//contrib -> /usr/lib/eselect-postgresql/binwrapper
lrwxrwxrwx 1 root root 38 Jul 13 00:35 /usr/bin//dev -> /usr/lib/eselect-postgresql/binwrapper
lrwxrwxrwx 1 root root 38 Jul 13 00:35 /usr/bin//etc -> /usr/lib/eselect-postgresql/binwrapper
lrwxrwxrwx 1 root root 38 Jul 13 00:35 /usr/bin//home -> /usr/lib/eselect-postgresql/binwrapper
lrwxrwxrwx 1 root root 38 Jul 13 00:35 /usr/bin//keeps -> /usr/lib/eselect-postgresql/binwrapper
lrwxrwxrwx 1 root root 38 Jul 13 00:35 /usr/bin//lib -> /usr/lib/eselect-postgresql/binwrapper
lrwxrwxrwx 1 root root 38 Jul 13 00:35 /usr/bin//lost+found -> /usr/lib/eselect-postgresql/binwrapper
lrwxrwxrwx 1 root root 38 Jul 13 00:35 /usr/bin//media -> /usr/lib/eselect-postgresql/binwrapper
lrwxrwxrwx 1 root root 38 Jul 13 00:35 /usr/bin//mnt -> /usr/lib/eselect-postgresql/binwrapper
lrwxrwxrwx 1 root root 38 Jul 13 00:35 /usr/bin//newaches -> /usr/lib/eselect-postgresql/binwrapper
lrwxrwxrwx 1 root root 38 Jul 13 00:35 /usr/bin//opt -> /usr/lib/eselect-postgresql/binwrapper
lrwxrwxrwx 1 root root 38 Jul 13 00:35 /usr/bin//proc -> /usr/lib/eselect-postgresql/binwrapper
-rwxr-xr-x 1 root root 21760 May 12 18:49 /usr/bin//root
ls: cannot access /usr/bin//sbin: No such file or directory
ls: cannot access /usr/bin//service: No such file or directory
ls: cannot access /usr/bin//sys: No such file or directory
ls: cannot access /usr/bin//tmp: No such file or directory
ls: cannot access /usr/bin//usr: No such file or directory
ls: cannot access /usr/bin//var: No such file or directory

It actually does create some of those files too.
Comment 6 Jeroen Roovers (RETIRED) gentoo-dev 2010-07-13 21:38:09 UTC
I don't see why it would want to (re)create symlinks from /usr/bin/something to /usr/lib/eselect-postgresql/binwrapper anyway - the wrapper is there to exec the appropriate /usr/lib/postgresql-${slot}/bin/* anyway, so the symlinks might as well be permanent and need never change after an `eselect postgresql set' change.
Comment 7 Aaron W. Swenson gentoo-dev 2010-07-13 23:00:01 UTC
Interesting. I'm currently overhauling the eselect program. I've been considering dropping the binwrapper script. This seems like as good an excuse as any.
Comment 8 Jeroen Roovers (RETIRED) gentoo-dev 2010-08-10 15:33:02 UTC
*** Bug 331919 has been marked as a duplicate of this bug. ***
Comment 9 Aaron W. Swenson gentoo-dev 2011-03-19 22:07:55 UTC
Please review app-admin/eselect-postgresql-1.0.3. It should resolve this issue.
Comment 10 Priit Laes (IRC: plaes) 2011-03-27 19:39:14 UTC
(In reply to comment #9)
> Please review app-admin/eselect-postgresql-1.0.3. It should resolve this issue.

Looks better now, thanks :)
Comment 11 Aaron W. Swenson gentoo-dev 2011-03-27 21:05:13 UTC
Reopening because >app-admin/eselect-postgresql-1 isn't unmasked yet.

Additionally, I've recently added 1.0.4 to the tree which should resolve a few more potential issues.
Comment 12 Aaron W. Swenson gentoo-dev 2011-04-02 12:09:11 UTC
  02 Apr 2011; Aaron W. Swenson <titanofold@gentoo.org>
  -eselect-postgresql-1.0.3.ebuild, -eselect-postgresql-1.0.4.ebuild,
  +eselect-postgresql-1.0.6.ebuild:
  Remove obsolete ebuilds. Fixes bugs #327441, 352147 and 292122.