Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 254487 - sys-apps/portage-2.2_rc22: --depclean doesnt clean everything
Summary: sys-apps/portage-2.2_rc22: --depclean doesnt clean everything
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Portage team
URL: http://wklej.org/id/37535/
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-10 21:27 UTC by Piotr Szymaniak
Modified: 2014-08-01 19:53 UTC (History)
2 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 Piotr Szymaniak 2009-01-10 21:27:09 UTC
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.
Comment 1 Zac Medico gentoo-dev 2009-01-14 04:45:06 UTC
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> ...
Comment 2 Piotr Szymaniak 2009-01-17 21:42:07 UTC
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.
Comment 3 Zac Medico gentoo-dev 2009-01-18 00:04:39 UTC
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.
Comment 4 Piotr Szymaniak 2009-01-20 20:18:23 UTC
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?
Comment 5 Zac Medico gentoo-dev 2009-01-20 21:30:27 UTC
(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.
Comment 6 Piotr Szymaniak 2009-01-20 21:43:42 UTC
(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).
Comment 7 Zac Medico gentoo-dev 2009-01-20 22:53:19 UTC
> (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.
Comment 8 Ben Kohler gentoo-dev 2014-08-01 19:53:12 UTC
Sounds like everything is working as intended. Closing.