[pacman-dev] sudo-less pacman -Sy --dbpath
In regards to this https://bbs.archlinux.org/viewtopic.php?id=89484
One issue with pacman is that its one of the few package managers that can't
check if you have updates based on a pacman mirror (defined by the
mirrorlist file) without altering the current pacman database and not
requiring root permissions. Even with using sudo, its only possible to do
the above with
pacman -Sy --dbpath /tmp/somedir/
pacman -Qu --dbpath /tmp/somedir/
with pacman -Sy requiring sudo. The premise for such a change is basically
pacman update checker scripts/widgets etc etc. I am not aware of how a lot
of the pacman widgets check if the system is udpated, however a lot of them
use pacman -Qu which only checks if you need updates with the local database
(not with the mirrors which you have designated in the mirrorlist file).
This is an issue with scripts that run on systems that use
dwm/awesome/xmonad/conky etc etc because such widgets only work if the user
did a pacman -Syu just before the widget checks for updates (or even worse a
pacman -Sy, which if done periodically using crond or some other script can
lead to breaks in the system)
The patch provided allows you to use pacman -Sy --dbpath without having to
use root (you still require root for a pacman -Syu --dbpath or a pacman -Sy
--dbpath <somepath>
participants (1)
-
Mathew de Detrich