I have tried this: # emerge HTML-Table # /usr/sbin/regenworld ... packege added into the world file # emerge -C HTML-Table # /usr/sbin/regenworld ... package is not in world file # emerge -1 HTML-Table # /usr/sbin/regenworld ... packege added into the world file I think, that if I emerge some package, then I unemerge it and then emerge it like "oneshot" it should not be added into the world file. # emerge --info Portage 2.1-r2 (default-linux/x86/2006.0, gcc-3.4.6, glibc-2.3.6-r4, 2.6.16.19 i686) ================================================================= System uname: 2.6.16.19 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz Gentoo Base System version 1.12.4 app-admin/eselect-compiler: [Not Present] dev-lang/python: 2.3.5-r2, 2.4.3-r1 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: [Not Present] dev-util/confcache: [Not Present] 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-r2 sys-devel/binutils: 2.16.1-r3 sys-devel/gcc-config: 1.3.13-r2 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O3 -march=pentium4 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo" CXXFLAGS="-O3 -march=pentium4 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict" GENTOO_MIRRORS="http://mirror.switch.ch/ftp/mirror/gentoo/" LANG="en_US.UTF-8" LC_ALL="en_US.UTF-8" MAKEOPTS="-j2" 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" SYNC="rsync://videosrv1.cern.ch/gentoo-portage" USE="x86 X alsa apache2 arts avi berkdb bitmap-fonts cli crypt cups dlloader dri eds emboss encode foomaticdb gdbm gif gpm gstreamer gtk gtk2 imlib ipv6 isdnlog jpeg kde libg++ libwww mad mikmod mmx mp3 mpeg ncurses nls nptl ogg opengl oss pam pcre pdflib perl png posix pppd python qt3 qt4 quicktime readline reflection sdl session spl sse sse2 ssl truetype truetype-fonts type1-fonts udev unicode vorbis xinerama xml xmms xorg xv zlib elibc_glibc input_devices_keyboard input_devices_mouse kernel_linux userland_GNU video_cards_v4l" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS
Why are you running regenworld after emerging the thing w/ --oneshot? Really goes beyond me.
(In reply to comment #1) > Why are you running regenworld after emerging the thing w/ --oneshot? Really > goes beyond me. > Only to be sure.
I'd like to see the current regenworld implementation replaced with a dependency based approach. It could reuse the depclean algorithm, but instead of uninstalling packages it would add them to the world set.
Changing the summary. Regenworld really doesn't do what you think it's doing.
*** Bug 149619 has been marked as a duplicate of this bug. ***
just one comment: i think *everybody* has at least one package in the system installed with '--oneshot'. If we agree what I wrote above *nobody* should never attempt to run regenworld because all "--oneshot" actions will be added to world. My suggestion is: -> remove this script until is not "perfect". -> add some short notice, warning about this issue. If I run: regenworld -help I get the following message, and I can't understand that packages added with oneshot will be added to world list: regenworld --help This script regenerates the portage world file by checking the portage logfile for all actions that you've done in the past. It ignores any arguments except --help. It is recommended that you make a backup of your existing world file (var/lib/portage/world) before using this tool.
regenworld is a great way to recover from a corrupted worldfile.. except for it putting every installed package in the worldfile, dependencies and all. Why can't regenworld have an option for looking at the commands in the emerge.log, compare that to unmerge info and then put the results in the worldfile?
Feel free to submit a patch.
(In reply to comment #8) > Feel free to submit a patch. > I have a similar issue, in which I know I've emerged packages (after compile failures, mod the package and then emerge, leaving oneshot off. The issue that brings me here, I run with many non-stable packages, and a couple of weeks ago, kde-4.1.2 was apparently unmasked, thus it installed, and I determined rather quickly that I did not want it on my system, as it is currently unusable on multihead system, so I masked kde-base/kde-meta-4*, unmerged kde-meta-4.1.2 and executed emerge --depclean to remove the remaining packages, yet something I have been unable to determine is still trying to pull in kdelibs-4.1.2. Mythbrowser is the package that appears to be doing this, but none of it's dependencies require kde-4, so I've been forced also to mask kdelibs-4.1.2.
There is a __noncandidatematcher__ regular expression that's supposed to exclude emerge.log lines containing --oneshot. However, there's at least one bug that I noticed is triggered by emerge commands which use the --exclude option. It seems that regenworld treats --exclude atoms like normal atoms, and adds them to the world file.