There I was, trying some game not included in portage tree, and it depends on sdl-perl. So I installed sdl-perl to try the game with --oneshot option (don't want the sdl-perl in my world file, right?). The game was silly, so I deleted it and run --depclean and suprise! It does not remove all the packages installed to satisfy sdl-perl. This was installed: ~ # emerge sdl-perl -1 Calculating dependencies... done! >>> Verifying ebuild manifests >>> Starting parallel fetch >>> Emerging (1 of 24) perl-core/IO-Zlib-1.09 >>> Emerging (2 of 24) media-libs/sdl-gfx-2.0.17 *snip* >>> Emerging (22 of 24) perl-core/ExtUtils-ParseXS-2.19 >>> Emerging (23 of 24) virtual/perl-ExtUtils-ParseXS-2.19 >>> Emerging (24 of 24) dev-perl/sdl-perl-2.1.3-r3 >>> Jobs: 24 of 24 complete Load avg: 1.62, 2.53, 2.22 And this is what --depclean wants to remove: maszyn ~ # emerge --depclean >>> Unmerging dev-perl/sdl-perl-2.1.3-r3... >>> Unmerging media-libs/sdl-image-1.2.6-r1... >>> Unmerging media-libs/sdl-gfx-2.0.17... >>> Unmerging media-libs/sdl-ttf-2.0.9... >>> Unmerging media-libs/sdl-net-1.2.7... >>> Unmerging media-libs/sdl-mixer-1.2.8... >>> Unmerging media-libs/libmikmod-3.1.11-r4... >>> Unmerging media-libs/smpeg-0.4.4-r9... >>> Unmerging sys-devel/automake-1.5... Packages installed: 572 Packages in world: 59 Packages in system: 51 Required packages: 563 Number removed: 9 So... we have 24 new packages installed and 9 removed. What about the missing 15? (Full log under URL) Reproducible: Always Actual Results: depclean removed 9 packages. Expected Results: depclean removes all unneeded packages.
There are lots of things that could trigger this sort of behavior. You can use this command to check reverse dependencies of packages: emerge -pv --depclean <atom> ...
This is a list of installed and not --depcleaned packages: maszyn ~ # emerge -pv --depclean dev-perl/Compress-Raw-Bzip2 dev-perl/IO-Compress-Bzip2 dev-perl/IO-String dev-perl/yaml perl-core/Archive-Tar perl-core/ExtUtils-CBuilder perl-core/ExtUtils-ParseXS perl-core/IO-Zlib perl-core/Module-Build perl-core/Package-Constants virtual/perl-Archive-Tar virtual/perl-ExtUtils-CBuilder virtual/perl-ExtUtils-ParseXS virtual/perl-IO-Zlib virtual/perl-Module-Build Calculating dependencies... done! perl-core/ExtUtils-ParseXS-2.19 pulled in by: perl-core/Module-Build-0.28.08 virtual/perl-ExtUtils-ParseXS-2.19 virtual/perl-ExtUtils-CBuilder-0.23 pulled in by: perl-core/ExtUtils-ParseXS-2.19 perl-core/Module-Build-0.28.08 perl-core/IO-Zlib-1.09 pulled in by: perl-core/Archive-Tar-1.40 virtual/perl-IO-Zlib-1.09 perl-core/Archive-Tar-1.40 pulled in by: perl-core/Module-Build-0.28.08 virtual/perl-Archive-Tar-1.40 dev-perl/yaml-0.65 pulled in by: perl-core/Module-Build-0.28.08 dev-perl/IO-String-1.08 pulled in by: perl-core/Archive-Tar-1.40 virtual/perl-Module-Build-0.28.08 pulled in by: dev-perl/DateManip-5.54 perl-core/ExtUtils-CBuilder-0.23 perl-core/ExtUtils-ParseXS-2.19 virtual/perl-Archive-Tar-1.40 pulled in by: perl-core/Module-Build-0.28.08 virtual/perl-IO-Zlib-1.09 pulled in by: perl-core/Archive-Tar-1.40 perl-core/ExtUtils-CBuilder-0.23 pulled in by: perl-core/ExtUtils-ParseXS-2.19 perl-core/Module-Build-0.28.08 virtual/perl-ExtUtils-CBuilder-0.23 perl-core/Module-Build-0.28.08 pulled in by: dev-perl/DateManip-5.54 perl-core/ExtUtils-CBuilder-0.23 perl-core/ExtUtils-ParseXS-2.19 virtual/perl-Module-Build-0.28.08 dev-perl/Compress-Raw-Bzip2-2.015 pulled in by: dev-perl/IO-Compress-Bzip2-2.015 virtual/perl-ExtUtils-ParseXS-2.19 pulled in by: perl-core/Module-Build-0.28.08 perl-core/Package-Constants-0.01 pulled in by: perl-core/Archive-Tar-1.40 dev-perl/IO-Compress-Bzip2-2.015 pulled in by: perl-core/Archive-Tar-1.40 >>> No packages selected for removal by depclean Packages installed: 566 Packages in world: 60 Packages in system: 51 Required packages: 566 Number to remove: 0 Looks like it's still in _rc22.
It seems like the difference may be due to build-time only deps that got pulled in and aren't being removed. If you run --depclean with --with-bdeps=n then it will remove build-time only deps.
Looks like you are right. Another "issue" is when I run --depclean with --with-bdeps=n then it wants to remove *tons* of other stuff. Is there a way (or will be?) to remove build-time deps that arent deps of any installed package?
(In reply to comment #4) > (or will be?) to remove build-time deps that arent deps of any installed > package? That's exactly what `emerge --depclean --with-bdeps=n` does. None of those packages should be needed at run-time. They're only needed at build-time.
(In reply to comment #5) > That's exactly what `emerge --depclean --with-bdeps=n` does. None of those > packages should be needed at run-time. They're only needed at build-time. No no, what I mean is that it would remove build-time deps that are useless to any installed package (well, let's say a build-time dep *is* usefull for any of them ;). Looking at the bug information it should remove only those orphaned 15 packages (build-time deps of packages that are no longer installed).
> (In reply to comment #5) > No no, what I mean is that it would remove build-time deps that are useless to > any installed package (well, let's say a build-time dep *is* usefull for any of > them ;). That what the default --depclean behavior (--with-bdeps=y) is supposed to do already. It should only pull in build time deps of packages that are currently installed. > Looking at the bug information it should remove only those orphaned 15 packages > (build-time deps of packages that are no longer installed). Looking at the dependencies in comment #2, dev-perl/DateManip-5.54 seems to be pulling all of those packages in (directly or indirectly), and it's not in your list of packages to remove. So, that's why it doesn't remove any of the others.
Sounds like everything is working as intended. Closing.