dhruv8sh / arch-update-checker

Plasma 6 applet to check for AUR and Arch updates
GNU General Public License v2.0
70 stars 5 forks source link

From-version and to-version seem to both be set to the from-version #49

Closed simpliston closed 1 month ago

simpliston commented 1 month ago

In the example shown in the image below, Firefox Developer Edition actually upgraded from a 126-version to a 127-version. I'll supply logs if needed, but it seems like a simple switch-around

image

Version: 0.9.6

dhruv8sh commented 1 month ago

Not reproducable for me. Are you using pamac? Also logs would be really helpful, thank you.

simpliston commented 1 month ago

I'm using yay. Forgive my ignorance, but how do I collect the logs?

dhruv8sh commented 1 month ago

From config, go to debug category. Enable command and model logs. Run plasmashell --replace. This will restart you shell. Then paste the logs after you search for new updates.

simpliston commented 1 month ago

Apologies for the delay, here are the logs. If I run checkupdates by itself, it does output the correct from and to-versions. yay -Qum --color never does not seem to output anything, might be since there are no AUR updates at the moment. Does it ping Google in order to check for an internet connection?

qml: running command:ping -c 1 google.com > /dev/null
qml: running command:checkupdates --nocolor | awk '{print $1}' | pacinfo
qml: running command:yay -Qum --color never | sort 
qml: running command:yay -Qum --color never | sort  | awk '{print $1}' | pacinfo
qml: running command:flatpak remote-ls --updates | awk '{print $2}' | while read -r appref; do flatpak info "$appref"; echo "--------------"; done
file:///home/simpliston/.local/share/plasma/plasmoids/org.kde.archupdatechecker/contents/ui/Full.qml:36:13: QML PlasmoidHeading: Binding loop detected for property "leftInset"
dhruv8sh commented 1 month ago

Yes, the ping is to check for an internet connection. This will later be used to fetch updates locally, if no internet available. Can you also paste the output of pacinfo firefox-developer-edition. I think you've mistaken the versions. The latest update available for this package in the AUR is 126.xx...

simpliston commented 1 month ago

Here is the output. Firefox is installed from the extra-repository, not from the AUR. I can turn off AUR in the applet settings and still have the same issue. I believe that something happens between receiving the output from checkupdates and displaying it in the applet. It might be parsing or some logic after that. I can also paste the output from checkupdates if you want:

pacinfo firefox-developer-edition
Name:           firefox-developer-edition
Base:           firefox-developer-edition
Repository:     local
Version:        127.0b1-1
Description:    Developer Edition of the popular Firefox web browser
Architecture:   x86_64
URL:            https://www.mozilla.org/firefox/developer
Licenses:       MPL-2.0
Requires:       dbus
Requires:       ffmpeg
Requires:       gtk3
Requires:       libpulse
Requires:       libxss
Requires:       libxt
Requires:       mime-types
Requires:       nss
Requires:       ttf-font
Optional Deps:  hunspell-en_US: Spell checking, American English
Optional Deps:  libnotify: Notification integration
Optional Deps:  networkmanager: Location detection via available WiFi networks
Optional Deps:  pulseaudio: Audio support
Optional Deps:  speech-dispatcher: Text-to-Speech
Optional Deps:  xdg-desktop-portal: Screensharing with Wayland
Package Size:   0.00 B
Download Size:  0.00 B
Installed Size: 243.53 M
Packager:       Andrew Crerar <crerar@archlinux.org>
Build Date:     2024-05-14 15:23:31
Install Date:   2024-05-14 23:10:51
Install Script: No
Install Reason: Explicit
Validated By:   Signature

Name:           firefox-developer-edition
Base:           firefox-developer-edition
Repository:     extra
File:           firefox-developer-edition-127.0b1-1-x86_64.pkg.tar.zst
Version:        127.0b1-1
Description:    Developer Edition of the popular Firefox web browser
Architecture:   x86_64
URL:            https://www.mozilla.org/firefox/developer
Licenses:       MPL-2.0
Requires:       dbus
Requires:       ffmpeg
Requires:       gtk3
Requires:       libpulse
Requires:       libxss
Requires:       libxt
Requires:       mime-types
Requires:       nss
Requires:       ttf-font
Optional Deps:  hunspell-en_US: Spell checking, American English
Optional Deps:  libnotify: Notification integration
Optional Deps:  networkmanager: Location detection via available WiFi networks
Optional Deps:  pulseaudio: Audio support
Optional Deps:  speech-dispatcher: Text-to-Speech
Optional Deps:  xdg-desktop-portal: Screensharing with Wayland
Package Size:   69.87 M
Download Size:  0.00 B
Installed Size: 243.53 M
Packager:       Andrew Crerar <crerar@archlinux.org>
Build Date:     2024-05-14 15:23:31
SHA-256 Sum:    49dc4118bb709acb21796b2ab4ae0f427ea201dfeb8403efc25ce7365449c4ca
simpliston commented 1 month ago

Related: Now, when unrar from the extra repository has an update, checkupdates shows this:

checkupdates
unrar 1:7.0.8-1 -> 1:7.0.9-1

while the applet shows:

image

It seems like it still uses from in both fields, but on from it drops whatever is behind and including :

Kingproone commented 1 month ago

AUR seems to be unaffected Screenshot_20240515_133607

Kingproone commented 1 month ago

As mentioned above, the issue is probably : when present (not counting the aur) Screenshot_20240515_140807

simpliston commented 1 month ago

I do not have permission to open a PR, but I have a fix for the from-field missing part of the version number:

on line 164 in Util.js, change

const info = line.split(":");

to (note the extra space)

const info = line.split(": ");

This will make it split only on the label for the line, and not on the value which in this case is the version number. This could also be applied on line 169 and 170, though I'm not sure they are suffering from the same problem since indexOf stops after the first occurence of the substring

simpliston commented 1 month ago

Regarding the wrong to-version, I believe this comes from pacinfo showing the same version for both local and repo. I suggest getting the version-values from checkupdates instead, since these seem to be accurate

dhruv8sh commented 1 month ago

This was fixed in the latest release. Thanks for using the applet. Apart from this fix, there were multiple fixes and additions like download size fetching and sorting, and correctly showing flatpak runtime updates. Feel free to contribute to any more issues you find.

dhruv8sh commented 1 month ago

The issue was indeed with pacinfo misreporting the local version number. I do not know if it was supposed to. I assumed it to do so.