I think the pkg.depend.runpath attribute is what you're looking for.
From the pkgdepend man page:
Run paths such as those specified by the -k option can
also be specified per action or per manifest by using
the action or manifest attribute pkg.depend.runpath. The
value of the pkg.depend.runpath attribute is a colon-
separated string of the paths to use.
So in this case, either in the manifest that's having the issues (if
it's a problem for all of the elf files they're delivering) or on the
actions delivering libbar.so.0.4.5, try setting
pkg.depend.runpath=usr/customer/lib/1.3/amd64.
Hth,
Brock
On 01/12/12 08:31, Alasdair Lumsden wrote:
Hi All,
We're using IPS to deliver software for a customer who has specific
version requirements for their libraries (they do multimedia
transcoding), and where the customer software overlaps with system
software, pkgdepend barfs (library changed to libfoo to protect the
guilty!):
http://pastie.org/pastes/3173072/text?key=0vky7rgnpe3htiktornfg
The file dependency depend fmri=__TBD
pkg.debug.depend.file=libfoo.so.0 pkg.debug.depend.path=usr/lib
pkg.debug.depend.path=usr/lib/amd64
pkg.debug.depend.path=usr/customer/1.3/lib/amd64
pkg.debug.depend.path=lib pkg.debug.depend.path=usr/lib
pkg.debug.depend.reason=usr/customer/1.3/lib/amd64/libbar.so.0.4.5
pkg.debug.depend.type=elf type=require has paths which resolve to
multiple packages under this combination of variants:
The actions are as follows:
depend fmri=pkg:/library/[email protected]
pkg.debug.depend.file=usr/lib/libfoo.so.0
pkg.debug.depend.file=usr/lib/amd64/libfoo.so.0
pkg.debug.depend.reason=usr/customer/1.3/lib/amd64/libbar.so.0.4.5
pkg.debug.depend.type=elf type=require
depend fmri=pkg:/customer/1.3/library/[email protected]
pkg.debug.depend.file=usr/customer/1.3/lib/amd64/libfoo.so.0
pkg.debug.depend.reason=usr/customer/1.3/lib/amd64/libbar.so.0.4.5
pkg.debug.depend.type=elf type=require
The file dependency depend fmri=__TBD
pkg.debug.depend.file=libfoo.so.0 pkg.debug.depend.path=usr/lib
pkg.debug.depend.path=usr/customer/1.3/lib pkg.debug.depend.path=lib
pkg.debug.depend.path=usr/lib
pkg.debug.depend.reason=usr/customer/1.3/lib/libbar.so.0.4.5
pkg.debug.depend.type=elf type=require has paths which resolve to
multiple packages under this combination of variants:
The actions are as follows:
depend fmri=pkg:/library/[email protected]
pkg.debug.depend.file=usr/lib/libfoo.so.0
pkg.debug.depend.reason=usr/customer/1.3/lib/libbar.so.0.4.5
pkg.debug.depend.type=elf type=require
depend fmri=pkg:/customer/1.3/library/[email protected]
pkg.debug.depend.file=usr/customer/1.3/lib/libfoo.so.0
pkg.debug.depend.reason=usr/customer/1.3/lib/libbar.so.0.4.5
pkg.debug.depend.type=elf type=require
The file dependency depend fmri=__TBD
pkg.debug.depend.file=libfoo.so.0 pkg.debug.depend.path=usr/lib
pkg.debug.depend.path=usr/lib/amd64
pkg.debug.depend.path=usr/customer/1.3/lib/amd64
pkg.debug.depend.path=lib pkg.debug.depend.path=usr/lib
pkg.debug.depend.reason=usr/customer/1.3/lib/amd64/libbarfile.so.3.3.4
pkg.debug.depend.type=elf type=require has paths which resolve to
multiple packages under this combination of variants:
The actions are as follows:
depend fmri=pkg:/library/[email protected]
pkg.debug.depend.file=usr/lib/libfoo.so.0
pkg.debug.depend.file=usr/lib/amd64/libfoo.so.0
pkg.debug.depend.reason=usr/customer/1.3/lib/amd64/libbarfile.so.3.3.4
pkg.debug.depend.type=elf type=require
depend fmri=pkg:/customer/1.3/library/[email protected]
pkg.debug.depend.file=usr/customer/1.3/lib/amd64/libfoo.so.0
pkg.debug.depend.reason=usr/customer/1.3/lib/amd64/libbarfile.so.3.3.4
pkg.debug.depend.type=elf type=require
The file dependency depend fmri=__TBD
pkg.debug.depend.file=libfoo.so.0 pkg.debug.depend.path=usr/lib
pkg.debug.depend.path=usr/customer/1.3/lib pkg.debug.depend.path=lib
pkg.debug.depend.path=usr/lib
pkg.debug.depend.reason=usr/customer/1.3/lib/libbarfile.so.3.3.4
pkg.debug.depend.type=elf type=require has paths which resolve to
multiple packages under this combination of variants:
The actions are as follows:
depend fmri=pkg:/library/[email protected]
pkg.debug.depend.file=usr/lib/libfoo.so.0
pkg.debug.depend.reason=usr/customer/1.3/lib/libbarfile.so.3.3.4
pkg.debug.depend.type=elf type=require
depend fmri=pkg:/customer/1.3/library/[email protected]
pkg.debug.depend.file=usr/customer/1.3/lib/libfoo.so.0
pkg.debug.depend.reason=usr/customer/1.3/lib/libbarfile.so.3.3.4
pkg.debug.depend.type=elf type=require
The issue is pretty obvious - libbar wants libfoo, and libfoo exists
both in the system under /usr and also in the customer's prefix under
/usr/customer/1.3. pkgdepend doesn't know which one to pick.
The library libbar has a hardcoded RPATH of
/usr/customer/1.3/lib/amd64, so it will always pick the libfoo from
the customer prefix. That got me thinking that perhaps pkgdepend could
be enhanced to make the same decision, even only if a special
"pkg.depend.favour-rpath" style option was applied to this action?
Obviously I'd prefer not to just use pkg.depend.bypass-generate and
manually add the dependencies, because here be dragons.
I appreciate the logic that system packages won't ever deliver two
versions of the same library, but as more and more end-users start
delivering software via IPS, I think collisions are inevitable and
it'd be awesome if pkgdepend could be given a hint on which one to
use, or be intelligent and use the one that matches the RPATH encoded
in the library.
Shawn on IRC suggested using a user image, but it's a bit late for
that now.
Also if anyone can think of a smarter way of getting around this than
using pkg.depend.bypass-generate then I'm all ears!
Many thanks,
Alasdair
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss