Bug 4050 - rpm -qlvp format not exactly like ls
Summary: rpm -qlvp format not exactly like ls
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
(Show other bugs)
Version: 6.0
Hardware: All Linux
medium
medium
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1999-07-15 10:10 UTC by petr
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 1999-07-17 19:01:42 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description petr 1999-07-15 10:10:33 UTC
I've noticed strange behavior - Midnigt Commander shows
incorrect year for some files inside rpm files, e.g. Sep
1998 is displayed as Sep 1999.

I've discovered that the problem is in rpm -qlvp listing
format. In opposite to ls command, it displays time of files
for all dates not older than one year and this confuses mc.

Of course, it's hard to say that it is rpm's failure, but
maybe it would be better to conform POSIX standard.

This is the fragment from ls.c (fileutils-4.0):


if (current_time > when + 6L * 30L * 24L * 60L * 60L      /*
Old. */
    || current_time < when - 60L * 60L)   /* In the future.
*/
  {
    /* The file is fairly old or in the future.
       POSIX says the cutoff is 6 months old;
       approximate this by 6*30 days.
       Allow a 1 hour slop factor for what is considered
"the future",
       to allow for NFS server/client clock disagreement.
       Show the year instead of the time of day.  */

    fmt = "%b %e  %Y";
  }
else
  {
    fmt = "%b %e %H:%M";
  }

Comment 1 Jeff Johnson 1999-07-17 19:01:59 UTC
Fixed in cvs (will be rpm-3.0.3).


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