Page MenuHomeFreeBSD

devel/gvfs should depend on sysutils/lsof
ClosedPublic

Authored by damjan.jov_gmail.com on Sep 19 2021, 3:26 AM.
Referenced Files
F82052833: D32018.diff
Thu, Apr 25, 1:22 AM
Unknown Object (File)
Sun, Apr 21, 9:47 PM
Unknown Object (File)
Sat, Apr 13, 11:10 AM
Unknown Object (File)
Feb 10 2024, 6:58 PM
Unknown Object (File)
Jan 13 2024, 1:03 PM
Unknown Object (File)
Dec 22 2023, 11:59 PM
Unknown Object (File)
Nov 25 2023, 3:00 AM
Unknown Object (File)
Nov 21 2023, 4:07 AM

Details

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
Tests Skipped