[pacman-dev] makepkg -w argument removed?

James Rosten seinfeld90 at gmail.com
Mon Jan 22 18:51:04 EST 2007


> I was thinking about this, and there's a little problem.  PKGDEST and
> SRCDEST can be set by makepkg.conf and ~/.makepkg.conf, overriding the
> envvar, which, I'd assume, should take precedence.
> 
> The shortest solution is to rename either the makepkg.conf variable or
> the makepkg one...
> Basically, I foresee it working like so, in order of precedence:
> 
> 1) environment settings
> or
> 2) ~/.makepkg.conf settings
> or
> 3) /etc/makepkg.conf settings

In that case we preserve the environment's PKGDEST and SRCDEST in
underscored versions, _PKGDEST and _SRCDEST.  Then source the makepkg.conf and
if the underscored versions are empty then we just fill PKGDEST and SRCDEST
with makepkg.conf's ones using the :- spiel.

Patch is below.

~ Jamie / yankees26

Signed-off-by: James Rosten <seinfeld90 at gmail.com>
--- pacman-lib.orig/scripts/makepkg 2007-01-22 16:44:05.000000000 -0500
+++ pacman-lib/scripts/makepkg  2007-01-22 18:47:38.000000000 -0500
@@ -27,7 +27,6 @@
 
 myver='3.0.0'
 startdir=$(pwd)
-PKGDEST=$startdir
 
 BUILDSCRIPT="PKGBUILD"
 PKGEXT="pkg.tar.gz"
@@ -314,6 +313,8 @@ usage() {
 
 ARGLIST=$@
 
+_PKGDEST=$PKGDEST
+_SRCDEST=$SRCDEST
 #Source makepkg.conf; fail if it is not found
 if [ -f /etc/makepkg.conf ]; then
    source /etc/makepkg.conf
@@ -327,6 +328,9 @@ if [ -f ~/.makepkg.conf ]; then
    source ~/.makepkg.conf
 fi
 
+PKGDEST=${_PKGDEST:-$PKGDEST}
+SRCDEST=${_SRCDEST:-$SRCDEST}
+
 while [ "$#" -ne "0" ]; do
    case $1 in
        # pacman





More information about the pacman-dev mailing list