[pacman-dev] [patch] Cleanup makepkg.conf options and loading of makepkg.conf.
Moved the following vars in /etc/makepkg.conf
* BUILDSCRIPT
* PKGEXT
* DB_COMPRESSION
* DB_CHECKSUMS
Cleaned up sourcing of /etc/makepkg.conf in scripts and source
~/.makepkg.conf if it exists.
Signed-off-by: Andrew Fyfe
From f8dde814bd2137659dfca730d2c5a53dc612acd9 Mon Sep 17 00:00:00 2001 From: Andrew Fyfe
Date: Thu, 29 Mar 2007 12:41:47 +0100 Subject: [PATCH 2/2] Cleanup makepkg.conf options and loading of makepkg.conf.
Moved the following vars in /etc/makepkg.conf
* BUILDSCRIPT
* PKGEXT
* DB_COMPRESSION
* DB_CHECKSUMS
Cleaned up sourcing of /etc/makepkg.conf in scripts and source
~/.makepkg.conf if it exists.
Signed-off-by: Andrew Fyfe
On 3/29/07, Andrew Fyfe
Moved the following vars in /etc/makepkg.conf * BUILDSCRIPT * PKGEXT * DB_COMPRESSION * DB_CHECKSUMS
Cleaned up sourcing of /etc/makepkg.conf in scripts and source ~/.makepkg.conf if it exists.
Signed-off-by: Andrew Fyfe
-#Source makepkg.conf; fail if it is not found -if [ -f /etc/makepkg.conf ]; then +# Source makepkg.conf; fail if it is not found +if [ -r /etc/makepkg.conf ]; then source /etc/makepkg.conf else error "/etc/makepkg.conf not found. cannot continue" - exit 1 + exit 1 # $E_CONFIG_ERROR # TODO: error codes fi
-#Source user-specific makepkg.conf overrides -if [ -f ~/.makepkg.conf ]; then - source ~/.makepkg.conf -fi +# Source user-specific makepkg.conf overrides +[ -r ~/.makepkg.conf ] && source ~/.makepkg.conf
Quick comments on this. First, great catch on switching from -f to -r. We should do this in all our scripts if necessary, just to catch stupid mistakes. I did have to look up what -r did but now it makes perfect sense (file exists and read permission is granted). Although that one line source of ~/.makepkg.conf is nice, I personally prefer the longer more drawn out way- it is immediately clear what is happening, the second one uses bash semantics a bit too much for my taste. It also doesn't allow for easy addition of an else clause should that ever arise. Basically I'm saying keep it the way it was (besides the -r). -Dan
Moved the following variables into /etc/makepkg.conf
* BUILDSCRIPT
* PKGEXT
* DB_COMPRESSION
* DB_CHECKSUMS
Cleaned up sourcing of /etc/makepkg.conf in scripts and source
~/.makepkg.conf if it exists.
Signed-off-by: Andrew Fyfe
On 4/1/07, Andrew Fyfe
Moved the following variables into /etc/makepkg.conf * BUILDSCRIPT * PKGEXT * DB_COMPRESSION * DB_CHECKSUMS
Cleaned up sourcing of /etc/makepkg.conf in scripts and source ~/.makepkg.conf if it exists.
Signed-off-by: Andrew Fyfe
Applied but slightly amended to move makepkg.conf checks after usage instructions (so repo-add --help will work regardless of the existence of makepkg.conf). -Dan
participants (2)
-
Andrew Fyfe
-
Dan McGee