Hi Trent,

Quoting Trent W. Buck (2019-08-08 07:46:56)
> I regularly debootstrap on the far end of an SSH connection.
> This is approximately
> 
>     ssh otherplace debootstrap buster /tmp/x http://apt/debian
> 
> When I try this with mmdebstrap, it hangs forever waiting for a
> sources.list on stdin, EVEN THOUGH I have supplied one on the CLI.
> 
>     ssh otherplace mmdebstrap buster /tmp/x http://apt/debian
>     [...]
>     I: Reading sources.list from standard input...
> 
> This is because mmdebstrap:1957 assumes if stdin is either a tty, or is a 
> sources.list.
> 
> From the manpage, I think this should happen IF AND ONLY IF the mirrors 
> argument is "-"
> 
>     <a mmdebstrap x y z    # ignore stdin (mirrors are "z")
>     <a mmdebstrap x y -    # read from stdin (mirrors are "a")
>     <a mmdebstrap x y      # ignore stdin (mirrors are default)
> 
> You can reproduce other silly behaviours with:
> 
>     mmdebstrap <&-
>     mmdebstrap </dev/zero
> 
> As a workaround, "mmdebstrap </dev/null" seems to work.
> 
> 
> PS: I set DEBIAN_FRONTEND &c, so postinsts don't need a tty either.

wow, this is an excellent bugreport, thanks!

I'd still love to retain the current interface *and* solve this issue when
using it over ssh. I'll investigate.

Thanks!

cheers, josch

Attachment: signature.asc
Description: signature

Reply via email to