Skip to content

upgrade_helper: scarthgap compatibility and stable updates

[email protected] yocto-patches 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest4 patches 10 repliesIn review
  2. v29 patches 20 repliesSuperseded

Changes in v3 from the cover letter

- Drop layer-dir, scan_workers, changelog, prebuild, and fetch-error patches as per Alex Kanavin feedback (changelog to be integrated into devtool; prebuild covered by buildhistory; fetch error to be fixed in oe-core's get_recipe_upgrade_status)
- Drop --minor as separate flag; replace with per-recipe AUH_UPGRADE_POLICY variable (patch/minor/none) read from tinfoil
- Add steps.py symlink fix (new patch, split from scarthgap compat)
- Rework scarthgap compat: use shutil.which for bitbake-config-build fallback with D() logging, add tuple length assertion, fix env string bug (MACHINE=foo None when TCLIBC unset)
- Rework --stable: use bb.fetch2.Fetch public API (not FetchData), fix is_patch_update off-by-one length guard, fix _get_git_versions break-on-blank-line dropping remaining tags, optimize quick-path to skip tinfoil for recipes already at patch version
- Rework --resume: use succeed/failed symlinks created immediately (not at end of run) as Alex suggested, use name-based comparison instead of object identity for symlink classification, add no-previous-run warning
- Series reduced from 9 to 4 patches

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4steps.py: resolve symlinks in recipe_dirmodules/steps.py+1 -11 reply
2/4upgrade-helper.py: Add compatibility with Yocto scarthgapmodules/utils/bitbake.py upgrade-helper.py+21 -20 replies
3/4upgrade-helper.py: Add stable option for patch-only upgradesmodules/utils/version.py upgrade-helper.py+289 -04 replies
4/4upgrade-helper.py: Add resume option to skip already attempted recipesupgrade-helper.py+38 -105 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [AUH][PATCH v3 0/4] upgrade_helper: scarthgap compatibility and stable updates

From: Daniel Turull <[email protected]>

This patch series allow to run upgrade-helper both in master and scarthgap.

This allows to be able to automatically generate patches for updating patched or minor versions, which can help on the security work fixing vulnerabilities.

When --stable is used, AUH restricts upgrades to patch-level by default. Per-recipe policy can be overridden via AUH_UPGRADE_POLICY, which can be set in a configuration file (e.g. local.conf) for testing across LTS branches without modifying recipes:

AUH_UPGRADE_POLICY:pn-curl = "minor"

or directly in the recipe file for upstream inclusion:

AUH_UPGRADE_POLICY = "minor"

Supported values: "patch" (default), "minor", "none"

Daniel Turull (4):
steps.py: resolve symlinks in recipe_dir upgrade-helper.py: Add compatibility with Yocto scarthgap upgrade-helper.py: Add stable option for patch-only upgrades upgrade-helper.py: Add resume option to skip already attempted recipes

Tested with on openembedded-core with latest scarthgap version (2026-04-07) ../auto-upgrade-helper/upgrade-helper.py all --stable

    TOTAL: attempted=135 succeeded=81(60.00%) failed=54(40.00%)

[1] https://github.com/Nordix/meta-binaryaudit
[2] https://git.openembedded.org/openembedded-core-contrib/log/?h=dturull/scarthgap-auh

Changes in v2:
- Split scarthgap compat into two commits: compatibility and fetch error handling
- Split --stable into its own commit (was squashed into changelog)
- Reorder commits so each feature is independently functional

Changes in v3:
- Drop layer-dir, scan_workers, changelog, prebuild, and fetch-error patches as per Alex Kanavin feedback (changelog to be integrated into devtool; prebuild covered by buildhistory; fetch error to be fixed in oe-core's get_recipe_upgrade_status)
- Drop --minor as separate flag; replace with per-recipe AUH_UPGRADE_POLICY variable (patch/minor/none) read from tinfoil
- Add steps.py symlink fix (new patch, split from scarthgap compat)
- Rework scarthgap compat: use shutil.which for bitbake-config-build fallback with D() logging, add tuple length assertion, fix env string bug (MACHINE=foo None when TCLIBC unset)
- Rework --stable: use bb.fetch2.Fetch public API (not FetchData), fix is_patch_update off-by-one length guard, fix _get_git_versions break-on-blank-line dropping remaining tags, optimize quick-path to skip tinfoil for recipes already at patch version
- Rework --resume: use succeed/failed symlinks created immediately (not at end of run) as Alex suggested, use name-based comparison instead of object identity for symlink classification, add no-previous-run warning
- Series reduced from 9 to 4 patches

Daniel Turull (4):
steps.py: resolve symlinks in recipe_dir upgrade-helper.py: Add compatibility with Yocto scarthgap upgrade-helper.py: Add stable option for patch-only upgrades upgrade-helper.py: Add resume option to skip already attempted recipes

 modules/steps.py         |   2 +-
 modules/utils/bitbake.py |  11 ++-
 modules/utils/version.py | 185 +++++++++++++++++++++++++++++++++++++++
 upgrade-helper.py        | 162 ++++++++++++++++++++++++++++++++--
 4 files changed, 348 insertions(+), 12 deletions(-)
 create mode 100644 modules/utils/version.py
Signature · 1 line
2.34.1