Page MenuHomeFreeBSD

devel/gvfs should depend on sysutils/lsof
Needs ReviewPublic

Authored by damjan.jov_gmail.com on Sep 19 2021, 3:26 AM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

When a drive can't be unmounted and returns EBUSY, gvfs calls "lsof -t /mountpoint" to find which processes have files open. This list is sent over the "show-processes" signal, which allows file managers to show which apps are preventing the unmount. Since sysutils/lsof is currently not a dependency for devel/gvfs, this feature only works if the user separately installed sysutils/lsof.

(Originally reported as bug 254322.)

Test Plan
  1. Install some desktop file manager (Thunar/PCmanFM/Nemo/Konqueror/etc.). It needs to be built to use gvfsd (via Gnome's gio or KDE's solid), which needs to pull in sysutils/bsdisks, which usually happens by default.
  2. Make sure sysutils/lsof is NOT installed.
  3. Insert a removable drive, using a filesystem other than msdosfs (broken) or cd9660 (only fixed recently: https://github.com/lsof-org/lsof/pull/151).
  4. Mount it through your desktop file manager
  5. Open a file on it.
  6. Try to eject the drive from the file manager while the file is open.

Without this patch, the dialog that is shown, with the list of open files that are stopping unmount, is always empty. With this patch, lsof is installed, and it shows the open files that needs to be closed before ejecting the drive can be done safely.

Diff Detail

Repository
R11 FreeBSD ports repository
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

damjan.jov_gmail.com created this revision.