On Sun, 2007-07-29 at 01:05 +0530, S h i v wrote:
> 
> 
> On 7/28/07, S h i v <shivakumar.gn at gmail.com> wrote:
>         In final deployment setup
>         MYOWNfoo3(V1.1) package ----> At install time Requires
>         MYOWNfoo1(V1.1) & MYOWNfoo2( V1.1) packages
>         
>         Build environment has SUNWfoo1 (V0.9),
>         MYOWNfoo3(V1.1)  -----> At build time Uses files from
>         installed SUNWfoo1 (V0.9)  &  MYOWNfoo2 (V1.1)
>         
>         Installing MYOWNfoo1 overwrites files of SUNWfoo1 and hence
>         not desirable. But the versions are different ( V1.1 & V0.9)
>         hence build env is not proper.
> 
> My understanding currently is that this is not possible. If there is a
> dependency, then the package has to be installed before proceeding
> with building of subsequent packages. 

One feature coming soon to pkgbuild is

        Requires: /path/to/file

and
        BuildRequires: /path/to/file

The file may come from package A or B, doesn't matter.  This is
a clean way to enable building against SUNWfoo or SFEfoo, whichever
is installed.  However, the resulting SVr4 package will have a
dependency on exactly one of SUNWfoo or SFEfoo -- the one that includes
/path/to/file on the build system.

>         Desirable solution
>         MYOWNfoo3(V1.1) package ----> At build time use files from
>         MYOWNfoo1( V1.1) & MYOWNfoo2(V1.1) that are installed in the
>         temp location /var/tmp/... 
>         But, the final deployment should check for correct dependent
>         packages and /usr/lib files for linking
>         
>         [2] Is it possible to specify install requirements in the
>         following form (this is probably more of a SVR4 packaging
>         related query): 
>         MYOWNfoo3 ------> Install only if  *one of these* is present
>         "SUNWfoo1 / CSWfoo1 / SFWfoo1 / MYOWNfoo1"
>         Also is there a way to specify the version of "SUNWfoo1 /
>         CSWfoo1 / SFWfoo1 / MYOWNfoo1" that pkgadd should check while
>         installing (eg: version== 1.2  or  version>=1.2 type of
>         information.


> Here the *provides tag* in the rpm spec to an extent addresses this
> with the concept of a virtual package. Not sure if it is supported by
> pkgbuild for SVR4. 
> Also the *requires tag* in rpm spec supports comparison with version
> of the package (== and >=) but SVR4 doesn't support the same.

Correct.  The SVr4 packages do not have these functionalities.

> Is this understanding correct? Is there any workaround?

You could add a %pre script that checks if pkg A or pkg B is
isntalled and even check the version number, but it's kinda hacky.

I'm hoping that whatever packaging mechanism will be used in indiana
will support this.

Laca



Reply via email to