pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/pkgtools/pkg_tarup Gross hack to prevent quoting error...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/d1764883dd37
branches:  trunk
changeset: 479254:d1764883dd37
user:      cube <cube%pkgsrc.org@localhost>
date:      Mon Aug 09 21:13:37 2004 +0000

description:
Gross hack to prevent quoting errors when root's shell is the unfamous csh.

Should hopefully fix PR 26551, but if anyone has a better solution, or is
willing to do the necessary work to allow pkg_tarup to be run by any user,
ideas are welcomed.

Say hi to version 1.6.2.

diffstat:

 pkgtools/pkg_tarup/Makefile        |  7 ++++---
 pkgtools/pkg_tarup/files/pkg_tarup |  7 +++++--
 2 files changed, 9 insertions(+), 5 deletions(-)

diffs (49 lines):

diff -r c1975172b8a3 -r d1764883dd37 pkgtools/pkg_tarup/Makefile
--- a/pkgtools/pkg_tarup/Makefile       Mon Aug 09 20:40:56 2004 +0000
+++ b/pkgtools/pkg_tarup/Makefile       Mon Aug 09 21:13:37 2004 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.21 2004/07/19 17:38:36 erh Exp $
+# $NetBSD: Makefile,v 1.22 2004/08/09 21:13:37 cube Exp $
 
-DISTNAME=      pkg_tarup-1.6.1
+DISTNAME=      pkg_tarup-1.6.2
 CATEGORIES=    pkgtools
 MASTER_SITES=  # empty
 DISTFILES=     # empty
@@ -26,7 +26,8 @@
                PKG_TOOLS_BIN=${PKG_TOOLS_BIN:Q}        \
                SED=${SED:Q}                    \
                SH=${SH:Q}                              \
-               SU=${SU:Q}
+               SU=${SU:Q}                              \
+               XARGS=${XARGS:Q}
 
 SCRIPT_SUBST_SED=      ${SCRIPT_SUBST:S/=/@!/:S/$/!g/:S/^/ -e s!@/}
 
diff -r c1975172b8a3 -r d1764883dd37 pkgtools/pkg_tarup/files/pkg_tarup
--- a/pkgtools/pkg_tarup/files/pkg_tarup        Mon Aug 09 20:40:56 2004 +0000
+++ b/pkgtools/pkg_tarup/files/pkg_tarup        Mon Aug 09 21:13:37 2004 +0000
@@ -1,6 +1,6 @@
 #! @SH@
 #
-# $Id: pkg_tarup,v 1.14 2004/07/19 17:38:36 erh Exp $
+# $Id: pkg_tarup,v 1.15 2004/08/09 21:13:37 cube Exp $
 #
 # Tar up installed package
 #
@@ -22,11 +22,14 @@
 SED=${SED:-@SED@}
 SU=${SU:-@SU@}
 GREP=${GREP:-@GREP@}
+XARGS=${XARGS:-@XARGS@}
 
 if [ `${ID} -u` != 0 ]; then
        ${ECHO} "Becoming root@`/bin/hostname` to create a binary package"
        ${ECHO} -n "`${ECHO} ${SU} | ${SED} -e's/[[:space:]].*//'` ";\
-       exec ${SU} root -c "$0 \"\$@\"" "$0" "$@"
+       ( for arg in "$@"; do echo \"${arg}\"; done ) |
+       ${SU} root -c "exec ${XARGS} \"$0\""
+       exit $?
 fi
 
 PKG_DBDIR=${PKG_DBDIR:-@PKG_DBDIR@}



Home | Main Index | Thread Index | Old Index