Bug#228926: /var/lib/dpkg/info/tetex-bin.postinst: line 209: 5576: Permission denied
On Thu, Jan 22, 2004 at 08:54:36AM +0100, Hilmar Preusse wrote:
> On 21.01.04 Matt Zimmerman (mdz@debian.org) wrote:
>
> Hi,
>
> > Package: tetex-bin
> > Version: 2.0.2-6
> >
> > /var/lib/dpkg/info/tetex-bin.postinst: line 209: 5576: Permission denied
> >
> > Line 209 is:
> >
> > french\[=patois\]) sed -e "s/%! french/french/" $LDAT | sed -e "s/%! =patois/=patois/" > $LDAT_$$; mv $LDAT_$$ $LDAT ;;
> >
> > and 5576 is presumably the PID. /bin/sh is bash.
> >
> Could you try:
>
> bash -x /var/lib/dpkg/info/tetex-bin.postinst configure
>
> to see, what exactly happens and where he fails. The Output should go
> to stderr.
What happens is this:
+ mv -f 28668 /var/lib/texmf/language.dat
+ db_get tetex-bin/hyphen
+ echo 'GET tetex-bin/hyphen'
+ local 'IFS=
'
+ local _LINE
+ read -r _LINE
+ RET=french[=patois], ngerman[=naustrian-neue_Rechtschreibung]
+ return 0
+ IFS= ,
+ lang=french[=patois], ngerman[=naustrian-neue_Rechtschreibung]
+ sed -e 's/%! french/french/' /var/lib/texmf/language.dat
+ sed -e 's/%! =patois/=patois/'
+ mv -f 28668 /var/lib/texmf/language.dat
+ sed -e 's/%! ngerman/ngerman/' /var/lib/texmf/language.dat
+ sed -e 's/%! =naustrian/=naustrian/'
+ mv 28668 /var/lib/texmf/language.dat
I think the problem is with the expression "$LDAT_$$". I think what you
wanted was to concatenate $LDAT, "_" and $$, but this expression is expanded
as "$LDAT_" (which is empty) concatenated with "$$" (expanded to the PID).
This would create a file in the cwd, which is probably what caused te
problem.
I suggest using tempfile or mktemp from debianutils (which is essential).
--
- mdz
Reply to: