Jguer / yay

Yet another Yogurt - An AUR Helper written in Go
GNU General Public License v3.0
10.88k stars 354 forks source link

Number menu mixes up packages #812

Closed Morganamilo closed 5 years ago

Morganamilo commented 5 years ago

Affected Version

yay v8.1173.0.r21.ge18c236 - libalpm v11.0.1

Issue

Weirdly, when trying to install javafx the number menu gets a little confused. hitting 1 tries to install the entry labelled as 3 and vice versa. Entry 2 is correct.

Looking into it more it seems like a topdown/bottomup issue. The lists are actually reversed, entering 1 tries to get the last package, 2 the last but one and so on.

This is not present on stable.

Looking into it even more explicitly using --topdown or --bottomup fixes it

This seems to be because my config.json file lists sortmode as 0 but --topdown is 4 and --bottomup is 3

So it seem slike https://github.com/Jguer/yay/commit/2ed7df4f5a962309460ab87b1d0789027da0aa64 is the cause. Reverting this back may cause the same issue in reverse, the config file having 3 saved while valid values are 0 and 1. But as this code has never hit release I'm happy to partially revert the merging of types.

Steps to reproduce

  1. yay javafx
  2. 1

Output

1 extra/java-openjfx 8.u172-2 (25.4 MiB 77.9 MiB) 
    Java OpenJFX 8 client application platform (open-source implementation of JavaFX)
2 extra/java-openjfx-doc 8.u172-2 (2.8 MiB 55.2 MiB) 
    Java OpenJFX 8 client application platform (open-source implementation of JavaFX) - documentation
3 extra/java-openjfx-src 8.u172-2 (5.7 MiB 6.2 MiB) (Installed)
    Java OpenJFX 8 client application platform (open-source implementation of JavaFX) - sources
4 aur/javafx-scenebuilder-bin 2.0b20-2 (+24 0.31%) (Out-of-date 2017-01-08) 
    Visual layout tool that lets users quickly design Java application user interfaces (Oracle binary version)
5 aur/gluon-scenebuilder 8.4.1-1 (+19 0.43%) (Orphaned) (Out-of-date 2018-09-24) 
    Open-source drag & drop UI design tool for JavaFX (Java 8) by Gluon (binary)
6 aur/javafx-scenebuilder 8.5.0-2 (+13 0.14%) 
    Gluon Scene Builder for Java 8, based on debian package, this version is recognized by Netbeans, it was released on Jun 5, 2018.
7 aur/scenebuilder 8u102_b03-1 (+8 0.00%) (Out-of-date 2017-01-08) 
    JavaFX visual layout tool that lets users quickly design JavaFX application user interfaces, without coding
8 aur/asciidocfx 1.6.8-1 (+3 0.01%) 
    Asciidoc Editor and Toolchain written with JavaFX 8
9 aur/javafx9-scenebuilder 9.0.1-1 (+3 0.02%) 
    The latest version of Gluon Scene Builder for Java 9, it was released on Oct 17, 2017.
10 aur/javafx10-scenebuilder 10.0.0-0 (+3 0.62%) 
    The latest version of Gluon Scene Builder for Java 10, it was released on Jun 5, 2018.
11 aur/scenic-view 8.7.0-1 (+2 0.00%) 
    A tool for analyzing the scenegraph of a JavaFX application
12 aur/javafx-gluon-scenebuilder 8.4.1-2 (+1 0.00%) (Orphaned) 
    Open-source drag & drop UI design tool for JavaFX (Java 8) by Gluon
==> Packages to install (eg: 1 2 3, 1-3 or ^4)
==> 1
[sudo] password for morganamilo: 
warning: java-openjfx-src-8.u172-2 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Package (1)             Old Version  New Version  Net Change

extra/java-openjfx-src  8.u172-2     8.u172-2       0.00 MiB

Total Installed Size:  6.24 MiB
Net Upgrade Size:      0.00 MiB

:: Proceed with installation? [Y/n] 
Morganamilo commented 5 years ago

Also the reason I didn't just make a PR is because this did actually start out as a bug report. I wrote up the issue then started figuring the rest out and adding the "https://github.com/Jguer/yay/issues/812" bits. Didn't want to waste what I'd already written up.

Jguer commented 5 years ago

I have also noticed that and it is specially prevalent on stable to git upgrades https://github.com/Jguer/yay/issues/810#issuecomment-439953033 It's what caused this following appendum. I actually haven't fixed it because I was waiting for the new config system to fix it in place. We can just revert the merging of types and be done with it until the new config system. Also doing the reversal allows to release an intermediate update

Morganamilo commented 5 years ago

I have also noticed that and it is specially prevalent on stable to git upgrades arghhh so you knew but left me to figure it all out myself :(

Feel free to make a new release, it's been a long while since the last one. There's not too many commits but taking a look I just realised the depsolver merge is still not in stable. I think it's been in git long enough.

Jguer commented 5 years ago

I'm sorry :sweat_smile:, just thought it was such a transient bug it would get fixed by the config system soon enough. I'll make a new release today