provide support for use of DEB_HOST_MULTIARCH in environment variables
Bug #1723945 reported by
James Page
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snapd |
Triaged
|
Medium
|
Unassigned |
Bug Description
For the gnocchi snap, I need to tweak the LD_LIBRARY_PATH to include:
$SNAP/
as the ceph packages are sourced from the archive, rather than being built directly into the snap (thus avoiding long build times).
I'm using:
environment:
LD_
for testing, but that's obviously not architecture nice; it would be good if snaps automatically exposed some common architecture specific variables to the snap env so that I can just do
environment:
LD_
Changed in snapd: | |
status: | New → Triaged |
importance: | Undecided → Medium |
To post a comment you must log in.
Snapd defines SNAP_ARCH with deb architectures instead of triplets. Without it defining triplets for you, you cannot use LD_LIBRARY_PATH the way you're doing it now, since the snapcraft-defined stuff is evaluated too late. You can use a remote part as well as a wrapper to get close.
Build the part in question `after: [snap-arch- triplet- generator] `. Then if you make your app look something like this:
app: arch_triplet <actual command>
foo:
command: with_snap_
Your command will get $SNAP_ARCH_TRIPLET defined. Note that this will not apply to the `environment` keyword as that's consumed by snapd, but if you create a wrapper for your <actual command> you can set the LD_LIBRARY_PATH there.
That's the best we can do from Snapcraft. I'm going to move this issue over to snapd to see what they think.