On Mon, Jul 13, 2015 at 12:21:07PM -0600, Dale Lindskog wrote: > On Mon, 13 Jul 2015, li...@wrant.com wrote: > > > > I object to the "silent" part... if you're trying to actually use > > > PKG_CACHE > > > then, having it fail silently and then discovering several GB later that > > > oops, > > > it didn't save anything anywhere looks like a huge mistake. > > > > > > But I'll try to make the error message be completely explicit. > > > > http://marc.info/?l=openbsd-cvs&m=143671276012679 > > > > Thank you, Marc. > > > > http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm.diff?r1=1.113&r2=1.114 > > > > Thanks Marc, t I disagree that pkg_add should "always error outwhen > PKG_CACHE is unwritable. Specifically, when pkg_add is invoked the -s > option, no package is copied to the package cache even if it is writable. > > Unless you think that pkg_add should always be run by root? -- Dale
For fuck's sake, undefining PKG_CACHE if you want to run things as non-root is easy enough. Stop talking crap. It's simple. PKG_CACHE is a "parameter" to pkg_add. If you run other options, like -n or -s, there is an obvious interface conflict. What should pkg_add obey ? I will err on the side of KEEPING THINGS SIMPLE. If PKG_CACHE is defined, pkg_add will obey it. Don't want PKG_CACHE ? unset it while running pkg_add with those options. That way, I don't have to put more tests in there.