excalibur1234 / pacui

Bash script providing advanced Pacman and Yay/Pikaur/Aurman/Pakku/Trizen/Pacaur/Pamac-cli functionality in a simple UI
GNU General Public License v3.0
168 stars 13 forks source link

Add Snap and Flatpak update for func_m and func_u #51

Closed puxplaying closed 4 years ago

puxplaying commented 4 years ago

Hi what do you think about to add Flatpak and Snap support to PacUI? Here is my first try to add support to func_m and func_u

Ps: The list functions of both Flatpak and Snap are currently not used but i thought it could may be added as a extra option in the TUI to list those installed packages.

Please let me know what you think about. Best Regards

excalibur1234 commented 4 years ago

sorry for the delay, but i had problems with my github account.

i take a look at this PR soon - i hope before the weekend. please have a little more patience.

excalibur1234 commented 4 years ago

i am unsure how to integrate snap and flatpak support in pacui.

i just installed snapd and flatpak:

because i use neither snap nor flatpak, i think that i am the wrong person to integrate support for these package management systems into pacui.

excalibur1234 commented 4 years ago

if there was another CLI applikation, which can update and cleanup snap and flatpak packages, i am happy to integrate support for it in pacui. if this application is found on the user's system, it could be called from within pacui. i could list it as an optional dependency of pacui.

excalibur1234 commented 4 years ago

when i want to integrate support for updating of snap/flatpak packages only, is it enough to use the following commands?

that should be rather simple to include.

puxplaying commented 4 years ago

when i want to integrate support for updating of snap/flatpak packages only, is it enough to use the following commands?

* when `snapd` is installed:
  `sudo snap refresh`

* when `flatpak` is installed:
  `flatpak update -y`

that should be rather simple to include.

In general that should be enough to update both. However Flatpak has not the same ability as snap to clean up itself and therefore i would also suggest to run flatpak uninstall --unused --delete-data -y after the flatpak update at least in the maintain function of pacui.

excalibur1234 commented 4 years ago

alright. i think i will implement it in the 'maintain' option.

and does flatpak need root privileges (i.e. sudo) or not?

puxplaying commented 4 years ago

Flatpak does not require root privileges. Thank you!

excalibur1234 commented 4 years ago

i have just pushed this commit, which should include snap and flatpak updates: https://github.com/excalibur1234/pacui/commit/165b4040a1b2d411f2890eb5657d3989cab0806a

can you check it and report back, whether it works as you expect it?

puxplaying commented 4 years ago

This looks very good. One question, did you not want to include the update functionality for both in func_m too? Would be nice for people like me who prefer to run the maintain option only.