Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: bsp-cli package isn't being rebuilt #6817

Open
1 of 2 tasks
SteeManMI opened this issue Jun 28, 2024 · 6 comments · May be fixed by #6839
Open
1 of 2 tasks

[Bug]: bsp-cli package isn't being rebuilt #6817

SteeManMI opened this issue Jun 28, 2024 · 6 comments · May be fixed by #6839
Assignees
Labels
Bug Something isn't working as it should

Comments

@SteeManMI
Copy link
Contributor

What happened?

PR #6797 made changes to the bsp-cli for aml-s9xx-box preinst script. However that change isn't being picked up by the build framework and the nightly builds are using a cached older version of that package. The change in the board config file isn't being detected as a change invalidating the cached version of the package.
Is there anyway to force a new version of the package to be built so the nightlies pick up this change?

How to reproduce?

Looked at the contents of the latest nightly builds.

Branch

main (main development branch)

On which host OS are you running the build script and observing this problem?

Ubuntu 22.04 Jammy

Are you building on Windows WSL2?

  • Yes, my Ubuntu/Debian/OtherOS is running on WSL2

Relevant log URL

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@SteeManMI SteeManMI added the Bug Something isn't working as it should label Jun 28, 2024
Copy link

Jira ticket: AR-2389

@SteeManMI
Copy link
Contributor Author

Actually, I suspect that the change I made in PR #6803 today (since in that PR I changed an actual file in the bsp) that the next nightly will finally pick up my change from PR #6797 finally.

But the underlying issue remains, that the caching logic isn't invalidating the cache when the only change is in the preinst script.

@rpardini
Copy link
Member

Hey @SteeManMI you're correct.

There's limits to "how deep" we can inspect the changes to calculate hashes.

In this case, what is hashed is the post_family_tweaks_bsp hook -- especifically post_family_tweaks_bsp__config_aml-s9xx-box_bsp() function. The hashing uses declare -f, which dumps the contents of that function and hashes it.

Since that function refers to aml-s9xx-box-bsp-cli-preinst, and preinst_functions isn't hashed, the system considers nothing has changed.

This can happen with any hook that delegates to another function, and while that function might have changed, the hook didn't. I've still to come up with some general-enough solution for that...

For now, a workaround would be to change something (comments, even) in the hook function; eg

# ...
preinst_functions+=('aml-s9xx-box-bsp-cli-preinst') # change this when function changed! 001
# ...

@SteeManMI
Copy link
Contributor Author

@rpardini Thanks for the explanation and the workaround. Given as you said you can't make the hashes catch all cases, this can probably be closed. But I leave that for you to decide if this is worth your time to attempt to fix. For me the workaround is good enough now that I know what to do.

@SteeManMI
Copy link
Contributor Author

@rpardini I have an update. It appears the issue is even deeper than discussed above. So I mentioned that I thought that my changes in the second PR that was committed yesterday would work around the problem, but that change is also not being picked up. The first PR #6797 is the change to the preinst file. The second PR #6803 changes a file in the bsp. The changed file (extlinux/extlinux.conf.template) also is not triggering a new hash and the old cached package is still being used. So if changing the contents of a file in the bsp doesn't trigger a new hash, what does? And is there a workaround for that case as well?

@rpardini
Copy link
Member

@SteeManMI let me review. Files that are (unconditionally) included in the bsp-cli should be hashed. Keep in mind the hashing happens before any hooks are actually run, so things that are conditionally included/excluded might be troublesome.

rpardini added a commit to armsurvivors/armbian-build that referenced this issue Jun 30, 2024
… with the hook; half fixes armbian#6817

- this is technically cheating, but works
- add @todo's ref the manual include'ing of files that are not hashed in the bsp-cli
rpardini added a commit to armsurvivors/armbian-build that referenced this issue Jun 30, 2024
…9xx-box` to `config/optional/boards/aml-s9xx-box/_packages/bsp-cli`; fixes armbian#6817

- with this:
  - those files are automatically hashed by the bsp-cli hashing mechanism
  - no need to copy them manually any more
rpardini added a commit to armsurvivors/armbian-build that referenced this issue Jun 30, 2024
… with the hook; half fixes armbian#6817

- this is technically cheating, but works
- add @todo's ref the manual include'ing of files that are not hashed in the bsp-cli
rpardini added a commit to armsurvivors/armbian-build that referenced this issue Jun 30, 2024
…9xx-box` to `config/optional/boards/aml-s9xx-box/_packages/bsp-cli`; fixes armbian#6817

