Bug 323221 - field-width specifiers don't work properly in query format
field-width specifiers don't work properly in query format
Status: CLOSED DUPLICATE of bug 16617
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Panu Matilainen
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2007-10-08 11:35 EDT by Ian Collier
Modified: 2008-01-25 12:13 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-01-25 12:13:49 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Ian Collier 2007-10-08 11:35:55 EDT
Description of problem:
In the rpm manual page, it says: "To print the packages name and distribution
information in two columns, you could use %-30{NAME}%{DISTRIBUTION}."  However,
the actual effect of this option is to print the name and distribution together
with no space between.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. rpm -q rpm --qf '%-30{NAME}%{DISTRIBUTION}\n'
Actual results:

Expected results:
rpm                           Unknown

Additional info:
It appears to be only the first field-width on each line that doesn't work:

$ rpm -q rpm --qf '%-30{NAME}%-30{VERSION}%{DISTRIBUTION}\n'
rpm4.4.2.1                       Unknown
Comment 1 Jeff Johnson 2007-10-19 19:41:41 EDT
Workaround: Insert a space after "%-30(NAME}", as in 
    rpm -q rpm --qf '%-30{NAME} %{DISTRIBUTION}\n'

Comment 2 Jeff Johnson 2007-11-25 09:41:51 EST
This is the behavior in rpm-5.0a3 and rpm-4.5:

$ rpm -q rpm --qf '%-30{NAME}%-30{VERSION}%{DISTRIBUTION}\n'
rpm                                        Unknown
$ rpm --version
RPM version 5.0.DEVEL
$ rpm -q rpm --qf '%-30{NAME}%-30{VERSION}%{DISTRIBUTION}\n'
rpm                                        Unknown
$ rpm --version
RPM version 4.5

Comment 3 Panu Matilainen 2008-01-25 12:13:49 EST

*** This bug has been marked as a duplicate of 16617 ***

Note You need to log in before you can comment on or make changes to this bug.