OK thanks guys, that's what I though.

I did hack 1 since I could, but good to know the hack 2. in case this ever happensĀ for packages I'm not in control of.


On Thu, May 14, 2020 at 11:20 AM Quentin Schulz <quentin.schulz@...> wrote:
Hi Damienm

On Thu, May 14, 2020 at 11:05:56AM +0300, Damien LEFEVRE wrote:
> Hi,
> Should it be possible to set PREFERRED_VERSION in the image definition
> files?

Conceptually, no. An image recipe is a recipe. Global data is global and
local data is local. A recipe (image or package) set local data only.

> I have 2 image files:
> -
> - : PREFERRED_VERSION_package_1.0.0
> I have a package with 2 versions:
> -
> -

Correct way is different distro or machine. Obviously the build impact
is high for such as small difference in images.

Two possible hacks to me:
1. and but then you need to manage
the dependencies inside recipes (those (r)depending on package10 or
package11). If it's a "final" package which isn't a dependency of
anything else except the image, that's actually not too bad. Then in the
image you add package10 or package11.

2. Have an intermediate recipe which RDEPENDS_${PN} += "package
(=1.1.0)" and the other on "package (=1.0.0)" and install this
intermediate recipe in the appropriate image.

There are shortcomings in both hacks (otherwise they wouldn't be called
that way :) ).


Join to automatically receive all group messages.