* [Patch] trap: exit: invalid signal specification
@ 2006-06-24 1:10 S.Çağlar Onur
2006-06-24 2:50 ` Junio C Hamano
0 siblings, 1 reply; 5+ messages in thread
From: S.Çağlar Onur @ 2006-06-24 1:10 UTC (permalink / raw)
To: Git Mailing List
[-- Attachment #1: Type: text/plain, Size: 1022 bytes --]
Hi;
This tiny patch is needed to solve
caglar@zangetsu ~ $ git-clone
/usr/bin/git-clone: line 121: trap: exit: invalid signal specification
error under tr_TR.UTF-8 (and other Turkic locales). For these locales
upper(i) != I .
P.S: If needed please CC me, i'm not subscribed to list
Signed-off-by: S.Çağlar Onur <caglar@pardus.org.tr>
---
diff -ur git-1.4.0.orig/git-clone.sh git-1.4.0/git-clone.sh
--- git-1.4.0.orig/git-clone.sh 2006-06-10 22:41:54.000000000 +0300
+++ git-1.4.0/git-clone.sh 2006-06-24 03:54:49.000000000 +0300
@@ -205,7 +205,7 @@
[ -e "$dir" ] && echo "$dir already exists." && usage
mkdir -p "$dir" &&
D=$(cd "$dir" && pwd) &&
-trap 'err=$?; cd ..; rm -r "$D"; exit $err' 0
+trap 'err=$?; cd ..; rm -r "$D"; EXIT $err' 0
case "$bare" in
yes)
GIT_DIR="$D" ;;
--
S.Çağlar Onur <caglar@pardus.org.tr>
http://cekirdek.pardus.org.tr/~caglar/
Linux is like living in a teepee. No Windows, no Gates and an Apache in house!
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Patch] trap: exit: invalid signal specification
2006-06-24 1:10 [Patch] trap: exit: invalid signal specification S.Çağlar Onur
@ 2006-06-24 2:50 ` Junio C Hamano
2006-06-24 12:54 ` S.Çağlar Onur
0 siblings, 1 reply; 5+ messages in thread
From: Junio C Hamano @ 2006-06-24 2:50 UTC (permalink / raw)
To: caglar; +Cc: git
> diff -ur git-1.4.0.orig/git-clone.sh git-1.4.0/git-clone.sh
> --- git-1.4.0.orig/git-clone.sh 2006-06-10 22:41:54.000000000 +0300
> +++ git-1.4.0/git-clone.sh 2006-06-24 03:54:49.000000000 +0300
> @@ -205,7 +205,7 @@
> [ -e "$dir" ] && echo "$dir already exists." && usage
> mkdir -p "$dir" &&
> D=$(cd "$dir" && pwd) &&
> -trap 'err=$?; cd ..; rm -r "$D"; exit $err' 0
> +trap 'err=$?; cd ..; rm -r "$D"; EXIT $err' 0
> case "$bare" in
> yes)
I am not quite sure what to make out this... Do you mean your
shell does not like the command "exit" spelled in lowercase
under Turkic locale?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Patch] trap: exit: invalid signal specification
2006-06-24 2:50 ` Junio C Hamano
@ 2006-06-24 12:54 ` S.Çağlar Onur
2006-06-24 16:57 ` Matthias Lederhofer
[not found] ` <f36b08ee0606241311h399c42b0h11638f14d6f54bd5@mail.gmail.com>
0 siblings, 2 replies; 5+ messages in thread
From: S.Çağlar Onur @ 2006-06-24 12:54 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
[-- Attachment #1: Type: text/plain, Size: 1232 bytes --]
Cumartesi 24 Haziran 2006 05:50 tarihinde, Junio C Hamano şunları yazmıştı:
> I am not quite sure what to make out this... Do you mean your
> shell does not like the command "exit" spelled in lowercase
> under Turkic locale?
Sorry to not clear enough previously, for Turkic locales (tr_TR, az_AZ etc.)
upper(i) != I. More detailed analysis can be found at
http://www.i18nguy.com/unicode/turkish-i18n.html, "Why Applications Fail With
The Turkish Language" section. This is the main reason of this problem.
According to its man page signals defined with uppercase letters but also
different trap implementations may permit lowercase signal names as an
extension.
As an example bash (v. 3.1.17) permits lowercase signal names but it converts
this lowercase signal names into uppercase ones while interpreting the
script. But for our "Turkish has 4 letter "I"s" problem this convert to
uppercase one process fails but for bash invalid signal names not be
considered a syntax error and do not cause the shell to abort.
Yours
--
S.Çağlar Onur <caglar@pardus.org.tr>
http://cekirdek.pardus.org.tr/~caglar/
Linux is like living in a teepee. No Windows, no Gates and an Apache in house!
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Patch] trap: exit: invalid signal specification
2006-06-24 12:54 ` S.Çağlar Onur
@ 2006-06-24 16:57 ` Matthias Lederhofer
[not found] ` <f36b08ee0606241311h399c42b0h11638f14d6f54bd5@mail.gmail.com>
1 sibling, 0 replies; 5+ messages in thread
From: Matthias Lederhofer @ 2006-06-24 16:57 UTC (permalink / raw)
To: S.Ça??lar Onur; +Cc: git
> As an example bash (v. 3.1.17) permits lowercase signal names but it converts
> this lowercase signal names into uppercase ones while interpreting the
> script. But for our "Turkish has 4 letter "I"s" problem this convert to
> uppercase one process fails but for bash invalid signal names not be
> considered a syntax error and do not cause the shell to abort.
It is ``trap <action> <signal>'' so for the signal part this may be
right that this is made uppercase. But action is not modified I guess.
So it should be exit because there is no built-in named EXIT in
bash:
$ type exit
exit is a shell builtin
$ type EXIT
bash: type: EXIT: not found
So for me it does not seem to work:
$ trap 'err=$?; echo trap; EXIT $?' 0
$ exit 5
exit
trap
bash: EXIT: command not found
[1] 12906 exit 5 bash
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Patch] trap: exit: invalid signal specification
[not found] ` <f36b08ee0606241311h399c42b0h11638f14d6f54bd5@mail.gmail.com>
@ 2006-06-25 14:33 ` S.Çağlar Onur
0 siblings, 0 replies; 5+ messages in thread
From: S.Çağlar Onur @ 2006-06-25 14:33 UTC (permalink / raw)
To: Yakov Lerner; +Cc: git
[-- Attachment #1: Type: text/plain, Size: 659 bytes --]
Cumartesi 24 Haziran 2006 23:11 tarihinde şunları yazmıştınız:
> But in the commandline you are patching, 'exit' keyword
> is not bash signal name,
Pff, you are completely right. I'm currently using git-1.2.6 which has "exit"
signal (git-clone.sh: trap 'err=$?; cd ..; rm -r "$D"; exit $err' exit )
causing that trouble but in git-1.4.0 its converted to 0 (git-clone.sh:
trap 'err=$?; cd ..; rm -r "$D"; exit $err' 0) and i didn't realize until
look again. Sorry for noise :(
--
S.Çağlar Onur <caglar@pardus.org.tr>
http://cekirdek.pardus.org.tr/~caglar/
Linux is like living in a teepee. No Windows, no Gates and an Apache in house!
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-06-25 14:33 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-24 1:10 [Patch] trap: exit: invalid signal specification S.Çağlar Onur
2006-06-24 2:50 ` Junio C Hamano
2006-06-24 12:54 ` S.Çağlar Onur
2006-06-24 16:57 ` Matthias Lederhofer
[not found] ` <f36b08ee0606241311h399c42b0h11638f14d6f54bd5@mail.gmail.com>
2006-06-25 14:33 ` S.Çağlar Onur
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.