How I can build packages without updating packages?

I just installed and downloaded the Sailfish SDK 3.8.3 EA, and while it installs and gets the job done, I have a question: How I can build packages without updating packages?

There’s an older version of Rust in another repository I must use, but sfdk build always bumps it to the latest version.

Thanks!

I found about zypper addlock -r (repo) (package)=(version) which does the trick!

Thank you for evaluating the EA release! Let me suggest you to split out the part about assertion failure into a separate topic and use “How I can build packages without updating packages?” as the summary of this (the original) topic to make both more discoverable.

Sure thing! Originally I was going to make the list longer, hence the title, but the SDK seems to be quite a solid release :slight_smile:

Oh, and actually, simply zypper install --oldversion (package)=(version) works too, in a single command!

Specifically in this case, wouldn’t it make sense to constrain the required version in RPM spec of your package? As in BuildRequires: (package) <= (version). If it doesn’t build with newer version, then I would find it natural having it expressed explicitly.

More generally, it is possible to use the no-pull-build-requires configuration option to disable the implied installation/update of build time dependencies. But this is meant more as a way to speed up the edit-build-test cycle. If some extra steps are needed to pull build time dependencies in, the [pre-|post-]pull-build-requires hooks are the right tool to use.

So, should it be impossible to constrain the required version in .spec, then I would recommend you to use the pre-pull-build-requires hook to invoke zypper with the arguments you found.

Thanks, setting the version in .spec would be the better option for sure. However, both the tooling and the build engine versions have to be pinned, with cross compilers, too, so I think it’s not enough alone.

I’ll have to use custom built Rust binaries until this pull request is mainlined.