Skip to content

Change naming of infFilename to be deterministic#899

Closed
foxtrotcz wants to merge 1 commit intolxc:mainfrom
foxtrotcz:foxtrotcz-infFilename-change
Closed

Change naming of infFilename to be deterministic#899
foxtrotcz wants to merge 1 commit intolxc:mainfrom
foxtrotcz:foxtrotcz-infFilename-change

Conversation

@foxtrotcz
Copy link
Contributor

Currently infFilename for 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 map in Golang is in random order.
So run it once and vioscsi gets infFilename = "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 infFilename belongs to which driver.
On disk it looks like this:
image
infFilename is also used in Windows Registry where its also confusing.

This pull request changes the naming to be the same as driver driverName but 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.

@foxtrotcz foxtrotcz closed this Feb 16, 2025
Signed-off-by: FoxtrotCZ <10333810+foxtrotcz@users.noreply.github.com>
@foxtrotcz foxtrotcz reopened this Feb 16, 2025
@foxtrotcz foxtrotcz closed this Feb 16, 2025
@foxtrotcz foxtrotcz deleted the foxtrotcz-infFilename-change branch February 17, 2025 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant