Bug 31314

Summary: minor errors in operation and description
Product: Mageia Reporter: Mészáros Csaba <csablak>
Component: RPM PackagesAssignee: Mageia tools maintainers <mageiatools>
Status: NEW --- QA Contact:
Severity: minor    
Priority: Normal CC: csablak
Version: 8   
Target Milestone: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Source RPM: urpmi-8.125-1.mga8 CVE:
Status comment:

Description Mészáros Csaba 2022-12-23 19:49:43 CET
I am looking for a comparison or commands of equal value between my favorite urpmX and dnf. That's when errors appeared.

1 error:
$ dnf repoquery gimp
Az utolsó metaadat lejárati ellenőrzés ennyi ideje volt: 0:36:43, ekkor: 2022. dec. 23., péntek, 18:28:29 CET.
gimp-2:2.10.22-3.mga8.x86_64
gimp-2:2.10.24-1.1.mga8.x86_64
gimp-2:2.10.24-1.2.mga8.x86_64
gimp-2:2.10.24-1.mga8.x86_64

Interestingly, the corresponding urpmq command does not write under each other, but next to each other, which is confusing.
$ urpmq -f gimp
gimp-2.10.22-3.mga8.x86_64|gimp-2.10.24-1.mga8.x86_64|gimp-2.10.24-1.1.mga8.x86_64|gimp-2.10.24-1.2.mga8.x86_64

2 error:
The urpmq --list switch does not work.

$ man urpmq
--list
    List available packages. - (Are you referring to the installed or non-installed packages?)

But when I run it, it asks me to

$ urpmq --list translate-shell
használja a -l opciót a fájllistához (use the -l option for the file list)

$ man urpmq
-l  Lists files in packages. - (This works anyway)

What now?
 
I think these commands should have approx. they should show the same output.

$ dnf list gimp
Az utolsó metaadat lejárati ellenőrzés ennyi ideje volt: 0:44:27, ekkor: 2022. dec. 23., péntek, 18:28:29 CET.
Installed packages
gimp.x86_64    2:2.10.24-1.2.mga8    @System - (AWhy does it write the package name like that? gimp.x86_64 ...)

$ urpmq --list gimp (does not work)
gimp-2.10.24-1.2.mga8

And unfortunately I couldn't find it
$ urpmf trans | grep "bin/trans"  appropriate dnf command.

I already mentioned urpmi -a in an old post (16728), but nothing happened with that either.

Regards. Csaba
Mészáros Csaba 2022-12-23 19:49:54 CET

CC: (none) => csablak

Comment 1 sturmvogel 2022-12-23 20:27:19 CET
"Error 1" is no error. 
Different tools use different syntax. Different tools have different outputs and ways to present it.


"Error 2" is a missunderstanding on your side.
"urpmg --list" works properly. You don't use it with an additional packagename or option like you did. That means "urpmq --list packagename" will fail because that is not the intended usecase for "--list".
You compare --list" with "-l" but that are two completely different options.
--list: List available packages
-l: Lists files in packages


urpmi(rpm) and dnf are two seperate tools with different command syntax and different ways how to do things. They will never be the same or 100% compareable.

IMHO this bugeport is INVALID.
Comment 2 Mészáros Csaba 2022-12-23 21:10:24 CET
All right. 
As I mentioned, Error 1 it is a small error, so it does not affect the operation. It's just confusing.
However, considering the Error 2, a package name was required for all commands so far. And then this should be clarified in the man urpmq.
But I tried it now and just typed urpmq --list.
Some of them have written the same name twice or more.
Good. Then let's filter. urpmq -list | grep gimp
Suddenly I didn't even understand what it was good for. Here, too, one name is repeated many times. There are no versions, nothing.
Actually rpm -qa | grep gimp I was looking for the urpmq equivalent.
But according to them, there is no such thing.
And I never thought that two different programs would produce exactly the same outputs. Just similar ones.
If a person thinks that he is switching from urpmi to dnf, he is obviously looking for ways to replace his previous commands.
Thanks for the information though.

Regards Csaba
Comment 3 sturmvogel 2022-12-23 21:25:17 CET
urpmq is a tool to access and query the urpmi database. It can be used to list available packages in the various urpmi media, or to list the full dependencies of a package, or to list the packages that will be installed if you start urpmi.

(In reply to Mészáros Csaba from comment #2)

> urpmq -list | grep gimp
> Suddenly I didn't even understand what it was good for. Here, too, one name
> is repeated many times. There are no versions, nothing.
You need a proper combination of options. Your command is wrong.
"urpmq --list -f | grep gimp" will list all packages (including versions) which have the term "gimp" in the package name and are available in any configured installation media.
Comment 4 sturmvogel 2022-12-23 21:45:30 CET
For your understanding:

urpmq -f kfind
kfind-20.12.0-1.mga8.x86_64

urpmq --fuzzy -f kfind
kfind-20.12.0-1.mga8.x86_64
kfind-handbook-20.12.0-1.mga8.noarch

urpmq --list -f | grep kfind
kfind-20.12.0-1.mga8.x86_64
kfind-20.12.0-1.mga8.i586
kfind-handbook-20.12.0-1.mga8.noarch
kfind-handbook-20.12.0-1.mga8.noarch
Comment 5 Lewis Smith 2022-12-23 22:11:58 CET
[collided]
I am here on M8, and tried these things. Same conclusions as sturmvogel.

1) $ urpmq -f gimp
gimp-2.10.22-3.mga8.x86_64|gimp-2.10.24-1.mga8.x86_64|gimp-2.10.24-1.1.mga8.x86_64|gimp-2.10.24-1.2.mga8.x86_64

Yes, it would be nicer listed vertically. A valid enhancement request (should be easy).

For comparison:
 $ dnf list gimp
as a first use of DNF took so long downloading repositories, I gave up.
But the fact that its output is different to 'urpmq -f' is irrelevant. Our urpm* utilities are nothing to do with DNF, so any hope that they should be similar is misguided. If they were more alike - why have both?

2) $ urpmq --list
"--list
           List available packages"
Does work. 'Available' means just that; if it meant 'installed', it would say so.
To test this:
 $ urpmq --list | less
outputs a huge package list. How big?
 $ urpmq --list | wc -l
 44346
Clearly not those installed, which is given by (at least):
 $ rpm -qa | wc -l
 3112

3) Bug 16728
 -a  If multiple packages match the given substring, install them all
A fair complaint about this old still open bug. I have upped its priority.

Assignee: bugsquad => mageiatools

Comment 6 Mészáros Csaba 2022-12-23 23:07:27 CET
OK. Thanks for the info.
Although I will neglect this command urpmq --list -f grep package, because 
urpmq -ry package approx. does the same. In addition, it does not show the old ones. And that's the point.

Regards: Csaba

Merry Christmas!