Skip to content

Conversation

@scaronni
Copy link
Member

@scaronni scaronni commented Jun 6, 2025

Ubuntu has compiler strings in the kernel configuration not created in a consistent way:

root@7829fb0730dc:/# grep CONFIG_CC_VERSION_TEXT= /lib/modules/5.15.0-141-generic/build/.config 
CONFIG_CC_VERSION_TEXT="gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
root@7829fb0730dc:/# grep CONFIG_CC_VERSION_TEXT= /lib/modules/5.15.0-141-generic/build/include/config/auto.conf
CONFIG_CC_VERSION_TEXT="gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
root@7829fb0730dc:/# grep CONFIG_CC_VERSION_TEXT= /lib/modules/6.8.0-60-generic/build/.config 
CONFIG_CC_VERSION_TEXT="x86_64-linux-gnu-gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0"
root@7829fb0730dc:/# grep CONFIG_CC_VERSION_TEXT= /lib/modules/6.8.0-60-generic/build/include/config/auto.conf 
CONFIG_CC_VERSION_TEXT=x86_64-linux-gnu-gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0

Change the regular expression for matching the kernel versions to ignore the double quotes if they are available.

@scaronni scaronni requested review from amilonenv and anbe42 June 6, 2025 09:58
Copy link
Collaborator

@anbe42 anbe42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps add some example strings as comments to show what is going to be parsed

@scaronni scaronni force-pushed the ubuntu branch 2 times, most recently from f6f4803 to 356eeca Compare June 6, 2025 12:47
@scaronni
Copy link
Member Author

scaronni commented Jun 6, 2025

Added the comments.

@scaronni
Copy link
Member Author

scaronni commented Jun 9, 2025

If there's no other feedback, i'll merge it.

Copy link
Collaborator

@anbe42 anbe42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpicking.

@scaronni scaronni merged commit 6c5d305 into main Jun 12, 2025
58 checks passed
@scaronni scaronni deleted the ubuntu branch June 14, 2025 09:19
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