Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 687482 - app-portage/unsymlink-lib --migrate leaves restart commands broken
Summary: app-portage/unsymlink-lib --migrate leaves restart commands broken
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Michał Górny
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-05 21:33 UTC by Harris Landgarten
Modified: 2019-06-09 10:41 UTC (History)
2 users (show)

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 Harris Landgarten 2019-06-05 21:33:01 UTC
After running sudo unsymlink-libs --migrate. I was unable to initiate a reboot and the rollback command given couldn't find unsymlink-libs

$ sudo systemctl reboot
systemctl: error while loading shared libraries: libsystemd-shared-242.so: cannot open shared object file: No such file or directory

harrisl@harrisl-desktop ~ $ sudo /usr/lib/python-exec/python3.6/unsymlink-lib --rollback
sudo: /usr/lib/python-exec/python3.6/unsymlink-lib: command not found

I tried running /usr/sbin/env-update to fix library paths but the link was broken.

I managed to rollback by running /usr/lib64/python-exec/python3.6/unsymlink-lib --rollback.
Comment 1 Brian Evans (RETIRED) gentoo-dev 2019-06-05 22:31:20 UTC
(In reply to Harris Landgarten from comment #0)
> After running sudo unsymlink-libs --migrate. I was unable to initiate a
> reboot and the rollback command given couldn't find unsymlink-libs
> 
> $ sudo systemctl reboot
> systemctl: error while loading shared libraries: libsystemd-shared-242.so:
> cannot open shared object file: No such file or directory
> 
> harrisl@harrisl-desktop ~ $ sudo
> /usr/lib/python-exec/python3.6/unsymlink-lib --rollback
> sudo: /usr/lib/python-exec/python3.6/unsymlink-lib: command not found
> 
> I tried running /usr/sbin/env-update to fix library paths but the link was
> broken.
> 
> I managed to rollback by running
> /usr/lib64/python-exec/python3.6/unsymlink-lib --rollback.

Your problem is likely related 'sudo unsymlink-libs' please don't run it like that.  Actually become root to run this conversion.  Either login in a terminal, use 'su -' or use 'sudo -i' to get a root login shell
Comment 2 Harris Landgarten 2019-06-06 01:38:47 UTC
exact same results running as root

# unsymlink-lib --migrate
[b'/lib32'] & b'/lib' -> b'/lib.new' ...
[b'/usr/lib32'] & b'/usr/lib' -> b'/usr/lib.new' ...
[b'/usr/local/lib32'] & b'/usr/local/lib' -> b'/usr/local/lib.new' ...
Updating: b'/lib' -> lib.new ...
Updating: b'/usr/lib' -> lib.new ...
Updating: b'/usr/local/lib' -> lib.new ...

# emerge --info
-bash: emerge: command not found

# /usr/lib/python-exec/python3.6/unsymlink-lib --rollback
-bash: /usr/lib/python-exec/python3.6/unsymlink-lib: No such file or directory

/usr/lib64/python-exec/python3.6/unsymlink-lib --rollback
Updating: b'/lib' -> lib64 ...
Updating: b'/usr/lib' -> lib64 ...
Updating: b'/usr/local/lib' -> lib64 ...
Removing: b'/lib.new' ...
Removing: b'/usr/lib.new' ...
Removing: b'/usr/local/lib.new' ...


Rollback complete. Your system should now be as before the migration.
Please look into fixing your issues and try again.
Comment 3 Brian Evans (RETIRED) gentoo-dev 2019-06-06 19:03:20 UTC
OK.  I would suggest posting the following output (prior to migration):

emerge --info

ls -ld /lib{,32,64} /usr/lib{,32,64}

qlist unsymlink-lib python-exec
Comment 4 Harris Landgarten 2019-06-06 19:30:31 UTC
$ emerge --info
Portage 2.3.67 (python 3.6.8-final-0, default/linux/amd64/17.0/desktop/gnome/systemd, gcc-9.1.0, glibc-2.29-r2, 5.1.7-gentoo x86_64)
=================================================================
System uname: Linux-5.1.7-gentoo-x86_64-Intel-R-_Core-TM-_i7_CPU_970_@_3.20GHz-with-gentoo-2.6
KiB Mem:    24736068 total,   9281120 free
KiB Swap:   62914548 total,  62801908 free
Timestamp of repository gentoo: Thu, 06 Jun 2019 17:45:23 +0000
sh bash 5.0_p7
ld GNU ld (Gentoo 2.31.1 p7) 2.31.1
app-shells/bash:          5.0_p7::<unknown repository>
dev-java/java-config:     2.2.0-r4::<unknown repository>
dev-lang/perl:            5.30.0::<unknown repository>
dev-lang/python:          2.7.16::<unknown repository>, 3.5.7::<unknown repository>, 3.6.8::<unknown repository>, 3.7.3::<unknown repository>
dev-util/cmake:           3.14.5::<unknown repository>
dev-util/pkgconfig:       0.29.2::<unknown repository>
sys-apps/baselayout:      2.6-r1::<unknown repository>
sys-apps/sandbox:         2.17::<unknown repository>
sys-devel/autoconf:       2.13-r1::<unknown repository>, 2.64-r1::<unknown repository>, 2.69-r4::<unknown repository>
sys-devel/automake:       1.11.6-r3::<unknown repository>, 1.13.4-r2::<unknown repository>, 1.14.1-r2::<unknown repository>, 1.15.1-r2::<unknown repository>, 1.16.1-r1::<unknown repository>
sys-devel/binutils:       2.31.1-r6::<unknown repository>, 2.32-r1::<unknown repository>
sys-devel/gcc:            6.4.0-r5::<unknown repository>, 7.3.0-r6::<unknown repository>, 7.4.0-r2::<unknown repository>, 8.2.0-r6::<unknown repository>, 8.3.0-r1::<unknown repository>, 9.1.0-r1::<unknown repository>
sys-devel/gcc-config:     2.0::<unknown repository>
sys-devel/libtool:        2.4.6-r5::<unknown repository>
sys-devel/make:           4.2.1-r4::<unknown repository>
sys-kernel/linux-headers: 5.0-r1::<unknown repository> (virtual/os-headers)
sys-libs/glibc:           2.29-r2::<unknown repository>
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-extra-opts: 
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-max-age: 24

sublime-text
    location: /var/lib/layman/sublime-text
    masters: gentoo
    priority: 50

vmware
    location: /var/lib/layman/vmware
    masters: gentoo
    priority: 50

zugaina
    location: /var/lib/layman/zugaina
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j20"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi alsa amd64 berkdb bindist bluetooth branding bzip2 cairo cdda cdr cli colord crypt cups cxx dbus dri dts dvd dvdr eds emboss encode evo exif fam flac fortran gdbm gif glamor gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk iconv introspection ipv6 jpeg lcms ldap libnotify libsecret libtirpc mad mng mp3 mp4 mpeg multilib nautilus ncurses networkmanager nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio qt5 readline sdl seccomp spell ssl startup-notification svg systemd tcpd tiff tracker truetype udev udisks unicode upower usb vorbis wayland wxwidgets x264 xattr xcb xml xv xvid zlib" ABI_X86="64 32" 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" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 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 cgi cgid 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" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx sse sse2 ssse3 sse4_1 sse4_2 aes sse3 mmxext" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-1" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_5 python3_6 python3_7" RUBY_TARGETS="ruby24 ruby25 ruby26" USERLAND="GNU" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa dummy v4l" 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:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

$ ls -ld /lib{,32,64} /usr/lib{,32,64}
lrwxrwxrwx 1 root root      5 Jun  5 21:33 /lib -> lib64
drwxr-xr-x 1 root root   1518 May 23 10:01 /lib32
drwxr-xr-x 1 root root   5192 Jun  5 10:14 /lib64
lrwxrwxrwx 1 root root      5 Jun  5 21:33 /usr/lib -> lib64
drwxr-xr-x 1 root root  77042 Jun  5 22:08 /usr/lib32
drwxr-xr-x 1 root root 158404 Jun  6 14:50 /usr/lib64

$ qlist unsymlink-lib python-exec
/usr/bin/unsymlink-lib
/usr/lib64/python-exec/python3.6/unsymlink-lib
/usr/share/doc/unsymlink-lib-14/README
/usr/bin/python
/usr/bin/python2
/usr/bin/python3
/usr/bin/python-config
/usr/bin/python2-config
/usr/bin/python3-config
/usr/bin/2to3
/usr/bin/idle
/usr/bin/pydoc
/usr/bin/pyvenv
/usr/bin/python-exec2c
/usr/lib64/python-exec/python-exec2
/usr/share/doc/python-exec-2.4.6/README
/usr/share/doc/python-exec-2.4.6/NEWS
/usr/lib64/debug/usr/bin/python-exec2c.debug
/etc/python-exec/python-exec.conf
Comment 5 Brian Evans (RETIRED) gentoo-dev 2019-06-06 19:45:13 UTC
(In reply to Harris Landgarten from comment #4)
> $ emerge --info
> Portage 2.3.67 (python 3.6.8-final-0,
> default/linux/amd64/17.0/desktop/gnome/systemd, gcc-9.1.0, glibc-2.29-r2,
> 5.1.7-gentoo x86_64)
> =================================================================
> System uname:
> Linux-5.1.7-gentoo-x86_64-Intel-R-_Core-TM-_i7_CPU_970_@_3.20GHz-with-gentoo-
> 2.6
> KiB Mem:    24736068 total,   9281120 free
> KiB Swap:   62914548 total,  62801908 free
> Timestamp of repository gentoo: Thu, 06 Jun 2019 17:45:23 +0000
> sh bash 5.0_p7
> ld GNU ld (Gentoo 2.31.1 p7) 2.31.1
> app-shells/bash:          5.0_p7::<unknown repository>
> dev-java/java-config:     2.2.0-r4::<unknown repository>
> dev-lang/perl:            5.30.0::<unknown repository>
> dev-lang/python:          2.7.16::<unknown repository>, 3.5.7::<unknown
> repository>, 3.6.8::<unknown repository>, 3.7.3::<unknown repository>

All these <unknown repository> entries concerns me that you have installed many packages from somewhere else besides gentoo main repo.

> /usr/lib64/python-exec/python3.6/unsymlink-lib
> /usr/lib64/python-exec/python-exec2
> /usr/lib64/debug/usr/bin/python-exec2c.debug

These should always be listed as /usr/lib in the qlist even in a 17.0 installation.  Something is off on your local install for sure.
Comment 6 Harris Landgarten 2019-06-06 20:17:33 UTC
Those unknown repositories are an artifact of paludis vs portage installation. The only overlays in current use are vmware and sublime_text. Everything else is from the gentoo tree or my local overlay which has nothing of importance.
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-06-06 20:26:27 UTC
(In reply to Harris Landgarten from comment #6)
> Those unknown repositories are an artifact of paludis vs portage
> installation. The only overlays in current use are vmware and sublime_text.
> Everything else is from the gentoo tree or my local overlay which has
> nothing of importance.

I'm afraid your installed file database is corrupt as a result.  You may try rebuilding everything installed into lib* (provided it would reinstall correctly), i.e.:

# emerge -1v /usr/lib* /lib*
Comment 8 Harris Landgarten 2019-06-06 20:50:04 UTC
$ ls -l /lib
lrwxrwxrwx 1 root root 5 Jun  5 21:33 /lib -> lib64
$ ls -l /lib
lrwxrwxrwx 1 root root 5 Jun  5 21:33 /lib -> lib64


both /lib and /usr/lib are symlinks
Comment 9 Harris Landgarten 2019-06-06 20:52:38 UTC
$ ls -l /usr/lib
lrwxrwxrwx 1 root root 5 Jun  5 21:33 /usr/lib -> lib64
Comment 10 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-06-09 10:41:31 UTC
vardb should have logical paths recorded, not physical.  If Paludis recorded physical paths, it's broken and you need to rebuild your system with a package manager that is creating correct entries.