Bug#501566: dash: details of redirection/duplication in manpage are reversed

2018-11-01 Thread Danny O'Brien
Package: dash
Version: 0.5.10.2-1
Followup-For: Bug #501566

Dear Maintainer,

Hi,

I'm afraid the patch for this bug
https://git.kernel.org/cgit/utils/dash/dash.git/commit/?id=6adc14a0d4e4a25eb2df8110672c84f393b45acb
actually reversed the two descriptions (and added some stray words).

Currently, the man page reads:

>  [n1]  [n]<&-  Close standard input (or n).
>  [n1]>Copy file descriptor n2 as stdin (or fd n1).  fd n2.

This reverses the two <& descriptions, and adds "fd n2" in error.

I think my included patch should fix this.

Thanks for all your generous work,

d.


-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (500, 'testing'), (500, 'stable'), (150, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.18.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages dash depends on:
ii  debianutils  4.8.6
ii  dpkg 1.19.2
ii  libc62.27-6

dash recommends no packages.

dash suggests no packages.

-- debconf information:
* dash/sh: true
From 05b07082b89d73dd84342640c61dc2d45080632c Mon Sep 17 00:00:00 2001
From: Danny O'Brien 
Date: Wed, 31 Oct 2018 23:18:44 -0700
Subject: [PATCH] Fix man page redirection descriptions.

---
 debian/changelog | 8 ++--
 src/dash.1   | 6 ++
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index a0cf909..3e40351 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,13 @@
-dash (0.5.10.2-2) UNRELEASED; urgency=medium
+dash (0.5.10.2-2.1) UNRELEASED; urgency=medium
 
+  [ Ondřej Nový ]
   * d/changelog: Remove trailing whitespaces
   * d/control: Add Vcs-* field
 
- -- Ondřej Nový   Mon, 01 Oct 2018 10:37:55 +0200
+  [ Danny O'Brien ]
+  * Fixed man page redirection typo.
+
+ -- Danny O'Brien   Wed, 31 Oct 2018 23:16:54 -0700
 
 dash (0.5.10.2-1) unstable; urgency=medium
 
diff --git a/src/dash.1 b/src/dash.1
index c452c3f..fead70a 100644
--- a/src/dash.1
+++ b/src/dash.1
@@ -402,13 +402,11 @@ Append standard output (or n) to file.
 .It [n] Ns \*[Lt] file
 Redirect standard input (or n) from file.
 .It [n1] Ns \*[Lt]& Ns n2
-Copy file descriptor n2 as stdout (or fd n1).
-fd n2.
+Copy file descriptor n2 as stdin (or fd n1).
 .It [n] Ns \*[Lt]&-
 Close standard input (or n).
 .It [n1] Ns \*[Gt]& Ns n2
-Copy file descriptor n2 as stdin (or fd n1).
-fd n2.
+Copy file descriptor n2 as stdout (or fd n1).
 .It [n] Ns \*[Gt]&-
 Close standard output (or n).
 .It [n] Ns \*[Lt]\*[Gt] file
-- 
2.19.1



Bug#501566: dash: details of redirection/duplication in manpage are reversed

2014-12-26 Thread Stéphane Aulery
tags + fixed-upstream
stop


See commit 6adc14a0d4e4a25eb2df8110672c84f393b45acb
   2014-12-25 22:50:58 (GMT)

https://git.kernel.org/cgit/utils/dash/dash.git/commit/?id=6adc14a0d4e4a25eb2df8110672c84f393b45acb

-- 
Stéphane Aulery


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#501566: dash: details of redirection/duplication in manpage are reversed

2014-11-18 Thread Stéphane Aulery
Hello Stephen,

Le mardi 11 novembre 2014 à 02:23:21, Stephen Shirley a écrit :
 On 10 November 2014 14:49, Stéphane Aulery saul...@free.fr wrote:
  Le lundi 10 novembre 2014 à 09:24:09, Herbert Xu a écrit :
  Stéphane Aulery saul...@free.fr wrote:
  
   [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=501566
 
  I'm sorry but this patch looks wrong and the text looks correct
  to me as is.
 
  Ok. I passed the information but I'm not really able to judge its
  pertinence. In this case I close this bug.
 
 So, i finally managed to figure out what the problem is. The wording
 is ambiguous (or maybe just insufficiently clear).
 
 [n1]n2Duplicate standard output (or n1) to n2.


Herbert rejected both corrections. Your new proposal is better but
incomplete. Stéphane Chazelas tried to complete it. Moreover you have
not made a new proposal for the first correction.

As I am not dash user, I do not have a good knowledge of the matter. Can
you complete your answer / choice, please?

Thank you in advance for your help.


Original version:

1)  [n1]n2Duplicate standard input (or n1) from file descriptor n2.

2)  [n1]n2Duplicate standard output (or n1) to n2.


Version on Debian bug tracker and refused by H. Xu:

1)  [n1]n2Duplicate standard input (or n1) to file descriptor n2.

2)  [n1]n2Duplicate standard output (or n1) from n2.


Second version of the patch refused by H. Xu:

2)  [n1]n2Redirect standard output (or n1) to n2.


Stéphane Chazelas proposals:

1a) [n1]n2Redirect standard output (or fd n1) to the same open
file description as on fd n2.

1b) [n1]n2Redirect standard output (or fd n1) to
the same resource as open on fd n2.

1c) [n1]n2Copy fd n2 as stdout (or fd n1)


Regards,

-- 
Stéphane Aulery


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#501566: dash: details of redirection/duplication in manpage are reversed

2014-11-18 Thread Stéphane Aulery
Hello Stephen and Herbert,

Stéphane Chazelas just made a complete proposal:


1) [n1]n2Redirect standard input (or fd n1) from the same
   resource as open on fd n2.

2b) [n1]n2   Redirect standard output (or fd n1) to
   the same resource as open on fd n2.


What do you think about?

Regards,

-- 
Stéphane Aulery


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#501566: dash: details of redirection/duplication in manpage are reversed

2014-11-18 Thread Stéphane CHAZELAS
2014-11-19 00:46:03 +0100, Stéphane Aulery:
 Hello Stephen and Herbert,
 
 Stéphane Chazelas just made a complete proposal:
 
 
 1) [n1]n2Redirect standard input (or fd n1) from the same
resource as open on fd n2.
 
 2b) [n1]n2   Redirect standard output (or fd n1) to
the same resource as open on fd n2.
 
 
 What do you think about?
[...]

A final touch (add currently).

 [n1]n2Redirect standard input (or fd n1) from the same
 resource as currently open on fd n2.
 
 [n1]n2   Redirect standard output (or fd n1) to
the same resource as currently open on fd n2.

-- 
Stephane


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#501566: dash: details of redirection/duplication in manpage are reversed

2014-11-11 Thread Stephen Shirley
Hi,

On 10 November 2014 14:49, Stéphane Aulery saul...@free.fr wrote:
 Le lundi 10 novembre 2014 à 09:24:09, Herbert Xu a écrit :
 Stéphane Aulery saul...@free.fr wrote:
 
  [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=501566
 

 I'm sorry but this patch looks wrong and the text looks correct
 to me as is.

 Ok. I passed the information but I'm not really able to judge its
 pertinence. In this case I close this bug.

So, i finally managed to figure out what the problem is. The wording
is ambiguous (or maybe just insufficiently clear).

[n1]n2Duplicate standard output (or n1) to n2.

How i read it (6 years ago :P) was that meant dup2(n1, n2), because
the only actual /duplication/ is of file descriptors. I've just
realised that the intended meaning is redirect n1 to where n2 is
currently, i.e. dup2(n2, n1), as expected. Can i suggest a simple
fix:

[n1]n2Redirect standard output (or n1) to n2.

It doesn't cover the case where n2 is later changed, and how n1 does
not follow this, but it's the simplest fix i see.

Steve
-- 
You are technically correct, the best kind of correct.
- Bureaucrat 1.0, Futurama


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#501566: dash: details of redirection/duplication in manpage are reversed

2014-11-11 Thread Herbert Xu
On Tue, Nov 11, 2014 at 02:23:21PM +0100, Stephen Shirley wrote:

 [n1]n2Redirect standard output (or n1) to n2.
 
 It doesn't cover the case where n2 is later changed, and how n1 does
 not follow this, but it's the simplest fix i see.

Yes that sounds much better.  Please send a patch.

Thanks,
-- 
Email: Herbert Xu herb...@gondor.apana.org.au
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#501566: dash: details of redirection/duplication in manpage are reversed

2014-11-11 Thread Stéphane Aulery
Hello,

Le mardi 11 novembre 2014 à 11:08:05, Herbert Xu a écrit :
 On Tue, Nov 11, 2014 at 02:23:21PM +0100, Stephen Shirley wrote:
 
  [n1]n2Redirect standard output (or n1) to n2.
  
  It doesn't cover the case where n2 is later changed, and how n1 does
  not follow this, but it's the simplest fix i see.
 
 Yes that sounds much better.  Please send a patch.

Here is one. Stephen, the correction of the first line is abandoned?

[n1]n2Duplicate standard input (or n1) from file descriptor n2.

Regards,

-- 
Stéphane Aulery


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#501566: dash: details of redirection/duplication in manpage are reversed

2014-11-10 Thread Stéphane Aulery
Le lundi 10 novembre 2014 à 09:24:09, Herbert Xu a écrit :
 Stéphane Aulery saul...@free.fr wrote:
  
  [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=501566
  
 
 I'm sorry but this patch looks wrong and the text looks correct
 to me as is.

Ok. I passed the information but I'm not really able to judge its
pertinence. In this case I close this bug.

Thank you for your help.

-- 
Stéphane Aulery


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#501566: dash: details of redirection/duplication in manpage are reversed

2014-11-10 Thread Herbert Xu
Stéphane Aulery saul...@free.fr wrote:
 
 --IS0zKkzwUGydFO0o
 Content-Type: text/plain; charset=utf-8
 Content-Disposition: inline
 Content-Transfer-Encoding: 8bit
 
 forwarded 501566 d...@vger.kernel.org
 stop
 ---
 
 Hello,
 
 Here is a small patch reported by a user of Debian [1]. Could you please
 integrate? Thank you for your help.
 
 [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=501566
 
 Regards,
 
 -- 
 Stéphane Aulery
 
 --IS0zKkzwUGydFO0o
 Content-Type: text/x-diff; charset=utf-8
 Content-Disposition: attachment; filename=dash.1.fix-redirection-docs.diff
 
 --- dash.1.old2014-11-10 12:15:29.809398575 +0100
 +++ dash.1.new2014-11-10 12:17:03.401856125 +0100
 @@ -402,11 +402,11 @@
 .It [n] Ns \*[Lt] file
 Redirect standard input (or n) from file.
 .It [n1] Ns \*[Lt] Ns n2
 -Duplicate standard input (or n1) from file descriptor n2.
 +Duplicate standard input (or n1) to file descriptor n2.
 .It [n] Ns \*[Lt]-
 Close standard input (or n).
 .It [n1] Ns \*[Gt] Ns n2
 -Duplicate standard output (or n1) to n2.
 +Duplicate standard output (or n1) from n2.
 .It [n] Ns \*[Gt]-
 Close standard output (or n).
 .It [n] Ns \*[Lt]\*[Gt] file

I'm sorry but this patch looks wrong and the text looks correct
to me as is.

Cheers,
-- 
Email: Herbert Xu herb...@gondor.apana.org.au
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#501566: dash: details of redirection/duplication in manpage are reversed

2008-10-08 Thread Stephen Shirley
Package: dash
Version: 0.5.3-7
Severity: normal
Tags: patch

The dash manpage, in the 'Redirections' section, contains the following
entries:

[n1]n2Duplicate standard input (or n1) from file descriptor n2.
[n1]n2Duplicate standard output (or n1) to n2.

These two seem to be reversed in meaning. For example, taking the
second one, it says that doing '13' will duplicate fd1 to fd3.
However, trying this does the following:

$ echo hello 13
dash: 3: Bad file descriptor

Trying the other way around works just fine though:

$ echo hello 31
hello

This seems to agree with the bash man page, for example.

Steve

-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-6-k7
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)

Versions of packages dash depends on:
ii  libc6  2.3.6.ds1-13etch7 GNU C Library: Shared libraries

dash recommends no packages.

-- debconf information:
  dash/sh: false
diff -urN dash-0.5.3.orig/src/dash.1 dash-0.5.3/src/dash.1
--- dash-0.5.3.orig/src/dash.1  2005-11-26 04:17:55.0 +0100
+++ dash-0.5.3/src/dash.1   2008-10-08 14:58:40.0 +0200
@@ -403,11 +403,11 @@
 .It [n] Ns \*[Lt] file
 Redirect standard input (or n) from file.
 .It [n1] Ns \*[Lt] Ns n2
-Duplicate standard input (or n1) from file descriptor n2.
+Duplicate standard input (or n1) to file descriptor n2.
 .It [n] Ns \*[Lt]-
 Close standard input (or n).
 .It [n1] Ns \*[Gt] Ns n2
-Duplicate standard output (or n1) to n2.
+Duplicate standard output (or n1) from n2.
 .It [n] Ns \*[Gt]-
 Close standard output (or n).
 .It [n] Ns \*[Lt]\*[Gt] file