mudler/luet

Feature: luet reinstall --installed

LinuxUserGD opened this issue · 2 comments

Is your feature request related to a problem? Please describe.

luet search --installed lists all installed packages.
luet upgrade upgrades all packages.
If the system breaks, it's currently only possible to reinstall packages individually, e. g. luet install [package-list].

Describe the solution you'd like

luet reinstall --installed for reinstalling installed package list (like @system and @world when using portage)

Describe alternatives you've considered

Using a bash alias:

alias luet_reinstall_system="luet reinstall $(luet search --installed | grep '^>' | sed 's|\(.*\)-.*|\1|' | sed 's/^.//' | sed ':a;N;$!ba;s/\n//g')"
luet_reinstall_system

Additional context

https://luet-lab.github.io/docs/docs/concepts/overview/managing_packages/
https://www.mocaccino.org/docs/desktop/usage/

Nice, makes totally sense!

For the alias: you can also output search results as json with -o json, so you can replace grep/sed with jq:

luet search --installed -o json | jq '.packages | map(.category+"/"+.name) | .[]' -rc

Will be available in the next release 😊