Bug 4050 - rpm -qlvp format not exactly like ls
rpm -qlvp format not exactly like ls
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
6.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1999-07-15 06:10 EDT by petr
Modified: 2008-05-01 11:37 EDT (History)
0 users

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


Attachments (Terms of Use)

  None (edit)
Description petr 1999-07-15 06:10:33 EDT
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 15:01:59 EDT
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.