Bug 16617
| Summary: | --queryformat, field width lossage | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Jeff Johnson <jbj> |
| Component: | rpm | Assignee: | Panu Matilainen <pmatilai> |
| Status: | CLOSED RAWHIDE | QA Contact: | |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | rawhide | CC: | imc, suckfish |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | i386 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2008-01-25 17:14:32 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
(from Andy Bradford <bradipo> on rpm-list) In rpm 4.0 the field width works and the multifilename works but there is a
different funny bug
rpm -q --queryformat '[%-50{FILENAMES}%{FILESIZES}\n]' binutils
fails to format nicely
rpm -q --queryformat '[%-50{FILENAMES} %{FILESIZES}\n]' binutils
works properly
Problem exists in rpm-4.2-0.54. Problem exists in rpm-4.4.2-4
h.sprintf("%-50{name}%{version}")
'time1.7'
h.sprintf("%-50{name} %{version}")
'time 1.7'
User pnasrat's account has been closed Reassigning to owner after bugzilla made a mess, sorry about the noise... *** Bug 323221 has been marked as a duplicate of this bug. *** Fixed in 4.4.2.3-0.1.rc1 |
I am trying to get --queryformat to format the output of a query, however, it doesn't seem to work consistently. What I would like to do is list all the files in a package padded in a field of 50 characters, however, when using an iterator to list those filenames it seems to not honor the field width specifier. Here is what I have so far: rpm -qp --queryformat '[%{FILENAMES}\t%{FILESIZES}\n]' zoo-2.10-4.i386.rpm But I would like to do rpm -qp --queryformat '[%-50{FILENAMES}%{FILESIZES}\n]' zoo-2.10-4.i386.rpm however, the -50 seems to have no effect. If I remove the [] iterator from around the %{FILENAMES} variable it prints the field properly, but as you can imagine, it doesn't print all the filenames---just the first. So, has anyone come with a nifty workaround for this problem with --queryformat?