That was quick, thank you Rich. Temporarily I used the "cp" approach, but escaping possibility would be IMO useful, especially for automated setups where "--upload" args are generated automatically (my case).
Regards, Lukáš Dne 18. 02. 22 v 20:00 Richard W.M. Jones napsal(a): > On Fri, Feb 18, 2022 at 07:01:22PM +0100, Lukáš Doktor wrote: >> Hello Rich, >> >> by any chance do you know whether it's possible to escape ':' in >> "virt-customize" command? I'm trying to upload a file: >> >> --upload >> '/etc/yum.repos.d/_copr\:copr.devel.redhat.com\:ndokos\:pbench.repo:/etc/yum.repos.d/' >> >> tried various combinations of doubling the ':' or escaping them and so on, >> but it always considers the first ':' as splitter. > > It's not possible because the function always splits on the first ':'... > > https://github.com/libguestfs/libguestfs-common/blob/41126802097f0a864cab8679ae8672b45914d54b/mlcustomize/customize_cmdline.ml#L139 > > ... but there's several workarounds. > > * Make a local copy of the file; you can still give the full name when > you upload: > > $ cp /etc/yum.repos.d/_copr:copr.devel.redhat.com:ndokos:pbench.repo tmp.repo > > $ virt-customize .. --upload > tmp.repo:/etc/yum.repos.d/full:name:including:colons.repo > > * If the file is small, --write + --move. > > * Use --copy-in (if you can copy the whole directory). > > * Use guestfish or the API. > > Rich. >
OpenPGP_0x26B362E47FCF22C1.asc
Description: OpenPGP public key
OpenPGP_signature
Description: OpenPGP digital signature
_______________________________________________ Libguestfs mailing list Libguestfs@redhat.com https://listman.redhat.com/mailman/listinfo/libguestfs