Danek Duvall wrote:
> 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.
Good, thank you for advice here.
I will use pkg commands. In future I can change to direct API calls.
>
>> 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.
You are probably correct, one locale tag is most likely possible. I will
double-check that.
Not sure why "pkg." prefix is needed. Does every custom file tag need to
include that prefix?
If that's not the case, maybe "l10n" or "g11n" prefix fits better.
>
>> # 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.
OK, makes sense. The pkg search is the command I should use.
For time being I can search for certain files at network repository to
determine what languages/locales are available to install. Later on when
searching meta data will be available, I will switch to that.
I will talk to Brock about details on meta data search features I would
like to see.
>
> Danek
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss