On Mon, Sep 01, 2008 at 05:29:35PM +0200, Jan Trejbal wrote:
> 1) What is the best way to call IPS from inside of the G11nInstall
> interface code? Call pkg as an external command? E.g.:
> os.system('/usr/bin/pkg ... ').
For now, perhaps this is safest, though eventually you'll want to call our
API directly. However, we don't have a stable, well-defined API at the
moment, so unless you're willing to endure a fair amount of pain and
brokenness, then you're probably best off running the commands.
> 2) Are following commands suitable for searching G11n file tags (e.g.
> language, territory) at entire IPS image or repository?
> Would following commands consume too much system/network resources?
>
> # Listing all G11n-related tags available at image:
> $ pkg contents -t dir,file,link \
> -o action.name,path,language,territory,...
Assuming those are the names of the tags used, then yes. I'd envisioned a
single "locale" tag that would look much like the usual locale
specification -- eg, en_US.UTF-8 -- but if you think separating the
components out into separate tags is preferable, then sure. Regardless,
they'll likely need to be prefixed -- "pkg.language", "pkg.territory", etc.
> # Listing all G11n-related tags available at network repo:
> $ pkg contents -r -t dir,file,link \
> -o action.name,path,language,territory,...
This is tough, since there are potentially millions of actions. We don't
currently let you do contents -r without specifying a package name, and I
don't think that's going to change much. This will probably have to turn
into a search query. And if it's a search query for the remote case, then
it might as well be for the local case, too. Brock's the one to toss
around ideas with about the specifics there -- we probably need a generic
search based on tag name.
Danek
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss