Currently, it adds everything it rebuilds into the world file. Bad script! Bad! On a side note, why does it compile everything six times??? :)
The script is almost complete with oneshot added on lines 257 and 284. Please add --oneshot to the emerge command on line 67 and we should be finished with this bug.
Please please... I've just spent "some time" cleaning a rather large world file only to have this script fill it up again!
same here * it compiles everything many times. I stopped during 3rd round bei CTRL-C * adds everything it rebuilds into the world file, now this is really bad. please have a look at this. thank u all.
also have a look at: #62669 libperl_rebuilder should really be a bit more robust http://bugs.gentoo.org/show_bug.cgi?id=62669
http://dev.gentoo.org/~mcummings/perl-cleaner Intended to do the job that libperl_rebuilder does (but cleaner, with oneshots, and better determination of what specifically needs to be reinstalled) as well as some other perl tree maintenance. Feedback most welcome before it hits the tree :)
Cool, Michael! That's much better. Unfortunately, since I had already manually done the rebuilds, I can't test that functionality. The logic seems good, though, and at least it successully determined that no ebuilds needed rebuilding on my systems. I was able to test the .ph updating though, and that works fine for me.
I spoke too soon. I *was* able to test the rebuilding part, and it worked. I did notice that it rebuilt nearly all PH files regardless of whether they needed updating or not. Perhaps a check could be made for which .h's are newer than the corresponding .ph's to rebuild only what's changed? Just a thought...it's certainly functional the way it is. :) And a few minor quibbles, all related to "ask": A) IMHO, the "ask" option should be "-a" to match Gentoo standards. B) "ask" is currently ignored by the PH-rebuilding step. C) When using "ask," it says "Press any key" a couple of times, when in fact, you must press ENTER. D) Perhaps a "pretend" option that assumes negative answers to "ask," again just to match Gentoo standards.
what's wrong with having them in the world file?
because world is supposed to be user maintainable and it's annoying to have crap added there en masse by the libperl_rebuilder script.
One of the primary purposes of portage, like any robust package management system, is to manage dependencies. The world file is supposed to list only those packages that the user explicitly wants. Portage looks at what those packages depend on in order to know what *other* packages need to be installed. Such dependencies sometimes go away, so an installed package is no longer needed. An "emerge depclean" (which I do regularly) will remove them, but only if they have *not* been added to the world file. A good example of packages whose dependencies go away frequently happenes to be perl modules. Allowing them to be added to the world file when the user doesn't want them explicitly means that they will never be removed, even if no longer necessary. This violates portage's dependency management model.
perl-cleaner has now officially replaced libperl_rebuild and does do oneshots for all emerges. closing.