Package: git
Version: 4.3.20-8
Severity: normal
Tags: patch

 It took me quite a while to figure out what was going on when I tried
to compile a kernel (with make-kpkg).  make-kpkg didn't seem to make
any progress, except that it would progress one step every time I
pressed return.  It turns out that scripts/setlocalversion in the
kernel source runs git to see if it should put extra stuff in the
kernel version string.  stdout is going to a pipe, and stderr is going
to /dev/null.  stdin is from the terminal, so the read command blocks.

 Here's a patch for git.transition that makes it fail silently, or at
least non-interactively, when its not run interactively.  It also
redirects the error message to stderr.

 The goal of this patch is to keep users from having to think about
this problem, since it will go away soon enough.  i.e. Things should
Just Work when users aren't trying to use git or gitfm directly.

--- git.transition.orig 2005-12-07 23:16:55.000000000 -0400
+++ git.transition      2006-04-13 23:50:41.000000000 -0300
@@ -1,6 +1,7 @@
 #!/bin/sh
 
-cat << EOT
+
+cat >&2 << EOT
 
 git, the filemanager with GNU Interactive Tools, is now called gitfm.
 
@@ -14,8 +15,17 @@
 and use (as root):
  update-alternatives --config git
 
-Press RETURN to run gitfm
 EOT
 
-read
-exec /usr/bin/gitfm "$@"
+# don't wait for input from a non-interactive shell.
+# This avoids tripping up the linux kernel build system
+if [ -t 0 ] && [ -t 1 ] && [ -t 2 ];then
+   # only do this if stdin/out/err are terminals.
+   # gitfm won't run if stdin/out aren't ttys,
+   # and message isn't printed if stderr isn't!
+   echo "Press RETURN to run gitfm" >&2
+   read
+   exec /usr/bin/gitfm "$@"
+fi
+
+exit 1


-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.16.5-cks4
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages git depends on:
ii  libc6                         2.3.6-6    GNU C Library: Shared libraries
ii  libncurses5                   5.5-1      Shared libraries for terminal hand
ii  libreadline5                  5.1-7      GNU readline and history libraries

git recommends no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to