On Mon 30 Jul 2012 at 03:40PM, Shawn Walker wrote:
> >I'll just write it to stderr instead-- it seems more sane than
> >inventing yet another new exception type.  The other option would
> >be to print nothing, which would also be fine with me.
> 
> The silent approach may be best; it should be pretty obvious if the
> terminal type is screwed up since the progress tracking will be
> different.  And if it isn't obvious, then the caller needs to check
> that.

Ok, so I have a new version of this fix posted.  Here are the
changes:

        - Now silent on a TERM it doesn't understand; so the
          core fix is now very trivial.

        - Turns out the previous tests sometimes interacted badly
          with the api suite-- mostly due to the way libcurses
          initializes itself; once you've called setupterm() once,
          subsequent calls in the same process have no effect, which
          makes testing various edge cases impossible.  So I
          reimplemented the tests in the CLI suite; this necessitated
          adding a rough variant of Popen and of cmdline_run which
          allows one to launch tests in a pty.  I also migrated a
          pkglint test which did essentially the same thing to use the
          new API.

It's the usual "3 lines to fix the bug, 100 lines to test the fix."

https://cr.opensolaris.org/action/browse/pkg/dp/setupterm/

        -dp

-- 
Daniel Price, Solaris Kernel Engineering
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to