The default gentoo installation comes with perl, I guess. A non-threaded perl. When installing applications via portage, it resolves all the dependecies. If required, it installs Perl modules such as virtual/perl-Digest-MD5 or dev-perl/HTML-Parser.
When you decide to set "+ithreads" in your USEFLAGS and rebuild perl, everything seems to work at first. However, the modules (built for the "old" perl) won't (can't). Portage though lists them as "installed and up to date" as they were installed earlier.
Trying to update any program that requires one of those perl modules fails due to missing perl modules, although portage still thinks they are installed.
Re-emerging any perl module installed manually resolves the problem. This is obvious when it happens shortly after switching to a threaded perl installation, however after some months this could cause some trouble. I think this should be changed. If not (yet) possible in a generic manner (revdep-rebuild?), I would like to see some warnings when emerging perl with "+ithreads". Like: "* If you are just replacing a non-threaded perl with a threaded perl, please make sure you rebuild all your modules properly".
emerge --newuse world; this is definitely not a portage bug.
Sorry, I should have stated this more clearly: emerge --newuse cannot resolve the problem, because the perl modules affected do not have the ithreads use flag.
Steps to reproduce:
- Have a standard perl
- Install dev-perl/HTML-Parser
- Try "perl -MHTML::Parser -eexit" -> works (no output)
- Add +ithreads to your use flags
- run "-emerge --newuse world" -> emerges perl, leaves dev-perl/HTML-Parser untouched.
- Try "perl -MHTML::Parser -eexit", which fails due to a new perl but an old module still being in /usr/lib/perl5/vendor_perl/5.8.8/i686-linux/ instead of /usr/lib/perl5/vendor_perl/5.8.8/i686-linux-thread-multi/ (on my machine).
Those modules need a rebuild after building a new perl.
perl ebuild already warns you about ithreads; nothing that portage could do here.