Conversation
b907bad to
3d92d3a
Compare
test/test_smoke.py
Outdated
| ], text=True) | ||
|
|
||
| # ensure we only have lines containing `rhel-10.0` | ||
| assert all("rhel-10.0" in line for line in output.splitlines()) |
There was a problem hiding this comment.
I would use non-existing-os-1.0 just to make sure the code does not actually load our built-in OS repos. I guess the OS must exist, then could you perhaps use an architecture that is no longer supported in RHEL 10 and check for that combination? Assuming this is possible, if not, ignore my comment.
There was a problem hiding this comment.
That would require also passing in custom definitions.
There was a problem hiding this comment.
The fact that the built-in OS repos are not loaded is asserted by checking that no other than rhel-10.0 distributions are shown as available. If we wanted to be fancy, we could also test that only x86_64 is available for that distro.
mvo5
left a comment
There was a problem hiding this comment.
Thanks, the repos commit looks good (once small suggestion about the test only). The other one I would like to look at some more, maybe worth splitting this PR if you want to land this quicker?
3d92d3a to
5af3721
Compare
The --data-dir is deprecated in favor of --force-data-dir.
5af3721 to
8a9c1b8
Compare
With the rename of `data-dir` to `force-data-dir` it is implied that only data within the `force-data-dir` is being used. However, the repositories were always merged with the built-in embedded filesystem. This commit makes it so that when a `force-data-dir` is passed as an argument then only the repositories inside that directory are used. Note that the repository files inside the data directory still must match any defined distributions in the definitions. Also add a small smoke test that uses `force-data-dir` to only set up a `rhel-10.0` repository and assert that there are only listed images for `rhel-10.0`. Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
8a9c1b8 to
8305290
Compare
This changes the handling for
--force-data-dirto actually override any built-in repositories instead of merely overlaying them. Overlaying can be introduced later as--extra-data-dirinstead.The behavior after this commit is the intended and expected behavior.
I've also fixed the deprecation warning being emitted for
--force-data-dirand--data-dirwhich was found by @thozza. I couldn't really find a nice way to do it; so I've done the verbose way. If someone has a better idea let me know :)