1

I have a weird requirement of installing a package into a rellocated place in my Yocto image without changing the paths inside package.

Trying to explain, I can have files in my package like:

/usr/bin/my-app
/usr/share/my-app/files

And customer wants them installed into:

/customer/prefix/usr/bin/my-app
/customer/prefix/usr/share/my-app/files

Again, I cannot change the place where files are packed. This needs to be done during installation time only.

If I am installing package manually it is as easy as telling my package manager (opkg) to use a different root:

opkg --offline-root /customer/prefix my-app.ipk

But what is the best approach to have it integrated/automated into my image build?

NOTE: The relocation is to take place only for my-app. All other stuff must stay unaffected.

Thanks!

j4x
  • 3,595
  • 3
  • 33
  • 64
  • 1
    This is a bit late but maybe this helps: [Non-standard installation destinations](https://openwrt.org/docs/guide-user/additional-software/opkg#non-standard_installation_destinations) `opkg -d destination_name install somepackage` the destination needs to be defined in the `/etc/opkg.conf` – graugans Aug 09 '22 at 14:30
  • Thank you @graugans. I don't really remember how we solved the case but the document you pointed out seems quite reasonable. Just create `dest cust /customer/prefix` and my packages don't need any change at all. Could you please post this as an answer? – j4x Aug 09 '22 at 16:22

0 Answers0