pkgsrc-Bugs archive

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

Re: pkg/45181 (the new patch uses mktemp with the -p option, which is not portable.)



The following reply was made to PR pkg/45181; it has been noted by GNATS.

From: Louis Guillaume <louis%zabrico.com@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: Tim Zingelman <tez%NetBSD.org@localhost>, gnats-admin%NetBSD.org@localhost,
        pkgsrc-bugs%NetBSD.org@localhost
Subject: Re: pkg/45181 (the new patch uses mktemp with the -p option, which
 is not portable.)
Date: Wed, 27 Jul 2011 11:48:40 -0400

 On 7/27/11 11:30 AM, Tim Zingelman wrote:
 > The following reply was made to PR pkg/45181; it has been noted by GNATS.
 >
 > From: Tim Zingelman<tez%netbsd.org@localhost>
 > To: gnats-bugs%netbsd.org@localhost
 > Cc:
 > Subject: Re: pkg/45181 (the new patch uses mktemp with the -p option, which 
 > is
 >   not portable.)
 > Date: Wed, 27 Jul 2011 10:29:56 -0500
 >
 >   I am looking at this now.
 >
 >   The -p option is not linux only.  It exists on Solaris 10, as well as
 >   any platform if you happen to have  pkgsrc/sysutils/coreutils
 >   installed.
 >
 >   Also, the patch you supplied does not work on Solaris at least... it
 >   results in errors like:
 >
 >   pdfroff: $(TMPDIR=/tmp mktemp -d -t
 >   groff-pdfroff.XXXXXXXXXX)/pdf27836.in: cannot create
 >
 
 
 Why isn't the shell resolving the command inside the $() ?? That's just 
 strange. Is Solaris' sh really that out-of-date?
 
 I guess we can fall back on using the "`" syntax instead. But that's 
 annoying.
 
 Try the patch below instead...
 
 Louis
 
 --- textproc/groff/patches/patch-contrib_pdfmark_pdfroff.sh     21 Jul 
 2011 04:24:07 -0000      1.1.2.2
 +++ textproc/groff/patches/patch-contrib_pdfmark_pdfroff.sh     27 Jul 
 2011 15:44:52 -0000
 @@ -18,7 +18,7 @@
    #
   -  WRKFILE=${GROFF_TMPDIR=${TMPDIR-${TMP-${TEMP-"."}}}}/pdf$$.tmp
   +  MYTMPDIR=${GROFF_TMPDIR-${TMPDIR-${TMP-${TEMP-"/tmp"}}}}
 -+  WRKDIR="`unset TMPDIR && mktemp -dp "$MYTMPDIR" 
 groff-pdfroff.XXXXXXXXXX`" || exit
 ++  WRKDIR="`TMPDIR=$MYTMPDIR mktemp -d -t groff-pdfroff.XXXX`" || exit
   +
   +  trap 'rm -rf -- "$WRKDIR"' EXIT
   +  trap 'trap - EXIT; rm -rf -- "$WRKDIR"; exit 1' HUP INT QUIT PIPE TERM
 


Home | Main Index | Thread Index | Old Index