- with this:
  - those files are automatically hashed by the bsp-cli hashing mechanism
  - no need to copy them manually any more
rpardini added a commit to rpardini/armbian-build that referenced this issue Jun 30, 2024
… with the hook; half fixes armbian#6817

- this is technically cheating, but works
- add @todo's ref the manual include'ing of files that are not hashed in the bsp-cli
rpardini added a commit to rpardini/armbian-build that referenced this issue Jun 30, 2024
…9xx-box` to `config/optional/boards/aml-s9xx-box/_packages/bsp-cli`; fixes armbian#6817

- with this:
  - those files are automatically hashed by the bsp-cli hashing mechanism
  - no need to copy them manually any more
@rpardini rpardini linked a pull request Jun 30, 2024 that will close this issue
rpardini added a commit to armsurvivors/armbian-build that referenced this issue Jun 30, 2024
… with the hook; half fixes armbian#6817

- this is technically cheating, but works
- add TODO's ref the manual include'ing of files that are not hashed in the bsp-cli
rpardini added a commit to armsurvivors/armbian-build that referenced this issue Jun 30, 2024
…9xx-box` to `config/optional/boards/aml-s9xx-box/_packages/bsp-cli`; fixes armbian#6817

- with this:
  - those files are automatically hashed by the bsp-cli hashing mechanism
  - no need to copy them manually any more
rpardini added a commit to rpardini/armbian-build that referenced this issue Jun 30, 2024
… with the hook; half fixes armbian#6817

- this is technically cheating, but works
- add TODO's ref the manual include'ing of files that are not hashed in the bsp-cli
rpardini added a commit to rpardini/armbian-build that referenced this issue Jun 30, 2024
…9xx-box` to `config/optional/boards/aml-s9xx-box/_packages/bsp-cli`; fixes armbian#6817

- with this:
  - those files are automatically hashed by the bsp-cli hashing mechanism
  - no need to copy them manually any more
rpardini added a commit to armsurvivors/armbian-build that referenced this issue Jun 30, 2024
… with the hook; half fixes armbian#6817

- this is technically cheating, but works
- add TODO's ref the manual include'ing of files that are not hashed in the bsp-cli
rpardini added a commit to armsurvivors/armbian-build that referenced this issue Jun 30, 2024
…9xx-box` to `config/optional/boards/aml-s9xx-box/_packages/bsp-cli`; fixes armbian#6817

- with this:
  - those files are automatically hashed by the bsp-cli hashing mechanism
  - no need to copy them manually any more
rpardini added a commit to armsurvivors/armbian-build that referenced this issue Jun 30, 2024
… with the hook; half fixes armbian#6817

- this is technically cheating, but works
- add TODO's ref the manual include'ing of files that are not hashed in the bsp-cli
rpardini added a commit to armsurvivors/armbian-build that referenced this issue Jun 30, 2024
…9xx-box` to `config/optional/boards/aml-s9xx-box/_packages/bsp-cli`; fixes armbian#6817

- with this:
  - those files are automatically hashed by the bsp-cli hashing mechanism
  - no need to copy them manually any more
rpardini added a commit to rpardini/armbian-build that referenced this issue Jun 30, 2024
… with the hook; half fixes armbian#6817

- this is technically cheating, but works
- add TODO's ref the manual include'ing of files that are not hashed in the bsp-cli
rpardini added a commit to rpardini/armbian-build that referenced this issue Jun 30, 2024
…9xx-box` to `config/optional/boards/aml-s9xx-box/_packages/bsp-cli`; fixes armbian#6817

- with this:
  - those files are automatically hashed by the bsp-cli hashing mechanism
  - no need to copy them manually any more
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working as it should
Development

Successfully merging a pull request may close this issue.

2 participants