svn commit: r362545 - in head: . games/bsdgames games/bsdgames/files

Adam Weinberger adamw at adamw.org
Thu Jul 24 03:40:40 UTC 2014


On 23 Jul, 2014, at 16:46, Dmitry Marakasov <amdmi3 at amdmi3.ru> wrote:

> * Adam Weinberger (adamw at adamw.org) wrote:
> 
>>> I advice to revert this.
>>> 
>>> This is not hier(7)ful as there's no var neither under /usr nor under
>>> /usr/local.
>>> 
>>> This is not better, as you should expect /usr/local to be mounted
>>> read-only along with /usr, so changing data should only reside under
>>> /var.
>> 
>> Both you and itetcu brought up that last point to me... it’s a really good point that I hadn’t considered when I made the move.
>> 
>>> If @sample doesn't do the thing, just don't use it, do not invent hacks.
>>> It's broken in many ways and I've planned to start discussion on that.
>> 
>> It’d be helpful to have the PHB say how to properly handle things outside of ${PREFIX}. There’s essentially no information on it, nor on the differences in how pkgng and pkg_tools handle it. Not even anything in CHANGES about it.
>> 
>> It’s not even about “inventing hacks,” so much as having to figure out the right way to do things by trial and error, because documentation doesn’t exist.
> 
> My idea is that it should be done by pkg-install/pkg-deinstall
> scripts. These are clear (no need for single line chains as in
> `@exec foo && bar && baz'), reusable (may just copy scripts from
> other ports), are not affected (essentially removed) by `make plist`,
> do not induce false positives in sanity checkers and will work
> regardless of pkg-plist infrastructure or policy changes.
> 
> pkg-plist, otoh, stays limited to plain file list with mixins of
> predefined keywords inner workings of which you shouldn't care
> about which work relative to PREFIX.

I love having commands in the plist. It gives you one simple, portable place to put all the pre/intra/post installation commands. chown in a pkg-install will fail for non-root users, but pkg will do the right thing. Sure, you could do the same thing before with a special and specific @exec/@unexec incantation, but many ports either did it wrong or gave up and skipped it altogether, removing .conf files on every update.

I think ‘make check-plist’ is infinitely better for updating a plist than ‘make plist’ though I do agree that portlint needs some love to catch it up with recent paradigm changes.

I think that the solution for reusability and consistency is MORE keywords, so that all ports do things the same, predictable way. And so that changes can be propagated to all ports immediately, rather than hunting through pkg-install scripts to find out why one port is doing something unexpected.

I’d posit that what creates a consistent and dependable end-user experience is not muting installation commands, macros like @sample and @shell, thorough use of OPTIONS, letting pkg carry the burden of ensuring that things work properly for non-root users, and ensuring that porters know how we now handle things that were traditionally disastrously difficult, such as conf files, empty directories, and things outside of $PREFIX.

# Adam


-- 
Adam Weinberger
adamw at adamw.org
http://www.adamw.org



More information about the svn-ports-all mailing list