The message gives all the information you need. The --list function (or -l) works only on .xz files not .lzma files.
The command lzma is equivalent to xz --format=lzma so it creates a .lzma file. If you want to be able to print information about your compressed file, you need to create it with xz (--format=xz or --format=auto) foo.
$ xz foo
$ xz -l foo.xz
Strms Blocks Compressed Uncompressed Ratio Check Filename
1 0 32 B 0 B --- CRC64 foo.xz
This isn't a bug. Maybe it's a feature request.
The message gives all the information you need. The --list function (or -l) works only on .xz files not .lzma files.
The command lzma is equivalent to xz --format=lzma so it creates a .lzma file. If you want to be able to print information about your compressed file, you need to create it with xz (--format=xz or --format=auto) foo.
$ xz foo
$ xz -l foo.xz
Strms Blocks Compressed Uncompressed Ratio Check Filename
1 0 32 B 0 B --- CRC64 foo.xz