[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] fix bashdb script handling of tmp directory
From: |
Eric Blake |
Subject: |
Re: [PATCH] fix bashdb script handling of tmp directory |
Date: |
Thu, 22 Sep 2005 18:10:27 -0600 |
User-agent: |
Mozilla Thunderbird 1.0.2 (Windows/20050317) |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
[forwarding to bashdb-devel]
According to devin@freeshell.org on 9/21/2005 11:53 AM:
> Configuration Information [Automatically generated, do not change]:
> Machine: i386
> OS: linux-gnu
> Compiler: gcc
> Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i386'
> -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i386-pc-linux-gnu'
> -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL
> -DHAVE_CONFIG_H -I. -I../bash -I../bash/include -I../bash/lib -g -O2
> uname output: Linux dungeon2 2.6.11-1-k7-smp #1 SMP Mon Jun 20 22:34:51 MDT
> 2005 i686 GNU/Linux
> Machine Type: i386-pc-linux-gnu
>
> Bash Version: 3.0
> Patch Level: 16
> Release Status: release
>
> Description:
> Using bashdb on scripts with directory components in their names
> failes because it tried to create a temporary file in tmp
> without stripping the directories and it failes becuase the
> directories do not exist.
>
> Fix:
> Included is a patch that strips the directory names from
> $_guineapig before creating a temporary file.
>
> For good measure it also strips the dirs before outputing the
> lines in the file. It just makes it look better.
This patch is to bashdb, not bash. Meanwhile, I just noticed that 'bashdb
- --help' and 'bashdb --version' are not accepted, and that neither 'bashdb
- -h' nor 'bashdb -V' output a bug-report address.
>
> --- old-bashdb 2005-09-21 10:26:32.000000000 -0700
> +++ bashdb 2005-09-21 10:48:12.000000000 -0700
> @@ -509,11 +509,11 @@
> fi
>
> if (( $line < 100 )); then
> - _msg "$_guineapig:$line $bp $cl${_lines[$line]}"
> + _msg "${_guineapig/*\//}:$line $bp $cl${_lines[$line]}"
> elif (( $line < 10 )); then
> - _msg "$_guineapig:$line $bp $cl${_lines[$line]}"
> + _msg "${_guineapig/*\//}:$line $bp $cl${_lines[$line]}"
> elif (( $line > 0 )); then
> - _msg "$_guineapig:$line $bp $cl${_lines[$line]}"
> + _msg "${_guineapig/*\//}:$line $bp $cl${_lines[$line]}"
> fi
> }
>
> @@ -564,7 +564,7 @@
> let _i=1
>
> # Be careful about quoted newlines
> -_potbelliedpig=${TMPDIR-/tmp}/$_guineapig.$$
> +_potbelliedpig=${TMPDIR-/tmp}/${_guineapig/*\//}.$$
> sed 's,\\$,\\\\,' $_guineapig > $_potbelliedpig
>
> Thanks,
> Devin Bayer
>
>
>
> _______________________________________________
> Bug-bash mailing list
> Bug-bash@gnu.org
> http://lists.gnu.org/mailman/listinfo/bug-bash
>
- --
Life is short - so eat dessert first!
Eric Blake ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFDM0fy84KuGfSFAYARAthcAJ4kdxLnzgpveXaU1UJLsGpml+Tj4wCgpm4E
cRszTqsUUBzY5Q0FcstJ0SY=
=qIEM
-----END PGP SIGNATURE-----