On 4/12/19 5:58 AM, Fabiano Fidêncio wrote: > When using the plain format the os variants are already taken into > account. However, it's never been printed, neither for medias nor for > trees, when using the env output format. > > The output before this patch looks like: > fidencio@laerte ~/src/upstream/libosinfo $ ./tools/osinfo-detect -f env https://ftp.fau.de/fedora/linux/releases/29/Server/x86_64/os/images/boot.iso > OSINFO_BOOTABLE=1 > OSINFO_INSTALLER=http://fedoraproject.org/fedora/29 > OSINFO_MEDIA=http://fedoraproject.org/fedora/29:3 > > fidencio@laerte ~/src/upstream/libosinfo $ ./tools/osinfo-detect -f env -t tree https://ftp.fau.de/fedora/linux/releases/29/Server/x86_64/os > OSINFO_INSTALLER=http://fedoraproject.org/fedora/29 > OSINFO_TREE=http://fedoraproject.org/fedora/29:1 > OSINFO_TREE_KERNEL=images/pxeboot/vmlinuz > OSINFO_TREE_INITRD=images/pxeboot/initrd.img > OSINFO_TREE_BOOT_ISO=images/boot.iso > > And after this patch: > - For entries containing only one variant-id: > fidencio@laerte ~/src/upstream/libosinfo $ ./tools/osinfo-detect -f env https://ftp.fau.de/fedora/linux/releases/29/Server/x86_64/os/images/boot.iso > OSINFO_BOOTABLE=1 > OSINFO_INSTALLER=http://fedoraproject.org/fedora/29 > OSINFO_MEDIA=http://fedoraproject.org/fedora/29:3 > OSINFO_MEDIA_VARIANTS=Fedora 29 Server > > fidencio@laerte ~/src/upstream/libosinfo $ ./tools/osinfo-detect -f env -t tree https://ftp.fau.de/fedora/linux/releases/29/Server/x86_64/os > OSINFO_INSTALLER=http://fedoraproject.org/fedora/29 > OSINFO_TREE=http://fedoraproject.org/fedora/29:1 > OSINFO_TREE_KERNEL=images/pxeboot/vmlinuz > OSINFO_TREE_INITRD=images/pxeboot/initrd.img > OSINFO_TREE_BOOT_ISO=images/boot.iso > OSINFO_TREE_VARIANTS=Fedora 29 Server > > - For entries containing more than one variant-id: > fidencio@laerte ~/src/upstream/libosinfo $ ./tools/osinfo-detect -f env https://ftp.fau.de/fedora/linux/releases/29/Server/x86_64/os/images/boot.iso > OSINFO_BOOTABLE=1 > OSINFO_INSTALLER=http://fedoraproject.org/fedora/29 > OSINFO_MEDIA=http://fedoraproject.org/fedora/29:3 > OSINFO_MEDIA_VARIANTS=Fedora 29 Server, Fedora 29 Workstation > > fidencio@laerte ~/src/upstream/libosinfo $ ./tools/osinfo-detect -f env -t tree https://ftp.fau.de/fedora/linux/releases/29/Server/x86_64/os > OSINFO_INSTALLER=http://fedoraproject.org/fedora/29 > OSINFO_TREE=http://fedoraproject.org/fedora/29:1 > OSINFO_TREE_KERNEL=images/pxeboot/vmlinuz > OSINFO_TREE_INITRD=images/pxeboot/initrd.img > OSINFO_TREE_BOOT_ISO=images/boot.iso > OSINFO_TREE_VARIANTS=Fedora 29 Server, Fedora 29 Workstation > > Note that, at this point, entries containing more than one variant-id are > non-existent in our database and the output showed above is just one > example showing how it's going to look like ... the example was produced > after adding more than one os-variant to the spefici tree/media in the > fedora-29 entry. Hmm but combining them like that means that if apps want to programmatically consume the variant list, they have to split on ", " and we would probably want to mandate that variants can't contain commas. What do you think of: OSINFO_TREE_VARIANT=foo OSINFO_TREE_VARIANT=bar That might not be faithful to the original idea of '-f env' outputing data that can be consumed by udev, I'm not sure. But I think we are long past that anyways - Cole _______________________________________________ Libosinfo mailing list Libosinfo@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libosinfo