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

otk: fix incorrect tree copy in otk.include #175

Merged
merged 1 commit into from
Jul 10, 2024

Conversation

mvo5
Copy link
Contributor

@mvo5 mvo5 commented Jul 10, 2024

When trying to compile the example in PR#167 I noticed slightly strange behavior. Currently when doing:

otk.target.osbuild:
  otk.include: "16-include-copy/repository-${version}.yaml"

the output is

{
     'otk.include': '16-include-copy/repository-${version}.yaml',
     'sources': {},
     'version': '2',
}

The reason is that we have an extra tree.copy() when we process includes. However in other parts of the code (including accross recursions) we use "tree.update()" so that the tree we worked on and the tree that the other parts of the recursion go out of sync. The easiest fix is to simply drop the copy.

When trying to compile the example in PR#167 I noticed slightly
strange behavior. Currently when doing:
```
otk.target.osbuild:
  otk.include: "16-include-copy/repository-${version}.yaml"
```
the output is
```
{
     'otk.include': '16-include-copy/repository-${version}.yaml',
     'sources': {},
     'version': '2',
}
```
The reason is that we have an extra `tree.copy()` when we process
includes. However in other parts of the code (including accross
recursions) we use "tree.update()" so that the tree we worked
on and the tree that the other parts of the recursion go out of
sync. The easiest fix is to simply drop the copy.
@supakeen supakeen added this pull request to the merge queue Jul 10, 2024
Merged via the queue into osbuild:main with commit 152f3cd Jul 10, 2024
3 checks passed
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.

2 participants