On Wed, 24 Jan 2018, chrysn wrote: > Package: base-files > Version: 10.1 > Severity: normal > > When a package gets installed and later uninstalled that places files in > /opt (or /etc/opt), that directory gets removed because it was only used > by that package and not owned by any. As a consequence, in-house > packages (which can reasonably install to /opt/) can not pass piuparts > as that complains about /opt and /etc/opt going away. > > Now this could be fixed at several places (eg. dpkg could keep them > around, or piupats could mask them), but keeping such directories around > is typically done by base-files. The reason given in the FAQ for /opt > just being added in postinst is that it should be possible for an admin > to rmdir those -- a valid point, but causing inconvenience to packages > going there. > > The fix I'd suggest is to have a base-files-fhs package recommended by > base-files but not required, which can be uninstalled if an admin wants > those files gone.
That would be too much complexity for very very little gain. A well behaved FHS-compliant Debian package should never use opt. Therefore, this would only be a problem for non FHS-compliant packages. I agree that passing the piuparts test is a good thing, but we should follow FHS as well, not just pass the piuparts tests. For Debian packages, if any, I strongly suggest that they are fixed to comply with FHS. For in-house packages, a simple "mkdir -p /opt" in postrm would make piuparts not to warn about /opt. Thanks.