[pacman-dev] pacman-optimize updates
pacman-optimize updates. Bug #5009 is out there, I'll think about it and try to make a patch hopefully without screwing up my own database. -Dan Index: pacman-optimize =================================================================== RCS file: /home/cvs-pacman/pacman-lib/scripts/pacman-optimize,v retrieving revision 1.3 diff -u -r1.3 pacman-optimize --- pacman-optimize 21 Dec 2006 01:53:41 -0000 1.3 +++ pacman-optimize 22 Dec 2006 19:37:41 -0000 @@ -20,7 +20,7 @@ # USA. # -myver='2.9.8' +myver='3.0.0' usage() { echo "pacman-optimize $myver" @@ -59,10 +59,6 @@ dbroot=$1 fi -if [ "`id -u`" != 0 ]; then - die "You must be root to optimize the database" -fi - # make sure pacman isn't running if [ -f /tmp/pacman.lck ]; then die "Pacman lockfile was found. Cannot run while pacman is running." @@ -72,6 +68,11 @@ die "$dbroot does not exist or is not a directory" fi +#if [ "$EUID" != 0 ]; then +if [ ! -w "$dbroot" ]; then + die "You must have correct permissions to optimize the database" +fi + # don't let pacman run while we do this touch /tmp/pacman.lck
On 12/22/06, Dan McGee <dpmcgee@gmail.com> wrote:
pacman-optimize updates. Bug #5009 is out there, I'll think about it and try to make a patch hopefully without screwing up my own database.
Bump. Did you see this patch, Aaron? Nothing groundbreaking, just a small reordering and checking for write permissions instead of insisting the user be root (in case someone has set up a non-root user with permissions on the DB). -Dan
On 12/28/06, Dan McGee <dpmcgee@gmail.com> wrote:
Bump. Did you see this patch, Aaron? Nothing groundbreaking, just a small reordering and checking for write permissions instead of insisting the user be root (in case someone has set up a non-root user with permissions on the DB).
Thanks, committed. I was away for the weekend (silly holidays) so have a backlog of some stuff.
participants (2)
-
Aaron Griffin
-
Dan McGee