Skip to content

New overlay folder selection algorithm#45

Open
ziopio wants to merge 2 commits into
masterfrom
ziopio/patch
Open

New overlay folder selection algorithm#45
ziopio wants to merge 2 commits into
masterfrom
ziopio/patch

Conversation

@ziopio

@ziopio ziopio commented Jul 24, 2026

Copy link
Copy Markdown
Member

Problems of the legacy system

The old algorithm assebles a predefined list of directories by splitting the OTP version and then assembles a hierarchical list of directories.

For 28.5.0.2 it will look for:

  • 28
  • 28.5
  • 28.5.0
  • 28.5.0.2

Ignoring any other directory; which means ignoring any other patch or addintion added in an OTP maintenance version that preceeded 28.5.0.2

Changes

This new algorithm will pick up every available folder that satisfies these 2 contitions:

  • shares the same Major version number of the target version
  • It is equal or older then the target version

Example:

Give target OTP version: 28.5.0.2

Compatible folders selected to build an overlay:

28, 28.0.2, 28.3, 28.3.3, 28.5, 25.5.0.1, 28.5.0.2.

The follwing forders would be ignored if they exists:

26, 27, 29, 28.5.0.3, 28.6 ...

Notes

This change is very important to minimize the need to duplicate patches when an OTP version increments its maintenance version. In other words it lower the maintenance effort.

This change is quite "safe" as it will expand the amount of directories used but for this same reason it could also introduce regressions or applly more patches and files then expected.

I only tested with the grisp and grisp_cryptoauth grisp apps

@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

@ziopio
ziopio requested review from maehjam and sylane July 24, 2026 14:02
ziopio added 2 commits July 24, 2026 16:09
This new algorithm will pick up every available folder that satisfies these 2 contitions:

- shares the same Major version number of the target version
- it is equal or older then the target version

Example:

Give target OTP version: 28.5.0.2

Compatible folders selected to build an overlay:

28, 28.0.2, 28.3, 28.3.3, 28.5, 25.5.0.1, 28.5.0.2.

The follwing forders would be ignored if they exists:

26, 27, 29, 28.5.0.3, 28.6 ...

@maehjam maehjam left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants