Re: tramp (2.7.3.30.2 nil/nil); podman/docker incompatible container list output format
Samuele FAVAZZA <[email protected]> Fri, 3 Jul 2026 08:54:06 +0200
| Newsgroups | gmane.emacs.tramp |
|---|---|
| Message-ID | <CAL7E7WzZhLy5z1P2zPW9dJSv2VcA+DFB2V7Q36H3644gj13__Q@mail.gmail.com> |
--000000000000bdf7750655af6446 Content-Type: text/plain; charset="UTF-8" Hello Michael, Thanks for the prompt reply. I found the issue working on a Ubuntu 22.04.5 LTS which features 'podman version 3.4.4'. Best regards, Samuele On Thu, Jul 2, 2026, 21:27 Michael Albinus <[email protected]> wrote: > Samuele FAVAZZA <[email protected]> writes: > > > Hello all, > > Hi Samuele, > > > The observed issue concerns the listing of containers suggested after > > inserting either '/docker:' or '/podman:' as tramp connection methods. > > In particular the 'docker' method flawlessly lists the available > > containers that can be accessed but 'podman' does not. > > > > Searching for the cause I identified the issue in the > > 'tramp-container--completion-function' function. Upon invocation > > of the '[podman|docker] ps --format '{{.ID}}\t{{.Names}}' command, the > > resulting list of strings are different. See the examples below > > (executed in a shell after starting a container in docker and one in > > podman): > > > > > > $ docker ps --format '{{.ID}}\t{{.Names}}' | od -c | head -1 > > 0000000 3 2 e 5 d a 8 f 9 5 d 8 \t v a n > > > > $ podman ps --format '{{.ID}}\t{{.Names}}' | od -c | head -1 > > 0000000 c c c f e 9 7 6 1 c 5 3 r e > > > > As can be observed 'podman' replaces the '\t' charter with a sequence of > > 2 spaces, causing the parsing of the tool output to fail in > > 'tramp-container--completion-function'. > > I'm curious: where do you run podman? In my Fedora 44 system, I see > > --8<---------------cut here---------------start------------->8--- > $ podman ps --format '{{.ID}}\t{{.Names}}' | od -c | head -1 > 0000000 c 1 6 f 7 d 2 4 0 7 b 2 \t g r a > $ podman -v > podman version 5.8.3 > --8<---------------cut here---------------end--------------->8--- > > Or is it your shell, which does the transformation? > > > I have successfully tested the following patch: > > Likely, we will apply your patch. But first I'd like to understand why > this happens. > > > Best regards, > > Samuele Favazza > > Best regards, Michael. > --000000000000bdf7750655af6446 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"auto"><div>Hello Michael,<div dir=3D"auto"><br></div><div dir= =3D"auto">Thanks for the prompt reply. I found the issue working on a Ubunt= u 22.04.5 LTS which features 'podman version 3.4.4'.</div><div dir= =3D"auto"><br></div><div dir=3D"auto">Best regards,=C2=A0</div><div dir=3D"= auto">Samuele</div><br><br><div class=3D"gmail_quote gmail_quote_container"= ><div dir=3D"ltr" class=3D"gmail_attr">On Thu, Jul 2, 2026, 21:27 Michael A= lbinus <<a href=3D"mailto:[email protected]">[email protected]= </a>> wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:= 0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Samuele FAVAZZA <= ;<a href=3D"mailto:[email protected]" target=3D"_blank" rel=3D"nore= ferrer">[email protected]</a>> writes:<br> <br> > Hello all,<br> <br> Hi Samuele,<br> <br> > The observed issue concerns the listing of containers suggested after<= br> > inserting either '/docker:' or '/podman:' as tramp con= nection methods.<br> > In particular the 'docker' method flawlessly lists the availab= le<br> > containers that can be accessed but 'podman' does not.<br> ><br> > Searching for the cause I identified the issue in the<br> > 'tramp-container--completion-function' function. Upon invocati= on<br> > of the '[podman|docker] ps --format '{{.ID}}\t{{.Names}}' = command, the<br> > resulting list of strings are different. See the examples below<br> > (executed in a shell after starting a container in docker and one in<b= r> > podman):<br> ><br> ><br> > $ docker ps --format '{{.ID}}\t{{.Names}}' | od -c | head -1<b= r> >=C2=A0 =C2=A00000000=C2=A0 =C2=A03=C2=A0 =C2=A02=C2=A0 =C2=A0e=C2=A0 = =C2=A05=C2=A0 =C2=A0d=C2=A0 =C2=A0a=C2=A0 =C2=A08=C2=A0 =C2=A0f=C2=A0 =C2= =A09=C2=A0 =C2=A05=C2=A0 =C2=A0d=C2=A0 =C2=A08=C2=A0 \t=C2=A0 =C2=A0v=C2=A0= =C2=A0a=C2=A0 =C2=A0n<br> ><br> > $ podman ps --format '{{.ID}}\t{{.Names}}' | od -c | head -1<b= r> >=C2=A0 =C2=A00000000=C2=A0 =C2=A0c=C2=A0 =C2=A0c=C2=A0 =C2=A0c=C2=A0 = =C2=A0f=C2=A0 =C2=A0e=C2=A0 =C2=A09=C2=A0 =C2=A07=C2=A0 =C2=A06=C2=A0 =C2= =A01=C2=A0 =C2=A0c=C2=A0 =C2=A05=C2=A0 =C2=A03=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0r=C2=A0 =C2=A0e<br> ><br> > As can be observed 'podman' replaces the '\t' charter = with a sequence of<br> > 2 spaces, causing the parsing of the tool output to fail in<br> > 'tramp-container--completion-function'.<br> <br> I'm curious: where do you run podman? In my Fedora 44 system, I see<br> <br> --8<---------------cut here---------------start------------->8---<br> $ podman ps --format '{{.ID}}\t{{.Names}}' | od -c | head -1<br> 0000000=C2=A0 =C2=A0c=C2=A0 =C2=A01=C2=A0 =C2=A06=C2=A0 =C2=A0f=C2=A0 =C2= =A07=C2=A0 =C2=A0d=C2=A0 =C2=A02=C2=A0 =C2=A04=C2=A0 =C2=A00=C2=A0 =C2=A07= =C2=A0 =C2=A0b=C2=A0 =C2=A02=C2=A0 \t=C2=A0 =C2=A0g=C2=A0 =C2=A0r=C2=A0 =C2= =A0a<br> $ podman -v<br> podman version 5.8.3<br> --8<---------------cut here---------------end--------------->8---<br> <br> Or is it your shell, which does the transformation?<br> <br> > I have successfully tested the following patch:<br> <br> Likely, we will apply your patch. But first I'd like to understand why<= br> this happens.<br> <br> > Best regards,<br> > Samuele Favazza<br> <br> Best regards, Michael.<br> </blockquote></div></div></div> --000000000000bdf7750655af6446--