Bug 174340 - queryformat formatting incorrect
Summary: queryformat formatting incorrect
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: rawhide
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Panu Matilainen
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-11-28 10:27 UTC by JW
Modified: 2008-01-25 17:22 UTC (History)
0 users

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


Attachments (Terms of Use)

Description JW 2005-11-28 10:27:47 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (compatible; MSIE 6.0; Windows; U; AIIEEEE!; Win98; Windows 98; en-US; Gecko masquerading as IE; should it matter?; rv:1.8b) Gecko/20050217

Description of problem:
The queryformat printf-style printing doesn't always work.


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

How reproducible:
Always

Steps to Reproduce:
1. rpm -q --queryformat "%.10{INSTALLTIME:date}\n" kernel
2. rpm -q --queryformat "%|INSTALLTIME?%.10{INSTALLTIME:date}:{}|\n" kernel
3.
  

Actual Results:  1. "Wed 23 Nov"
2. "Wed 23 Nov 2005 05:45:39 PM EST"


Expected Results:  Both should output "Wed 23 Nov" or whatever.


Additional info:

Would it also be possible to add a ":idate" or perhaps something to output ISO8601 format, or perhaps ":%Y" etc which would be strftime-style date formatters (the '%' may or may not be a problem)?

Probably too much trouble I suppose.

Comment 1 Paul Nasrat 2005-11-28 14:11:36 UTC
Confirmed against rpm-4.4.2-7.i386


Comment 2 Jeff Johnson 2005-11-28 17:07:59 UTC
[jbj@wellfleet ~]$ rpm -q --queryformat "%.10{INSTALLTIME:date}\n" kernel
Fri 18 Nov
Sun 27 Nov
[jbj@wellfleet ~]$ rpm --version
RPM version 4.4.4


Comment 3 Paul Nasrat 2005-11-28 22:55:02 UTC
Yes that works for me too - but if it's in conditional it doesn't

rpm -q --queryformat "%|INSTALLTIME?{%.10{INSTALLTIME:date}}|\n" kernel
Sat 19 Nov 2005 10:54:39 AM EST
Fri 25 Nov 2005 10:36:40 AM EST

Does rpm 4.4.4 fix that case?

Comment 4 Jeff Johnson 2005-11-30 19:34:24 UTC
Dunno. Why don't *YOU* try ?

Comment 6 Panu Matilainen 2007-08-09 19:55:17 UTC
Still happens with rpm 4.4.2.1 (not big surprise there...), moving version to devel.

Comment 7 Panu Matilainen 2008-01-25 17:22:33 UTC
[pmatilai@localhost ~]$ rpm -q rpm
rpm-4.4.2.3-0.1.rc1.x86_64

[pmatilai@localhost ~]$ rpm -q --queryformat
"%|INSTALLTIME?{%.10{INSTALLTIME:date}}|\n" kernel
Fri 21 Dec
Fri 25 Jan



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