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

chore: refactor package rename script to support all kernel versions #259

Merged
merged 4 commits into from
Oct 22, 2024

Conversation

p5
Copy link
Member

@p5 p5 commented Oct 22, 2024

Updates the RPM renaming script to read the kernel version from the installed kernel-core RPM, removing that string from the package names if it exists.

@p5 p5 marked this pull request as ready for review October 22, 2024 17:10
@p5 p5 requested a review from castrojo as a code owner October 22, 2024 17:10
@p5 p5 requested a review from bsherman October 22, 2024 17:10
@p5 p5 marked this pull request as draft October 22, 2024 17:33
@bsherman
Copy link
Contributor

@p5 confirming I understand the purpose here.

This keeps the same general behavior as before, but is safe for future kernel versions.
Plus, it eliminates reprocessing of any RPM packages which don't have kernel-version in the package name.

Correct?

@p5
Copy link
Member Author

p5 commented Oct 22, 2024

This keeps the same general behavior as before, but is safe for future kernel versions.
Plus, it eliminates reprocessing of any RPM packages which don't have kernel-version in the package name.

Exactly. If it worked.
For some reason, some builds are failing.

@bsherman
Copy link
Contributor

This keeps the same general behavior as before, but is safe for future kernel versions.
Plus, it eliminates reprocessing of any RPM packages which don't have kernel-version in the package name.

Exactly. If it worked. For some reason, some builds are failing.

https://github.com/ublue-os/akmods/actions/runs/11465079157/job/31902747757#step:12:3007

{:timestamp=>"2024-10-22T17:16:54.945664+0000", :message=>"error: line 39: Illegal char '^' (0x5e) in: Name: kmod-xpadneo-0.9.6^20240923git70ef8ee-3.fc39.x86_64.rpm", :level=>:info}

@antheas
Copy link
Contributor

antheas commented Oct 22, 2024

I would suggest gutting the logic and just checking if -6 exists in the string and only doing the sub then. Much simpler for now.

@bsherman
Copy link
Contributor

Exactly. If it worked. For some reason, some builds are failing.

I did some "println debugging" and saw this:

KERNEL_VERSION=6.11.3-200.fc40.x86_64
BASENAME=kmod-xpadneo-6.11.3-200.fc40.x86_64-0.9.6^20240923git70ef8ee-3.fc40.x86_64.rpm
OLD_NAME=kmod-xpadneo
P5_NAME=kmod-xpadneo-0.9.6^20240923git70ef8ee-3.fc40.x86_64.rpm
NEW_NAME=kmod-xpadneo
REBUILDING kmod-xpadneo-6.11.3-200.fc40.x86_64-0.9.6^20240923git70ef8ee-3.fc40.x86_64.rpm as it DOES contain 6.11.3-200.fc40.x86_64 in its name

The sed command simply wasn't behaving in a manner similar to the old bash native substitution...

I'll push a fix momentarily.

@p5 p5 marked this pull request as ready for review October 22, 2024 20:07
Copy link
Contributor

@bsherman bsherman left a comment

Choose a reason for hiding this comment

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

Not only does this make this work for future kernels, this fixes an issue where we were incorrectly renaming RPMs which did NOT have the kernel string in their filename. (eg, ZFS library RPMs).

@bsherman bsherman added this pull request to the merge queue Oct 22, 2024
Merged via the queue into main with commit 27e72cc Oct 22, 2024
64 checks passed
@bsherman bsherman deleted the refactor-package-rename-scripts branch October 22, 2024 21:54
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.

4 participants