dhruv8sh / arch-update-checker

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

Add toggle for --hold in konsole #6

Closed JackLeEmmerdeur closed 4 months ago

JackLeEmmerdeur commented 4 months ago

There was a single package shown in the update-list.

  1. Clicked install on that package in the update list
  2. Install process opens in a Konsole window
  3. Hangs on the last step e.g. (4/4) Updating the desktop file MIME type cache...
  4. Process in konsole can't be closed with CTRL+C only the whole window with ALT+F4
  5. The applet still shows available updates

A regular yay or paru in an external Konsole window runs without problems. Also the "Update your system" in the applet runs successfully and closes the Konsole window.

dhruv8sh commented 4 months ago

Your package probably finished installing. For testing purposes I enabled the --hold flag for konsole so it does not exit right after installing. Some people might want this so I will add a toggle for this in the next release.

Although, if you really really want to fix this right now, Do nano ~/.local/share/plasma/plasmoids/org.kde.archupdatecheker/contents/ui and simply remove --hold from the strings in the function installOnly. Save and exit Run systemctl --user restart plasma-plasmashell

JackLeEmmerdeur commented 4 months ago

Ok understood. Thank you.

Do nano ~/.local/share/plasma/plasmoids/org.kde.archupdatecheker/contents/ui and simply remove --hold from the strings in the function installOnly.

You got a typo in archupdatecheker and ui is a dir. You meant PackageManager.qml, right?

dhruv8sh commented 4 months ago

Yes, my bad. I am using my phone to type this. Did not review what I wrote.

JackLeEmmerdeur commented 4 months ago

All good. Just wanted to point at possible confusion that could come up from others watching this thread. What was irritating about the --hold option was it definitely prevented the installation of the package as if the process was stopped at the very last moment.

I think I'll keep the --hold option to prevent myself from updating singular packages as I usually don't want to do partial upgrades.

dhruv8sh commented 4 months ago

Good point. I will definitely hide the installation of single packages from AUR/Pacman behind an 'Use at your own risk' flag. PS : It did not stop the installation of that package, only the konsole window was not closed due to this flag.

JackLeEmmerdeur commented 4 months ago

Good point. I will definitely hide the installation of single packages from AUR/Pacman behind an 'Use at your own risk' flag.

Yes do it. Or feel sorry later when lot of people with broken systems will congregate here in the issues.

But I still can report that the konsole window doesn't reach the point where the package is really installed. When the install process holds I checked the output of pacman -Syu and the package was still in the list. Also your applet still shows it. I can only quit the konsole window via ALT+F4. And then the package definitely isn't updated. So you shouldn't have to fear broken systems currently when you keep the "--hold" flags in the code.

dhruv8sh commented 4 months ago

It definitely does install the package for me. Can you re-test and confirm?

--hold command makes it so that Ctrl+C cannot exit after the installation, because there is no process running to interrupt. It will work when the package is being installed.

image Ctrl+C when the process is running.

The flag for this has been added anyways and should be pushed within an hour alongside some minor bug-fixes.

JackLeEmmerdeur commented 4 months ago

Thanks for the clarification about the process handling.

Can you re-test and confirm?

It was definitely like that at the time of my last post. I tested it a few times.

Anyways I tested the new version and the the installation of individual packages now works.

Nice UX regarding the alert (and the subsequent greying out of the install button). The alert-message is very non-ambiguous. Nobody can say they haven't been warned.

Kudos to your work and TYVM. This applet is minimalistic and stylish and seems to work really good now. Exactly what beginners need as discover's update notifier seems to be buggy.