Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 787860 - app-portage/gentoolkit: eclean-pkg doesn't work in out-of-space conditions
Summary: app-portage/gentoolkit: eclean-pkg doesn't work in out-of-space conditions
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-03 08:18 UTC by Michał Górny
Modified: 2022-07-09 23:01 UTC (History)
1 user (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 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2021-05-03 08:18:10 UTC
It kinda sucks when you want to remove packages to free up space but you can't because you're out of space.


# eclean-pkg -d
 * Building file list for packages cleaning...
Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.9/eclean-pkg", line 41, in <module>
    main()
  File "/usr/lib/python3.9/site-packages/gentoolkit/eclean/cli.py", line 505, in main
    doAction(action, options, exclude=exclude,
  File "/usr/lib/python3.9/site-packages/gentoolkit/eclean/cli.py", line 378, in doAction
    clean_me = findPackages(
  File "/usr/lib/python3.9/site-packages/gentoolkit/eclean/search.py", line 560, in findPackages
    for cpv in bin_dbapi.cpv_all():
  File "/usr/lib/python3.9/site-packages/portage/dbapi/bintree.py", line 299, in cpv_all
    self.bintree.populate()
  File "/usr/lib/python3.9/site-packages/portage/dbapi/bintree.py", line 642, in populate
    self._pkgindex_write(update_pkgindex)
  File "/usr/lib/python3.9/site-packages/portage/dbapi/bintree.py", line 1405, in _pkgindex_write
    f.write(contents)
OSError: [Errno 28] No space left on device
Comment 1 Brian Dolbec (RETIRED) gentoo-dev 2022-07-09 23:01:35 UTC
That is portage code that is trying to write to the disk.   And that is for the search, not the actual cleaning...   It must be that the binpkg index file was corrupt, so portage was trying to fix it.  That is before any actual cleaning is done. eclean only fixes the index  (via eclean binhost) after nuking the files.

My odroid-c2 small arm64 board fills up root often for large system updates.  I have never had an issue with cleaning both distfiles and pkgs.   However, I think I might have nuked the portage tmpdir first.   But I did move that to a larger partition, so it doesn't affect / anymore.   Still my last big update I had to clean up diskspace several times before the update was complete.


Near as I can figure so far, there is nothing I can do about it without more info.  And then, what should it do, a random file nuke, to make space?   I think that should be done by the system admin.