Bug 323221 - field-width specifiers don't work properly in query format
Summary: field-width specifiers don't work properly in query format
Keywords:
Status: CLOSED DUPLICATE of bug 16617
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: 7
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Panu Matilainen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-10-08 15:35 UTC by Ian Collier
Modified: 2008-01-25 17:13 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2008-01-25 17:13:49 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Ian Collier 2007-10-08 15:35:55 UTC
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):
rpm-4.4.2.1-1.fc7

How reproducible:
Always

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

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 23:41:41 UTC
Workaround: Insert a space after "%-30(NAME}", as in 
    rpm -q rpm --qf '%-30{NAME} %{DISTRIBUTION}\n'



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

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




Comment 3 Panu Matilainen 2008-01-25 17:13:49 UTC

*** 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.