Severity: 516093 important Tags: patch Bye
On Thu, 19 Feb 2009 10:57:03 +0100 Rob Gom <rgom.deb...@gmail.com> wrote: > According to the bug #45675, there was -q flag introduced in Debian > package. The -q flag introduced by Debian is completely superfluous and harmful. It causes a lot of trouble in a cross platform environment. Furthermore the implementation changes netcat to a non standard behaviour. > I had to introduce workarounds in my multiplatform scripts: > NC_WORKAROUND=`nc -h 2>&1 | grep -c -F "q secs"` # in Debian there > is -q0 flag, which imposes different default behaviour > if [ $NC_WORKAROUND == 0 ]; then # Fedora > Q0_FLAG=""; > else # Debian > Q0_FLAG="-q0"; > fi This is a crude duct tape solution to cover a bug in netcat. > According to the last comment of abovementioned bug: > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=45675#10 > there was a bug upstream, which has been also upstream fixed (thus > making -q flag unnecessary). Introducing a flag (and non standard behavior) instead of fixing a bug is a bad solution. Introducing crude hacks in a couple of programs to plaster the introduced stupidity makes it harmful and *really* bad. > Please remove -q flag from Debian package, making it more upstream > compliant, or correct me if I'm wrong. I can second that. Please remove the -q flag. At least make "-q 0" the standard behavior (patch below). Thanks, Bene --- netcat-1.10.orig/netcat.c 2010-04-07 15:34:17.591839798 +0200 +++ netcat-1.10/netcat.c 2010-04-07 15:34:30.191855622 +0200 @@ -181,7 +181,7 @@ USHORT o_verbose = 0; unsigned int o_wait = 0; USHORT o_zero = 0; -int o_quit = -1; /* 0 == quit-now; >0 == quit after o_quit seconds */ +int o_quit = 0; /* 0 == quit-now; >0 == quit after o_quit seconds */ int o_keepalive = 0; #ifdef IP_TOS unsigned char o_tos = 0; -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org