Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 161490 - /etc/ld.so.cache is regenerated for every unmerged package when running emerge -C
Summary: /etc/ld.so.cache is regenerated for every unmerged package when running emerg...
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Enhancement/Feature Requests (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Portage team
URL: http://forums.gentoo.org/viewtopic-t-...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-11 09:24 UTC by Nuno Silva
Modified: 2023-05-26 13:44 UTC (History)
3 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 Nuno Silva 2007-01-11 09:24:27 UTC
I had a long list of packages to unmerge (I was removing KDE from a computer), and emerge -C was run with all the package names as arguments (and, to make sure I was not running an emerge -C for each package, I copied and pasted the package names after the emerge -C command, instead of using the little one-line bash script I mentioned in the forums).

The issue is that portage is regenerating the /etc/ld.so.cache for each package which is unmerged, instead of running it once, at the end of the emerge -C job. (I just calculated that it must have spent about an hour with these regenerations)

As it seems that there's no reason to enforce this, I'm suggesting the unmerging code is changed in a way it doesn't regenerate ld.so.cache if portage is running in -C mode. (The emerge code should run it once when exiting)

Reproducible: Always

Steps to Reproduce:
1. Create a list of packages to unmerge
2. run # emerge -C package list
3. Look at the output



Expected Results:  
Portage should regenerate /etc/ld.so.cache only once, if it is just being executed with the -C argument.

Portage 2.1.1-r2 (default-linux/x86/2006.1/desktop, gcc-4.1.1, glibc-2.4-r4, 2.6.16-suspend2-r8 i686)
=================================================================
System uname: 2.6.16-suspend2-r8 i686 Mobile Pentium II
Gentoo Base System version 1.12.6
Last Sync: Wed, 03 Jan 2007 21:50:02 +0000
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
ccache version 2.3 [disabled]
app-admin/eselect-compiler: [Not Present]
dev-java/java-config: 1.2.11-r1
dev-lang/python:     2.3.3-r1, 2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.3
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.4.3-r4, 1.5.22
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=i686 -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /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/"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -march=i686 -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distcc distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="ftp://darkstar.ist.utl.pt/pub/gentoo"
LC_ALL="pt_PT.utf8"
LINGUAS="pt en he"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /usr/portage/local/layman/sunrise"
SYNC="rsync://193.136.198.175/gentoo-portage"
USE="x86 X aim alsa alsa_cards_ali5451 alsa_cards_als4000 alsa_cards_atiixp alsa_cards_atiixp-modem alsa_cards_bt87x alsa_cards_ca0106 alsa_cards_cmipci alsa_cards_emu10k1x alsa_cards_ens1370 alsa_cards_ens1371 alsa_cards_es1938 alsa_cards_es1968 alsa_cards_fm801 alsa_cards_hda-intel alsa_cards_intel8x0 alsa_cards_intel8x0m alsa_cards_maestro3 alsa_cards_trident alsa_cards_usb-audio alsa_cards_via82xx alsa_cards_via82xx-modem alsa_cards_ymfpci alsa_pcm_plugins_adpcm alsa_pcm_plugins_alaw alsa_pcm_plugins_asym alsa_pcm_plugins_copy alsa_pcm_plugins_dmix alsa_pcm_plugins_dshare alsa_pcm_plugins_dsnoop alsa_pcm_plugins_empty alsa_pcm_plugins_extplug alsa_pcm_plugins_file alsa_pcm_plugins_hooks alsa_pcm_plugins_iec958 alsa_pcm_plugins_ioplug alsa_pcm_plugins_ladspa alsa_pcm_plugins_lfloat alsa_pcm_plugins_linear alsa_pcm_plugins_meter alsa_pcm_plugins_mulaw alsa_pcm_plugins_multi alsa_pcm_plugins_null alsa_pcm_plugins_plug alsa_pcm_plugins_rate alsa_pcm_plugins_route alsa_pcm_plugins_share alsa_pcm_plugins_shm alsa_pcm_plugins_softvol amuled apache2 asf bash-completion berkdb bidi bitmap-fonts bittorrent bluetooth bzip2 cairo cdr cli cpudetection cracklib crypt cups dbus dlloader double-precision dri dv dvd dvdr eds elibc_glibc emboss encode esd fam festival firefox fortran gdbm gif gimpprint gnuplot gpgme gpm gstreamer gtk gtk2 hal iconv icq input_devices_hyperpen input_devices_keyboard input_devices_mouse input_devices_synaptics ipv6 irc irda isdnlog jabber javascript john jpeg kernel_linux latex ldap libg++ linguas_en linguas_he linguas_pt lzo mad madwifi mbox mikmod mime mimencode mmx mp3 mpeg msn nas ncurses nls nntp nptl nptlonly ogg opengl oscar pam pcmcia pcre perl png pop ppds pppd python qt3 qt4 quicktime readline reflection samba sdl session sms smtp spell spl ssl svg tcpd tetex theora tiff truetype truetype-fonts type1-fonts udev unicode usb userland_GNU userlocales utf8 v4l video_cards_fbdev video_cards_siliconmotion video_cards_vesa vim-with-x vorbis wifi win32codecs wma xml xorg xv xvid yahoo zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-06-21 15:23:58 UTC
*** Bug 182794 has been marked as a duplicate of this bug. ***
Comment 2 Gilles Dartiguelongue (RETIRED) gentoo-dev 2013-02-15 13:32:56 UTC
If think this can be generalized as a request for "run-once" hook for portage and other PMs.

I've always found nice how debian can run all the gconf, glib-schemas, fdo .desktop, fdo mime handling only once after installing everything.

I think we should enable that somehow in Gentoo as well.
Comment 3 Zac Medico gentoo-dev 2013-02-15 17:12:35 UTC
(In reply to comment #2)

That soulds like bug 244518.
Comment 4 Gilles Dartiguelongue (RETIRED) gentoo-dev 2013-02-15 17:52:33 UTC
indeed. I'd say they are the same.
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-05-26 13:44:26 UTC
This might make calls in pkg_{pre/post}rm a bit slower but probably not enough to worry about.

But fwiw, a related (not the same issue) got fixed a while ago:

commit e893f4fc12eb618318b1945ce7a05a94fb1ea1b4
Author: Zac Medico <zmedico@gentoo.org>
Date:   Sun Apr 17 12:12:40 2022 -0700

    MergeProcess: propagate mtimedb["ldpath"] to parent process (bug 836375)

    Use an instance of multiprocessing.Pipe to propagate mtimedb["ldpath"]
    from the MergeProcess child process to the parent process. This fixes
    env_update calls to avoid unnecessary regeneration of ld.so.cache in
    cases where mtimedb["ldpath"] has not changed since the last call to
    env_update.

    Bug: https://bugs.gentoo.org/836375
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

commit 964c0e16172b76a8ebdd737cd8919870ae2b5f96
Author: Mike Frysinger <vapier@chromium.org>
Date:   Tue Mar 29 14:56:55 2022 +0100

    vartree: skip env-update if no updates were merged

    This speeds up virtual/ installs by not constantly re-running env-update.

    [sam: cherry-picked from chromiumos' third_party/portage_tool repo]
    (cherry picked from commit 87ac3566ebb7155a57876d345849bd0fd6878c0e)

    Bug: https://bugs.gentoo.org/836375
    Signed-off-by: Sam James <sam@gentoo.org>