On Tue, 7 Jul 2015, [email protected] wrote: > > One solution is for pkg_add(1) to silently omit the attempt to copy > > the package to an unwritable $PKG_CACHE. > > The end result with the change proposed would be to hide the problem you > have with permissions for $PKG_CACHE. In the end you will not be > caching anything.
You will cache every package you install. You need to be root to install a package, and in my test root has write permission even when the write bit isn't set. I confirmed also that Perl's '-w' returns true on a directory even when write permission is completely removed from that directory. > Why would your proposed change be the best solution then, when it hides > the problem, instead of fixing it completely? It isn't hidden: in my diff, the man page indicates that, for the -n option, caching is conditional on the directory being writable by the invoker.
