Change naming of infFilename to be deterministic#899
Conversation
Signed-off-by: FoxtrotCZ <10333810+foxtrotcz@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently
infFilenamefor each driver gets named like "oem-virtio-incus3.inf".Problem with this setup is that the names dont tell us what driver it is and the number changes randomly on each run of Distrobuilder because output of
mapin Golang is in random order.So run it once and
vioscsigetsinfFilename = "oem-virtio-incus3.inf"for example.Run it again ang it gets
infFilename = "oem-virtio-incus5.inf"This is bad for debugging because you can never know which

infFilenamebelongs to which driver.On disk it looks like this:
infFilenameis also used in Windows Registry where its also confusing.This pull request changes the naming to be the same as driver
driverNamebut lowercase.If you prefer it can be also something like this. Maybe to avoid potential naming conflicts?
infFilename := "oem-virtio-" + strings.ToLower(driverName) + ".inf"Important thing is for it to be always the same and contain name of the actual driver.
Thanks.