Bug 31543

Summary: urpme auto completion isn't full working
Product: Mageia Reporter: Paul Éric Despretz <paul-eric.despretz>
Component: RPM PackagesAssignee: Mageia Bug Squad <bugsquad>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: Normal CC: fri, mageiatools, marja11
Version: Cauldron   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Source RPM: CVE:
Status comment:

Description Paul Éric Despretz 2023-02-12 11:35:25 CET
Description of problem: When using urpme to remove some installed kernel, it always propose only the generic ones.


Version-Release number of selected component (if applicable):


How reproducible: always


Steps to Reproduce:
1. As root in console type : #urpme kernel-desk
2. Then type TAB key to autocomplete
3. result is always : 
kernel-desktop               kernel-desktop-devel         kernel-desktop-devel-latest  kernel-desktop-latest
4. then try : # rpm -qa|grep kernel-desk
5. result is : kernel-desktop-6.1.10-1.mga9
kernel-desktop-6.1.11-1.mga9
kernel-desktop-devel-6.1.11-1.mga9
kernel-desktop-6.1.11-2.mga9
kernel-desktop-devel-6.1.11-2.mga9
kernel-desktop-6.1.11-3.mga9
virtualbox-kernel-desktop-latest-7.0.6-15.mga9
kernel-desktop-devel-6.1.11-3.mga9
kernel-desktop-devel-latest-6.1.11-3.mga9
kernel-desktop-latest-6.1.11-3.mga9

When the /boot is full, urpme autocompletion can't be used to find all the installed kernel.
Comment 1 sturmvogel 2023-02-12 12:58:51 CET
If i understand you right, you mean that if you try to autocomplete kernel-desk...
that you also want also results with virtualbox-kernel-desk..?

This is not how autocompleten works!

Autocompletion only works in one direction (to the right side of your search term). 

That means:

term-a <tab>
will only find results like
term-aa
term-abc
and so on

but it is not possible that it works in the other direction like:
term-a <tab>
a-term-a
b-term-a

To come back to your initial question: If you want to find all installed kernels you need to use proper search terms with autocompletion. That means you also need to use virtualbox-kernel-....... and kernel-...


So imho this seems rather invalid as this is the way how autocompletion works (upstream since ages).
Comment 2 Morgan Leijström 2023-02-12 15:26:52 CET
I guess reporter expect it to list all kernel versions, i.e:

kernel-desktop-6.1.11-1.mga9
kernel-desktop-6.1.11-2.mga9


On mga8, i get
$ sudo urpme kernel-desk
kernel-desktop-5.15.88-1.mga8        kernel-desktop-devel-6.1.6-1.mga8
kernel-desktop-6.1.6-1.mga8          kernel-desktop-devel-latest
kernel-desktop-devel-5.15.88-1.mga8  kernel-desktop-latest

(and yes not the virtualbox module)


I guess the difference is that kernel version naming have changed between mga8 and mga9

Question is if urpmi should be adapted or not.


For the specific task of removing kernels, mga9 do have remove-old-kernels which is installed and active per default.

CC: (none) => fri

Comment 3 Paul Éric Despretz 2023-02-12 18:14:34 CET
The virtualbox rmp appears only with "rpm -qa|grep kernel-desk" and it's Ok.
The autocompletion was used on mga8 and earlier to find all the installed kernels on the machine.
I did not know about remove-old-kernels. I just installed it and I think it's what I need for removing unused kernels and clean the /boot partition.

But I also think that urpme autocompletion should show all the rpm actually installed on the system.
Comment 4 Marja Van Waes 2023-02-13 19:53:01 CET
(In reply to Paul Éric Despretz from comment #3)
> The virtualbox rmp appears only with "rpm -qa|grep kernel-desk" and it's Ok.
> The autocompletion was used on mga8 and earlier to find all the installed
> kernels on the machine.
> I did not know about remove-old-kernels. I just installed it and I think
> it's what I need for removing unused kernels and clean the /boot partition.
> 
> But I also think that urpme autocompletion should show all the rpm actually
> installed on the system.

If you do (without tab):

  urpme -v kernel-desk

then at the bottom of the output all installed kernel-desktop* packages are listed.

# LC_ALL=C urpme -v kernel-desk
<snip>
The following packages contain kernel-desk: 
kernel-desktop-6.0.8-1.mga9.x86_64
kernel-desktop-6.1.10-1.mga9.x86_64
kernel-desktop-6.1.11-1.mga9.x86_64
kernel-desktop-6.1.11-2.mga9.x86_64
kernel-desktop-6.1.11-3.mga9.x86_64
kernel-desktop-6.1.6-1.mga9.x86_64
kernel-desktop-6.1.8-1.mga9.x86_64
kernel-desktop-6.1.9-2.mga9.x86_64
kernel-desktop-latest-6.1.11-3.mga9.x86_64
unlocking urpmi database
#

As Morgan explained, it no longer works with the command you used before, because in the past for ever new version of a kernel flavour, a new package name was created, wich contained the version in the name. Now new versions keep the same package name, so can't be shown with auto-completion, even if auto-completion still works correctly.

And as Sturmvogel explained, the virtualbox kernels were never found with auto-completion (unless you did "urpme virtualbox-kernel-desk" <tab>)

Closing, because, as proven above, urpme does offer a way to show all installed kernel-desk* packages and because autocompletion still works as intended.

However, CC'ing the mageiatools maintainers, in case they disagree and want to reopen this report.

Resolution: (none) => INVALID
CC: (none) => mageiatools, marja11
Status: NEW => RESOLVED