Subject: Re: pkg/25317
To: None <,,>
From: Alan Barrett <>
List: pkgsrc-bugs
Date: 03/29/2005 18:52:01
The following reply was made to PR pkg/25317; it has been noted by GNATS.

From: Alan Barrett <>
Subject: Re: pkg/25317
Date: Tue, 29 Mar 2005 20:45:46 +0200

 On Tue, 29 Mar 2005, wrote:
 > Synopsis: spurious "No more PTYs" from screen
 > It is a bit difficult to understand the patch to a patch, i.e. I'm
 > having trouble figuring out which method you want to use.
 To properly see what I was talking about, you need to check out a
 version of pkgsrc from the date when I filed the PR.  Then apply the
 patch-to-a-patch, examine the resulting patch file to see how it would
 patch the original sources, apply the new patch file to the correct
 version of the original sources, examine the reulting patched source
 code.  And compare that with the resulting patched source code that you
 would get without using the patch-to-a-patch.
 > Looking at pty.c the only branch for "#ifndef PTY_DONE" is the last
 > one that defaults to BSD style PTY's.  It doesn't use openpty(3),
 > so I don't understand why you'd change that to require HAVE_OPENPTY
 > defined.
 Huh?  I didn't change that block at all.  I think you are looking at a
 version of pty.c as patched by revision 1.10 of patch-aa, whereas my PR
 was against revision 1.9 of patch-aa.
 > The NetBSD block was added above so that the default case would not
 > be used on NetBSD, as it doesn't understand PTY naming on NetBSD.
 The bug which I reported is that the "#if defined(NetBSD)" block was
 *below* the "#if defined(HAVE_OPENPTY)", whereas it should have been
 *above* the "#if defined(HAVE_OPENPTY)".  You say the NetBSD block
 was added above, I say that it *should have* been added above, and it
 probably was above in an older version of screen, but (with the versions
 of screen and patch-aa against which I filed the PR), the NetBSD block
 ended up being added below instead of above the HAVE_OPENPTY block.  The
 whole point of the PR was to report that problem.
 The reason that the patch used to apply in the wrong place is that the
 pty.c file contains many identical lines.  For example, the three-line
 sequence {blank line, comment line with many stars, blank line} appears
 many times.
 I believe that the current version of patch-aa will not apply in
 the wrong place, so the PR can be closed.  However, it's really
 disappointing that PRs that contain patches just get ignored for such a
 long time.  The longer my PRs get ignored, the more difficult it becomes
 to answer questions about them, and the more inclined I am to keep my
 patches to myself instead of submitting PRs.
 > I have a feeling that the "other" openpty(3) block got added in a
 > later version of screen(1), so most likely the NetBSD block is no
 > longer used.  However, I can't test this without an old enough
 > system, e.g. NetBSD 1.6.2.
 Yes, I think that's true.  I also no longer have a sufficiently
 old version of NetBSD.
 --apb (Alan Barrett)