Description of problem: The output generated by "rpm -q --requires ..." contains extraneous whitespaces. Version-Release number of selected component (if applicable): rpm-4.8.1-5.fc14.x86_64 How reproducible: Always Steps to Reproduce: 1. run rpm -q --requires <someinstalledpackage> > requires.txt or rpm -q --requires -o <somerpm> > requires.txt 2. check requires.txt Actual results: Several lines in requires.txt, contain 2 extra whitespaces (Hex 0x20) at the end of line, e.g. libc.so.6(GLIBC_2.0) \n Expected results: No extra whitespaces. Additional info: AFAIC gather, all lines without "version equations" carry these blanks, so I'd guess these are the delimiters of rpm's "version equations". I am not sure, if this behavior is intentional.
Not exactly intentional, but a side-effect of how --requires and friends are implemented with popt aliases, where there's not a whole lot of control over formatting details. The simple version of requires is just a query format defined as: "[%{REQUIRENAME} %{REQUIREFLAGS:depflags} %{REQUIREVERSION}\n]" While the query formats do support conditionals, the conditionals can only be used on tag existence which doesn't help for this case as REQUIREFLAGS and REQUIREVERSION tags always exist. So while it might be possible to enhance the conditional support in queryformat "language" to allow fixing this, this isn't as easy fix as it might seem on the outset.
FWIW this has been fixed upstream some time ago, but backport to rpm 4.8.x of F14 is unlikely to happen at this point.
F14 is EOL by now, but this is fixed in rpm >= 4.9.90 / rawhide.