On Wed 05 Aug 2009 at 05:28AM, Roland Mainz wrote:
> These items leads to an old idea:
> What about allowing one file entry in IPS database to be represented by
> multiple different "mutations" of a file, e.g. one and the same source
> file is "mutated" into different formats depending on platform
> attributes.

This is a called 'variants' and is already implemented in IPS;
variants are how we distinguish arch-specific contents, as well
as zone-specific contents.

http://markmail.org/message/y75llik7rugv7l5u

Variant support was checked-in by Bart in January, and has been in use since
OpenSolaris build 106 (IIRC).

A package manifest must declare which variants it knows about:

set name=variant.opensolaris.zone value=global value=nonglobal
set name=variant.arch value=sparc value=i386

Then it can tag actions with variants:

dir ... opensolaris.zone=global ... path=dev/zcons 
variant.opensolaris.zone=global

file ... path=etc/security/device_policy ... variant.arch=i386 
variant.opensolaris.zone=global
file ... path=etc/security/device_policy ... variant.arch=sparc 
variant.opensolaris.zone=global

(in this case there are two device_policy entries because the
contents vary between the two architectures).

If the file name changes (like in example 1 (which is unavoidable
> since the FreeType2 code mainly looks at the file name and not file
> signatures)) other files (in the fonts case the "fonts.dir" files) need
> to be changed, too (which creates dependicy trees or even graphs) ...
> 
> ... comments/rants/ideas/etc. welcome...

Since variants are image level properties, as long as you publish
consistently, it should be fine; as an aside, all actions can be
variant-ed, including dependencies.

Ed recently checked in "pkg change-variant" which allows the pkg(1)
client to switch the variant of an image, adjusting all of the actions
as needed.  Two expected applications of this are:

1) Physical-to-Virtual conversion of systems into non-global zones

2) Switching a system back and forth between non-debug and debug
   variants of binaries.

I don't know what the LiveCD team would think of your proposal,
but variants would seem to fit this use case at least from a
technological perspective.

        -dp

-- 
Daniel Price, Solaris Kernel Engineering    http://blogs.sun.com/dp
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to