mudler / luet

:package: :whale: 0-dependency Container-based Package Manager using SAT solver and QLearning
https://luet.io
GNU General Public License v3.0
261 stars 24 forks source link

Feature: luet reinstall --installed #273

Closed LinuxUserGD closed 2 years ago

LinuxUserGD commented 2 years ago

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/

mudler commented 2 years ago

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
mudler commented 2 years ago

Will be available in the next release :blush: