Hi Pabs,

Sorry for the long time to react.

Em qui., 6 de jan. de 2022 às 03:07, Paul Wise <p...@debian.org> escreveu:
>
> Control: tags -1 - moreinfo
>
> On Fri, 2021-10-29 at 23:08 -0300, Eriberto Mota wrote:
>
> > To:   992...@bugs.debian.org
>
> Please CC submitters when you have questions/comments they should see,
> I only saw your message by coincidence when looking at the bug.


Ok.


> > Unfortunately, your script ends with
> > 'pipetty: can't allocate a pseudo-terminal: No such file or directory'.
>
> I don't get this on the machine where I tested the script.
>
> It sounds like your test environment doesn't have /dev/pts/ mounted?


Yes, you are right. My jail was missing /dev/pts.


> > If possible, to create an empty file in Bash, use '> file' instead of
> > 'touch file'.
>
> I've adopted that. The script also had some other issues that I fixed;
> it was not compatible with dash printf (which doesn't support \xNN),
> included unwanted LF bytes and also neglected to truncate the file at
> the right place after writing the result string.
>
> Please include this script instead:
>
>    #!/bin/sh
>    set -e
>    rm -f nonempty empty result
>    echo -n nonempty > nonempty
>    echo -n > empty
>    echo -n result > result
>    for f in nonempty empty ; do
>      echo "Editing $f in hexedit"
>      printf "$f"'\n\tresult\33ty\30y' |
>      pipetty hexedit 2>&1 |
>      ansi2txt |
>      tr '\r' '\n'
>    done
>    head -vn-0 nonempty empty result ; echo
>    for f in nonempty empty ; do
>      cmp "$f" result
>    done


Very good. However, the Salsa returned 'Error opening terminal:
unknown'[1]. So I added a TERM variable to fix this issue and the CI
worked fine in Salsa[2]. See the change below.

- pipetty hexedit 2>&1 |
+ TERM=xterm pipetty hexedit 2>&1 |

[1] https://salsa.debian.org/debian/hexedit/-/jobs/2981702
[2] https://salsa.debian.org/debian/hexedit/-/jobs/2981737

What do you think about this change? I am ready to upload a new
upstream version with your new test.

Cheers,

Eriberto

Reply via email to