Yocto Project Discussions
 help / color / mirror / Atom feed
From: Mikko Rapeli <mikko.rapeli@linaro.org>
To: nicolas.wirth@speedgoat.ch
Cc: yocto@lists.yoctoproject.org
Subject: Re: [yocto] How to switch between package version ?
Date: Wed, 16 Aug 2023 14:13:39 +0300	[thread overview]
Message-ID: <ZNyvYwadnDXBDsQm@nuoska> (raw)
In-Reply-To: <S9ea.1692183278145152073.JK8M@lists.yoctoproject.org>

Hi,

On Wed, Aug 16, 2023 at 03:54:38AM -0700, Nicolas Wirth via lists.yoctoproject.org wrote:
> Hello everyone, I hope you're all doing well.
> 
> I began learning how to use Yocto three months ago. I believe I now have a general understanding of how Yocto operates and how to integrate it into my project. However, I've encountered a question for which I'm struggling to find a straightforward answer.
> 
> Imagine a scenario where, due to certain constraints, you've opted for a specific version of Yocto and have commenced work with it. As development progresses, you realize the necessity for a particular version of a library (such as boost). After searching for the recipe, you locate it within the meta layer and include it in your image. Subsequently, you realize that the version you've incorporated isn't the precise one you intended; rather, the version of the library you require is present within an older branch of Yocto.
> 
> My question is as follows: Without altering your existing Yocto version, how can you utilize this "older" version of the desired library?

First, I would seriously question and fight back on requirements which dictate using
old, possibly unmaintained SW versions with a lot of known CVE security vulnerabilities.
Updating to a new boost version is straight forward work and almost all of the compile
etc issues can be resolved using Internet search engines since most open source projects
have also done the same.

Second, downgrading a SW component has the same solutions as updating. Find a maintained
layer with the SW component and version that you need. If that is not available, check if
you can change the branch of an existing meta layer to provide what you need. Note that mixing
layer branch names is frequently possible with minor changes, e.g. using meta-security master branch
with kirkstone LTS poky. Then if you can't find an existing layer or branch which works, you can also
fork the SW component recipe into your own layer by copying the recipe files over. You may need
to apply some other patches as well to be compatible with your poky version, but those are possibly
already available in the git repo of the source.

In any case, you need to understand how layer priorities and version and provider configurations
play together in your distro, machine, layer etc configuration. I do this by looking at
"bitbake -e image" and buildhistory data.

Just as an example, I updated my custom distro which inherits poky distro config and slightly modies it,
from kernel 6.1.y to 6.4.x by resetting the PREFERRED_VERSION_linux-yocto to an empty string
in my distro config. This picks up the newest linux-yocto recipe available from all of the layers in
my configuration and that happens to be the linux-yocto_6.4.bb from poky currently.

Hope this helps,

-Mikko


  reply	other threads:[~2023-08-16 11:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-16 10:54 How to switch between package version ? Nicolas Wirth
2023-08-16 11:13 ` Mikko Rapeli [this message]
2023-08-16 11:55   ` Nicolas Wirth
2023-08-16 12:05     ` [yocto] " Mikko Rapeli
2023-08-16 14:45       ` Nicolas Wirth
2023-08-16 15:02         ` [yocto] " Alex Kiernan
2023-08-16 15:30           ` Alexander Kanavin
2023-08-16 15:32       ` Alexander Kanavin
2023-08-17  4:41         ` Mikko Rapeli
2023-08-17  7:37           ` Alexander Kanavin
     [not found]             ` <177BD8C48AE805D0.8497@lists.yoctoproject.org>
2023-08-17  7:47               ` Mikko Rapeli
2023-08-17 10:51                 ` Nicolas Wirth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZNyvYwadnDXBDsQm@nuoska \
    --to=mikko.rapeli@linaro.org \
    --cc=nicolas.wirth@speedgoat.ch \
    --cc=yocto@lists.yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox