On 08/28/12 19:04, Alan Coopersmith wrote:
On 08/28/12 02:21 PM, Shawn Walker wrote:
Greetings,

The following webrev contains changes for the following RFE:

   7140597 facets are ORed even between different top-level facet
           categories

   https://cr.opensolaris.org/action/browse/pkg/swalker/pkg-facet/webrev/

In your man page, the example manifest snippet uses foo.html, but the text
beneath describes "api.html"

That's what I get for rewriting something multiple times. I was unhappy with each example case I wrote.

Also I don't understand that example:

     file path=usr/share/doc/html/foo/foo.html facet.doc=all facet.doc.html=all

     In the above example, api.html will only be installed if both the 'doc'
     and 'html' facets are \fBtrue\fR in the image.  This allows administrators
     to exclude only HTML-format documentation without excluding plain text
     documentation.

Wouldn't the existing system handle that case by using simply:
     file path=usr/share/doc/html/foo/foo.html facet.doc.html=true
and then setting facet.doc.html=false ?   Or having only html docs
by setting facet.doc*=false facet.doc.html=true ?   I don't see the benefit of
setting all for a subset facet here.

There's a subtle difference to be fair. If an action is tagged with 'facet.doc.html=true', then setting 'facet.doc' will have no affect on the image. Currently, only setting 'facet.doc.html' would have an effect.

Put differently, if you tag the action with both 'facet.doc' and 'facet.doc.html', a user could set 'doc=false' and 'doc.html=true' and get only HTML documentation. That may not make much sense.

I think the only reason we use the '.' notation is to make relationships and wildcards more sane. That is 'facet.doc*=true' or 'facet.doc*=false'.

You're right that the benefit of forcing the user to set both 'doc=true' and 'doc.html=true' or 'doc*=true' is questionable.

The examples in the bug report make more sense to me:
        facet.doc vs facet.locale
        facet.devel vs facet.locale
        facet.doc vs facet.devel

Perhaps that's what the api.html reference was going for?

     file path=usr/share/doc/html/foo/api.html facet.doc=all facet.devel=all

It's what I had originally before I rewrote the text several times. Here's my revised version:

       file path=usr/share/doc/foo/foo.txt facet.doc=all
         facet.locale.en_GB=true facet.locale.en_US=true
       file path=usr/share/doc/foo/api.txt facet.doc=all
         facet.devel=all

     In the above example, foo.txt will only be installed if  the
     'doc'  facet and at least one of the 'locale' facets is true
     in the image.  This allows administrators to  exclude  docu-
     mentation,  but still enable or disable support for specific
     locales.  In addition, api.txt will  only  be  installed  if
     both the 'doc' and 'devel' facets are true in the image.


Also, pkg(1) always uses capitalized True&  False for change-facet arguments,
not the lower-case versions that pkg(5) used - making the two consistent would
be nice.

I will leave that to Alta to decide on; there are many other cases of true and false in pkg(5) that I'm not modifying here, so it seems better to be consistent.

-Shawn
_______________________________________________
pkg-discuss mailing list
pkg-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to