firefox package: "rmdir: /usr/local/lib/firefox: Directory not empty"

When doing pkg upgrade I get:

Code:
[191/205] Upgrading firefox from 61.0_1,1 to 61.0_3,1...
[191/205] Extracting firefox-61.0_3,1: 100%
rmdir: /usr/local/lib/firefox: Directory not empty

Is this an error?
 
Does the installation process stop or does it continue? If it continues you can consider it a warning, otherwise it's an error.

Things like these can happen more often when a directory is in use by multiple packages. Then the original "owner" of said directory could try to remove it in its uninstall script but that will fail due to the fact the directory isn't empty. Generally speaking it's nothing to worry about.
 
I'd remove the package and if it still complains it cannot remove the directory check what's getting left behind. It might be some user edited file. You can always check which package installed a file with pkg which <full path to file>. If nothing matches and there's nothing worthwhile left behind remove the whole directory by hand. Once everything is cleaned up reinstall the package.
 
It seems I have to inspect a lot of files.

I did not put anything in that directory as far as I remember.

Code:
# pkg which /usr/local/lib/firefox/chrome.manifest
/usr/local/lib/firefox/chrome.manifest was installed by package firefox-61.0_3,1
#pkg which /usr/local/lib/firefox
/usr/local/lib/firefox was not found in the database
# ls /usr/local/lib/firefox
application.ini         firefox                 libmozgtk.so
browser                 firefox-bin             libxul.so
chrome                  gmp-clearkey            omni.ja
chrome.manifest         gtk2                    pingsender
defaults                liblgpllibs.so          platform.ini
dependentlibs.list      libmozavcodec.so        plugin-container
dictionaries            libmozavutil.so         removed-files

I deleted firefox and remained /usr/local/lib/firefox/defaults/pref/gmpopenh264.js in the directory. Then I get:

Code:
# pkg which /usr/local/lib/firefox/defaults/pref/gmpopenh264.js
/usr/local/lib/firefox/defaults/pref/gmpopenh264.js was not found in the database
# more /usr/local/lib/firefox/defaults/pref/gmpopenh264.js
pref("media.gmp-gmpopenh264.autoupdate", false);
pref("media.gmp-gmpopenh264.lastUpdate", 1530589788);
pref("media.gmp-gmpopenh264.version", "1.8.0");

Who put it?
 
I don't think there's anything important in there, at least it doesn't look like it. So try pkg delete firefox, it's going to complain about that directory. Once the package is removed; rm -rf /usr/local/lib/firefox to clean up. Then pkg install firefox again.

A pkg-delete(8) checks files against recorded checksums. Apparently this is somewhat out of sync and it doesn't recognize any of those files, so it takes the safe route and leaves them in place.
 
A small surprise:

Code:
# ll /usr/local/lib/firefox/defaults/pref/gmpopenh264.js
lrwxr-xr-x  1 root  wheel  61 Jul  5 11:14 /usr/local/lib/firefox/defaults/pref/gmpopenh264.js@ -> /usr/local/lib/browser_plugins/gmp-gmpopenh264/gmpopenh264.js
# ll /usr/local/lib/browser_plugins/gmp-gmpopenh264/gmpopenh264.js
-rw-r--r--  1 root  wheel  151 Jul  3 03:49 /usr/local/lib/browser_plugins/gmp-gmpopenh264/gmpopenh264.js

I am a little afraid of deleting it. Perhaps it has to do with many not repeatable, but succesfull firefox test and error configuration efforts. Firefox is not anymore continously crashing as before.
 
Just move the old directory out of the way, pkg delete firefox, mv /usr/local/lib/firefox /usr/local/lib/firefox.old, pkg install firefox.

If there's anything missing that shouldn't have been removed you can find it in the firefox.old directory. If everything appears to be working without any adverse effects, remove the old firefox.old directory.
 
Back
Top