For stuff that doesn't distinguish between ARCH's, this is tricky
because the same packages can be used in different contexts:

On a personal workstation, you would expect
    pkgadd ....
to install things in (say) /usr/bin where you can use them
directly in your PATH.

But, what if you run a server for diskless blades, and you need
to support both X64 and SPARC blades?  Then you may want to
manage several different "root filesystems" on a single system.
The trick is to use the -R option to the packaging tools to have
them use an alternate root:

    pkgadd -R /export/x64blade/ ...
    pkgadd -R /export/sparcblade/ ...

which is effectively how Solaris supports such things.  In this case,
the bits would end up in /export/x86blade/usr/bin (for x64) and
/export/sparcblade/usr/bin (for SPARC).  It doesn't matter what
architecture your server is, because it has its own root filesystem,
independent from those used by the blades.  Note that -R relocates
ALL of the package related information, including the package database
files, installed bits etc.  (This is why a package's installer can't
reliably execute its own bits in its postinstall scripts; the host
ARCH/OS may not match the one the package was built for)


Sometimes, a package explicitly supports multiple ARCHs (and
maybe even multiple versions of itself) in its install directory
structure.  In this case, the package installs ARCH specific
binaries in .../$ARCH/... and its .../bin directory is full
of links to a shell script that simply does
        exec .../`arch`/$0;

This multi-arch packaging behavior is more suited towards blastwave
style unbundled packages and less suited for the core parts of ON...

This discussion is probably best continued in the packaging/install
community: http://www.opensolaris.org/os/community/install/

   -John


> It looks like there are two slight problems with these packages:
>
> 1. There is no warning on installation that I'm installing to the "wrong" 
arch (although it does tell me the arch).
> 2. Both packages install to exactly the same location and deliver the same 
files, only one contains i386, one has SPARC.
>
...
>
> OK, so are package writers meant to put files for different architectures 
into separate directories?

_______________________________________________
opensolaris-discuss mailing list
[email protected]

Reply via email to