tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg_add functions and renovation



On Wed, Apr 23, 2008 at 09:06:25AM +0200, Alan Barrett wrote:
> On Tue, 22 Apr 2008, Joerg Sonnenberger wrote:
> > (1) pkg_add -R is currently enabling -I as well (no register -> don't
> > run install scripts). The problem is here that I would have to create
> > and remove a temporary directory as I can't run it in the normal pkgdb
> > directory. I am not sure if anyone is even using -R, so I am not sure
> > if this is a relevant regression.
> 
> I am not sure, but I can imagine people wanting to use "don't register"
> as part of a bootstrap process.  Regardless of whether people use it or
> not, I think it's wrong for "don't register" to imply "don't run install
> scripts".

For the bootstrap process we build a temporary pkg_install with minimal
functionality and register other packages noramlly. Question remains --
from where should the install script run?

> > (4) @chmod is missing right now as parsing the permissions is
> > non-trivial. What should it support -- the full syntax of chmod?
> 
> Yes, I think so.  You can parse the strings like this:
> 
>       new_mode = gemode(setmode("u+w,go-w"), old_mode)
> 
> where old_mode is derived from stat() on the existing file.

Right, that was the pointer I was missing. chmod(2) should xref
getmode(3)/setmode(3).


Home | Main Index | Thread Index | Old Index