Bug 236447

Summary: www/firefox: Silence pkg-deinstall error
Product: Ports & Packages Reporter: Tobias Kortkamp <tobik>
Component: Individual Port(s)Assignee: freebsd-gecko (Nobody) <gecko>
Status: Closed FIXED    
Severity: Affects Only Me CC: gecko, thierry
Priority: --- Keywords: patch, regression
Version: LatestFlags: bugzilla: maintainer-feedback? (gecko)
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 203496    
Attachments:
Description Flags
firefox.diff jbeich: maintainer-approval+

Description Tobias Kortkamp freebsd_committer freebsd_triage 2019-03-10 09:40:15 UTC
Created attachment 202770 [details]
firefox.diff

I always see something like
rmdir: /usr/local/lib/firefox: Directory not empty
during Firefox upgrades.

Can we silence the error? Or is there something that should be cleaned
up but isn't?
Comment 1 Tobias Kortkamp freebsd_committer freebsd_triage 2019-03-10 09:41:35 UTC
At the moment this is left behind:
/usr/local/lib/firefox/defaults/pref/gmpopenh264.js
Comment 2 Jan Beich freebsd_committer freebsd_triage 2019-03-10 15:12:35 UTC
Comment on attachment 202770 [details]
firefox.diff

This file predates www/firefox. I'm not even sure why it's required. However, rmdir lines were added in ports r400042, so this change looks reasonable.

> +rmdir ${MOZDIR}/chrome > /dev/null 2>&1
> +rmdir ${MOZDIR} > /dev/null 2>&1

rmdir(1) doesn't print to stdout unless -v flag is specified, so 2>/dev/null would've been enough. Doesn't matter either way.
Comment 3 Jan Beich freebsd_committer freebsd_triage 2019-03-10 15:17:39 UTC
> At the moment this is left behind:
> /usr/local/lib/firefox/defaults/pref/gmpopenh264.js

This file is part of multimedia/openh264.
Comment 4 commit-hook freebsd_committer freebsd_triage 2019-03-10 16:07:35 UTC
A commit references this bug:

Author: tobik
Date: Sun Mar 10 16:07:22 UTC 2019
New revision: 495297
URL: https://svnweb.freebsd.org/changeset/ports/495297

Log:
  www/firefox: Silence pkg-deinstall

  This should prevent messages like

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

  during upgrades.  multimedia/openh264 creates
  /usr/local/lib/firefox/defaults/pref/gmpopenh264.js
  so the directory might not be empty at that time.

  PR:		236447
  Approved by:	gecko (jbeich)

Changes:
  head/www/firefox/files/pkg-deinstall.in
Comment 5 Tobias Kortkamp freebsd_committer freebsd_triage 2019-03-10 16:08:53 UTC
Thanks.
Comment 6 Thierry Thomas freebsd_committer freebsd_triage 2019-03-10 19:47:38 UTC
(In reply to Tobias Kortkamp from comment #1)

Another case is when you install extensions, e.g. langpacks: they will be installed under /usr/local/lib/firefox/extensions .