| Summary: | urpme kernel-(tab) does not offer installed kernels to remove | ||
|---|---|---|---|
| Product: | Mageia | Reporter: | Ben McMonagle <westel> |
| Component: | RPM Packages | Assignee: | Mageia Bug Squad <bugsquad> |
| Status: | RESOLVED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | Normal | CC: | fri, lewyssmith |
| Version: | Cauldron | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Source RPM: | CVE: | ||
| Status comment: | |||
|
Description
Ben McMonagle
2022-04-30 08:41:19 CEST
I am unsure exactly what the complaint is. What is the difference between "only the kernel series" and "the installed kernel versions"? What do you expect otherwise? Experimenting: $ sudo urpme --test kernel[Tab] kernel-desktop-5.15.10-1.mga8 kernel-desktop-5.15.28-1.mga8 ... kernel-desktop-5.15.16-1.mga8 kernel-desktop-latest kernel-desktop-5.15.18-2.mga8 kernel-firmware kernel-desktop-5.15.23-1.mga8 kernel-firmware-nonfree kernel-desktop-5.15.25-1.mga8 kernel-userspace-headers This list must come from the shell, not urpme. $ sudo urpme --test kernel [sudo] password for lewis: Mae pecynnau canlynol yn cynnwys kernel: [Following pkgs include kernel] kernel-desktop-5.15.10-1.mga8-1-1.mga8.x86_64 ... kernel-desktop-latest-5.15.35-2.mga8.x86_64 kernel-firmware-20201218-1.mga8.noarch kernel-firmware-nonfree-20220411-1.mga8.nonfree.noarch kernel-userspace-headers-5.15.35-2.mga8.x86_64 This comes from urpme. $ sudo urpme --test kernel-desktop[Tab] and $ sudo urpme --test kernel-desktop-[Tab] kernel-desktop-5.15.10-1.mga8 kernel-desktop-5.15.25-1.mga8 ... kernel-desktop-5.15.18-2.mga8 kernel-desktop-latest kernel-desktop-5.15.23-1.mga8 List from shell. $ sudo urpme --test kernel-desktop [sudo] password for lewis: Mae pecynnau canlynol yn cynnwys kernel-desktop: kernel-desktop-5.15.10-1.mga8-1-1.mga8.x86_64 ... kernel-desktop-latest-5.15.35-2.mga8.x86_64: From urpme. What is dicey about this is that the lists include the running kernel. The safe thing to do is remove them one by one. CC:
(none) =>
lewyssmith Related: There is some useful script in Bug 24403 - Feature request : tool to remove old kernels CC:
(none) =>
fri
Well, tecnically its not a bug as normal rpm bash-completion unly matches names, not version and release...
but I guess you are used to kernels in <= mga8 shows up with version and release ...
This is because we had version-release as part of the name back then....
If you want to see full versioning on >=mga9 you could apply this patch:
--- /usr/share/bash-completion/completions/rpm.orig
+++ /usr/share/bash-completion/completions/rpm
@@ -15,7 +15,7 @@
COMPREPLY=($(compgen -W '$(rpmqpack)' -- "$cur"))
else
COMPREPLY=($(${1:-rpm} -qa --nodigest --nosignature \
- --queryformat='%{NAME} ' "$cur*" 2>/dev/null))
+ --queryformat='%{NAME}-%{VERSION}-%{RELEASE} ' "$cur*" 2>/dev/null))
fi
}
(note that it wont take affect until closing console and opening it again...)
with this patch every package installed will show up with full name-version-release
note that if you want to keep that behaviour I suggest you copy the modified
/usr/share/bash-completion/completions/rpm to /etc/bash_completion.d/ so it does not get overwritten on rpm updates...
of course some bash magic could be applied to only trigger on matching kernel* but thats for another day...
(In reply to Lewis Smith from comment #1) > I am unsure exactly what the complaint is. What is the difference between > "only the kernel series" and "the installed kernel versions"? What do you > expect otherwise? > > Experimenting: > $ sudo urpme --test kernel[Tab] > kernel-desktop-5.15.10-1.mga8 kernel-desktop-5.15.28-1.mga8 > ... > kernel-desktop-5.15.16-1.mga8 kernel-desktop-latest > kernel-desktop-5.15.18-2.mga8 kernel-firmware > kernel-desktop-5.15.23-1.mga8 kernel-firmware-nonfree > kernel-desktop-5.15.25-1.mga8 kernel-userspace-headers > This list must come from the shell, not urpme. > > $ sudo urpme --test kernel > [sudo] password for lewis: > Mae pecynnau canlynol yn cynnwys kernel: [Following pkgs include kernel] > kernel-desktop-5.15.10-1.mga8-1-1.mga8.x86_64 > ... > kernel-desktop-latest-5.15.35-2.mga8.x86_64 > kernel-firmware-20201218-1.mga8.noarch > kernel-firmware-nonfree-20220411-1.mga8.nonfree.noarch > kernel-userspace-headers-5.15.35-2.mga8.x86_64 > This comes from urpme. > > $ sudo urpme --test kernel-desktop[Tab] > and > $ sudo urpme --test kernel-desktop-[Tab] > kernel-desktop-5.15.10-1.mga8 kernel-desktop-5.15.25-1.mga8 > ... > kernel-desktop-5.15.18-2.mga8 kernel-desktop-latest > kernel-desktop-5.15.23-1.mga8 > List from shell. > > $ sudo urpme --test kernel-desktop > [sudo] password for lewis: > Mae pecynnau canlynol yn cynnwys kernel-desktop: > kernel-desktop-5.15.10-1.mga8-1-1.mga8.x86_64 > ... > kernel-desktop-latest-5.15.35-2.mga8.x86_64: > From urpme. > > What is dicey about this is that the lists include the running kernel. > The safe thing to do is remove them one by one. in Mga8, to remove excess kernels, just running urmpe kernel(+tab) would list all installed packages starting "kernel", refining the call with urpme kernel-desk(+tab) would list all kernel-desk(top) kernels. then do some c/p in the terminal to remove unwanted kernels. this no longer happens in cauldron. running update-grub2 prior to the urpme command listed 2 kernels , but none were listed in the urpme kernel-desktop query (In reply to Morgan Leijström from comment #2) > Related: There is some useful script in > Bug 24403 - Feature request : tool to remove old kernels "urpme_old-kernels" is listed in available packages, but has a dependency "urpme", which, as of creation of this report, was un-available. (In reply to Thomas Backlund from comment #3) > Well, tecnically its not a bug as normal rpm bash-completion unly matches > names, not version and release... > > but I guess you are used to kernels in <= mga8 shows up with version and > release ... > > This is because we had version-release as part of the name back then.... > > If you want to see full versioning on >=mga9 you could apply this patch: > > --- /usr/share/bash-completion/completions/rpm.orig > +++ /usr/share/bash-completion/completions/rpm > @@ -15,7 +15,7 @@ > COMPREPLY=($(compgen -W '$(rpmqpack)' -- "$cur")) > else > COMPREPLY=($(${1:-rpm} -qa --nodigest --nosignature \ > - --queryformat='%{NAME} ' "$cur*" 2>/dev/null)) > + --queryformat='%{NAME}-%{VERSION}-%{RELEASE} ' "$cur*" > 2>/dev/null)) > fi > } > > > > (note that it wont take affect until closing console and opening it again...) > > > > with this patch every package installed will show up with full > name-version-release > > > note that if you want to keep that behaviour I suggest you copy the modified > /usr/share/bash-completion/completions/rpm to /etc/bash_completion.d/ so it > does not get overwritten on rpm updates... > > > of course some bash magic could be applied to only trigger on matching > kernel* but thats for another day... Thanks Thomas. looks like I will have to move with the times and learn a new command ;) closing as a new package (urpme_old-kernels ) should be used for this task instead Resolution:
(none) =>
WONTFIX |