greshake / i3status-rust

Very resourcefriendly and feature-rich replacement for i3status, written in pure Rust
GNU General Public License v3.0
2.85k stars 470 forks source link

Added pacman_command config option #1893

Closed I60R closed 1 year ago

I60R commented 1 year ago

Allows to avoid using fakeroot if AUR helper is available

bim9262 commented 1 year ago

@I60R, I tried your PR, but it seems that that the suggested yay command gives the following error:

# yay -Qu --dbpath=/var/lib/pacman/sync
 -> unable to CreateHandle: could not create database

FWIW pacman/yay both work when --dbpath is omitted.

Is there some setup step that I'm missing?

BTW the failure is silent (it just looks like there's no updates, not an error running the pacman_command, which has an error code = 1)

I60R commented 1 year ago

Can you reproduce this error with paru (a newer AUR helper a replacement for yay)?

bim9262 commented 1 year ago

Can you reproduce this error with paru (a newer AUR helper a replacement for yay)?

I had the same error with paru, but I think that was actually because of the svn to git transition altering the dbs. Now with both paru/yay I see the following:

$ paru -Qu --dbpath=/var/lib/pacman/sync; echo $?
1
$  paru -Qu
jupyter-nbclient 0.7.4-2 -> 0.8.0-1
jupyter-server-fileid 0.8.0-2 -> 0.9.0-1
libheif 1.16.1-2 -> 1.16.2-1
typos 1.14.10-1 -> 1.14.11-1
wlroots-hidpi-xprop-git 0.17.0.20230522.165315-1 -> latest-commit
yay 12.0.4-1 -> 12.0.5-1

I think we might also want to suggest -n be used so that packages from AUR are excluded.

$ paru -Qun
jupyter-nbclient 0.7.4-2 -> 0.8.0-1
jupyter-server-fileid 0.8.0-2 -> 0.9.0-1
libheif 1.16.1-2 -> 1.16.2-1
typos 1.14.10-1 -> 1.14.11-1
I60R commented 1 year ago

@bim9262 It seems that on my machine packages from AUR already were excluded without -n option. Must downgrade some packages from either AUR and pacman and check again

I60R commented 1 year ago

I figured it out: an appropriate aur_command would be paru -Qum and appropriate pacman_command would be paru -Qun

bim9262 commented 1 year ago

Another option for an appropriate aur_command would be paru -Qua (I don't think it matters which is used, this is what's already suggested in the docs)

bim9262 commented 1 year ago

I'm not so sure that running this without the fakeroot is actually really all that desirable, unless there's something else updating /var/lib/pacman/sync on ones system.

bim9262 commented 1 year ago

@I60R should we close out this PR or are you still working on an alternate approach?