On 01/09/12 08:35, Peter Dennis wrote:
Hi,

Is there a way to query the packaging system to find out what
incorporations depend upon two packages using the pkg search
options ?

Doing:

pkg search 'depend:incorporate:system/kernel/platform' AND
'depend:incorporate:system/file-system/nfs'

returns nothing, though having a further look at the pkg(1)
man page the text:

"queries are interpreted as a series of terms to
be matched exactly"

would explain that (looking for *one* action that has
both the dependencies which is not going to work).

Matches by default are performed at the action level, not the package level. So your query is asking for the impossible: a single depend action that incorporates multiple FMRIs.

Your particular search can only be performed at the package level -- that is, you want a package that has actions that match both queries. To do that, you have to tell search each term should be matched at the package level by enclosing each term in '<>'. Example:

# pkg search -l '<depend:incorporate:system/kernel/platform>' AND '<depend:incorporate:system/file-system/nfs>' PACKAGE PUBLISHER
pkg:/consolidation/osnet/[email protected]

This is discussed in pkg(1) under the 'search' subcommand:

         By default, and with -a, perform the search and  display
         information about the matching actions.
...
         With -p, display packages that have  some  actions  that
         match  each  query term. Using this option is equivalent
         to putting angle brackets (<>) around each term  in  the
         query.  See  below for more description of the <> opera-
         tor.
...
         To convert actions to the packages  that  contain  those
         actions, use <>. With the -a option, searching for token
         results in information about the actions matching token,
         while  searching  for <token> results in a list of pack-
         ages containing actions that matched token.

-Shawn

_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to