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

'Resolve` transaction gives results in different ordering of status ( apt backend ) #733

Closed
sidt4 opened this issue Mar 28, 2024 · 2 comments · Fixed by #735
Closed

'Resolve` transaction gives results in different ordering of status ( apt backend ) #733

sidt4 opened this issue Mar 28, 2024 · 2 comments · Fixed by #735

Comments

@sidt4
Copy link
Contributor

sidt4 commented Mar 28, 2024

OS: Debian unstable:
PK version: 1.2.8

For some packages, we list Installed followed by Available, and the inverse for others. This resulted in https://gitlab.gnome.org/GNOME/gnome-software/-/issues/2352#note_2066289

Installed state first:

$ for i in gnome-calculator gnome-tweaks gnome-mines
> do
> echo
> echo
> pkcon resolve $i
> done

Resolving                               [=========================]         
Loading cache                           [=========================]         
Installed   	gnome-calculator-1:46~beta-1.amd64 (auto:local)             	GNOME desktop calculator
Available   	gnome-calculator-1:46~beta-1+b1.amd64 (debian-unstable-main)	GNOME desktop calculator
Available   	gnome-calculator-1:46~beta-1+b1.amd64 (debian-unstable-main)	GNOME desktop calculator


Resolving                               [=========================]         
Loading cache                           [=========================]         
Installed   	gnome-tweaks-46~beta-1.all (manual:local)                   	tool to adjust advanced configuration settings for GNOME
Available   	gnome-tweaks-46~beta-2.all (debian-unstable-main)           	tool to adjust advanced configuration settings for GNOME
Available   	gnome-tweaks-46~beta-2.all (debian-unstable-main)           	tool to adjust advanced configuration settings for GNOME


Resolving                               [=========================]         
Loading cache                           [=========================]         
Installed   	gnome-mines-1:40.1-1+b1.amd64 (auto:local)                  	popular minesweeper puzzle game for GNOME
Available   	gnome-mines-1:40.1-1+b2.amd64 (debian-unstable-main)        	popular minesweeper puzzle game for GNOME
Available   	gnome-mines-1:40.1-1+b2.amd64 (debian-unstable-main)        	popular minesweeper puzzle game for GNOME

Installed state last:

$ for i in gnome-calendar gnome-disk-utility gnome-chess gnome-sudoku gnome-maps gnome-music gnome-software gnome-text-editor
> do
> echo
> echo
> pkcon resolve $i
> done


Resolving                               [=========================]         
Loading cache                           [=========================]         
Available   	gnome-calendar-46.0-1.amd64 (debian-unstable-main)          	Calendar application for GNOME
Available   	gnome-calendar-46.0-1.amd64 (debian-unstable-main)          	Calendar application for GNOME
Installed   	gnome-calendar-46~beta-1.amd64 (manual:local)               	Calendar application for GNOME


Resolving                               [=========================]         
Loading cache                           [=========================]         
Available   	gnome-disk-utility-46.0-1.amd64 (debian-unstable-main)      	manage and configure disk drives and media
Available   	gnome-disk-utility-46.0-1.amd64 (debian-unstable-main)      	manage and configure disk drives and media
Installed   	gnome-disk-utility-46~alpha-1.amd64 (auto:local)            	manage and configure disk drives and media


Resolving                               [=========================]         
Loading cache                           [=========================]         
Available   	gnome-chess-1:46.0-1.amd64 (debian-unstable-main)           	simple chess game
Available   	gnome-chess-1:46.0-1.amd64 (debian-unstable-main)           	simple chess game
Installed   	gnome-chess-1:46~beta-1+b1.amd64 (auto:local)               	simple chess game
@sidt4
Copy link
Contributor Author

sidt4 commented Mar 29, 2024

I don't see this issue in dnf backend ( Fedora rawhide ). Updated issue title.

@sidt4 sidt4 changed the title 'Resolve` transaction gives results in different ordering of status 'Resolve` transaction gives results in different ordering of status ( apt backend ) Mar 29, 2024
@sidt4
Copy link
Contributor Author

sidt4 commented Mar 29, 2024

Results in pkcon resolve are sorted by name > version > arch etc. So, Installed should always be listed first since it's version should be less than Available (updated) package.

We are doing a strcmp for version comparison, which is not right.

`ret = strcmp(viA.VerStr(), viB.VerStr()); 

sidt4 added a commit to sidt4/PackageKit that referenced this issue Mar 30, 2024
sidt4 added a commit to sidt4/PackageKit that referenced this issue Mar 30, 2024
ximion pushed a commit that referenced this issue May 21, 2024
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 a pull request may close this issue.

1 participant