joehillen / paruz

A fzf terminal UI for paru or pacman
The Unlicense
82 stars 3 forks source link

Should there be "-Syy"? #1

Closed Ved-un closed 3 years ago

Ved-un commented 3 years ago

paruz

"Don't use the last one, it does a partial upgrade whenever you "reload" (press Ctrl+R) " https://bbs.archlinux.org/viewtopic.php?pid=1990662#p1990662

code https://github.com/joehillen/paruz/blob/1f7c3042541303857e9abd711c771fd30ce00d83/paruz#L58-L61

joehillen commented 3 years ago

-Syy doesn't upgrade. -Su upgrades.

RTFM

$ man pacman
...
         -y, --refresh
             Download a fresh copy of the master package database from the
             server(s) defined in pacman.conf(5). This should typically be used
             each time you use --sysupgrade or -u. Passing two --refresh or -y
             flags will force a refresh of all package databases, even if they
             appear to be up-to-date.

Now it's debatable whether an update of the package database (-y) or a full refresh of the database (-yy) is the correct choice. I opted for -yy because it's unlikely for me to use that binding unless I really need to. I'd rather have it do that than have to leave paruz and run paru -Syy.

Actually, I should just have different bindings for each. I'll add that.

joehillen commented 3 years ago

Actually, based on this post I should just switch it to -Sy.

joehillen commented 3 years ago

I've removed the Ctrl-r entirely. It turns out it's dangerous, and it was kind of pointless to begin with. https://wiki.archlinux.org/title/System_maintenance#Partial_upgrades_are_unsupported