On Fri, Aug 15, 2008 at 09:33:18AM +0200, Jan Trejbal wrote: > Package attributes: > set name=language value=fr > set name=encoding value=UTF-8 > depend fmri=pkg:/SUNWlang-common type=require > > File tags (ULL=usr/lib/locale): > PATH LANGUAGE TERRITORY ENCODING MESSAGE > $ULL/fr.UTF-8/LC_MESSAGES fr UTF-8 true > $ULL/fr.UTF-8/LC_MESSAGES/*.mo fr UTF-8 true > $ULL/fr_FR.UTF-8/fr_FR.UTF-8.so.3 fr FR UTF-8 > $ULL/fr_CA.UTF-8/fr_CA.UTF-8.so.3 fr CA UTF-8
Why are you putting language and encoding both on individual files and on the package? Note that filters don't apply to packages, just to package contents. The desire is to have package boundaries defined by functionality, and that all documentation and message catalogs are in the same package that delivers the functionality, with only desired components filtered in by the user-chosen filters. > See more details and examples at following documents: > http://wikis.sun.com/download/attachments/45908778/design.txt This URL has a strange content-type (application/x-zl-download), so I can't actually read it in my browser. Can you correct that? > http://wikis.sun.com/download/attachments/45908778/high-level.png > 1) Does IPS currently (or will in 2008.11) support custom tags, > attributes, and filters from examples described above? Also, will > interface consumers be able to use IPS filters for packages/files > installation and removal? Actions can carry arbitrary attributes, as can packages. Filters can operate on any attribute (modulo bug 322 where they can't operate on set actions -- package attributes), and you can already specify filter on package installation. There certainly needs to be some support for image-wide filters, but the basics are there. > 2) Is there (Python) IPS interface, which I can call to retrieve the > custom package attributes and file tags? Just parse the actions and find the attributes you're looking for. > 3) Where can I define and modify custom attributes & tags for our (G11n) > packages, which were delivered to pkg.opensolaris.org and LiveCD? You should also read Stephen's Tags and Attributes document, available via a search through the pkg-discuss archives. We don't yet have all the mechanism we need to add data to packages which have already been published, though obviously in order to add locale and documentation information to packages, we'll need that ability. > I also welcome any comments on design of the proposed interface. You may > see a way how to make it simpler, more efficient, etc. > For example, I am not sure if using Image and Repository Python objects > as input, and Filter object as output of the interface is the best thing > to do. I think that you're missing a layer that needs implementing, not just for this, but for other kinds of filtering as well. We don't have a way to retrieve all the locale meta-information available from the packages a system knows about -- i.e., what languages are available, what encodings, etc. -- so that a user can select them, rather than having to guess at their values. That seems useful -- not just for locale information, but also to list, say what architectures are available, or other possible package variants -- and we don't have a good way to do that at the moment. You're not proposing a mechanism for this, but something on top of such a hypothesized layer, right? As far as your interface goes, it seems a reasonable way to encapsulate the g11n aspects of a system. It shouldn't worry about repos, just images, and it's not clear where some of the information would come from (such as the descriptions of various objects). You'll also need to move away from separate l10n packages -- I don't see the need for such things anymore. I'm also skeptical of "translation progress" and "suggested locale", but neither appear to affect the architecture of IPS or filtering, so I suppose I don't care too much. Danek
