Bug 57105 - mpage -H prints ctime of text file but should print mtime
mpage -H prints ctime of text file but should print mtime
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: mpage (Show other bugs)
7.1
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-12-04 17:22 EST by Robert K. Moniot
Modified: 2008-05-01 11:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-06-13 12:54:01 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)
patches for text.c and mpage.1 to fix feature and documentation of it (1.09 KB, patch)
2001-12-26 15:40 EST, Robert K. Moniot
no flags Details | Diff

  None (edit)
Description Robert K. Moniot 2001-12-04 17:22:35 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.78 [en] (X11; U; Linux 2.4.9-12 i586)

Description of problem:
This is a feature since the man page clearly says that -H uses the file
change
time.  However, the change time is the Wrong Time to use, since it is
updated when
any file attributes are changed.  For instance, if the file is backed up
using
tar --atime-preserve, the ctime of the file becomes the time when the
backup was
done.   Don't try to tell me this isn't BROKEN!  Also, pr uses mtime (as
does enscript)
and the man page sort of implies that mpage should behave like pr, since
this is what
it uses by default under -p.

Version- mpage-2.5.1-5


How reproducible:
Always

Steps to Reproduce:
1. Create a short text file (or use an old one lying around).  Assume it is
named foo.txt.
2. Change its ctime without changing mtime:
       chmod +x foo.txt ; chmod -x foo.txt
3. Look at ctime and mtime; they will be different.
       ls -lc foo.txt ; ls -l foo.txt
4. Format the file using mpage and give output a header
       mpage -H1 foo.txt | lpr
	

Actual Results:  The time in the output header is ctime, not mtime.

Expected Results:  Since mpage conforms to its man page, the expected
results after reading the man
page are the same as the actual results.  However, the expected (and
desired) results
before reading the man page were that the time in the output header should
be mtime.

Additional info:

I did not find any way to tell mpage to select mtime as an alternative to
ctime.
The only workaround is manually put the date in the -h header, or use -p
which unfortunately also puts irrelevant "pr -l66 -w80" in the header.
I would be happy with an additional command-line option to select mtime.
Comment 1 Robert K. Moniot 2001-12-26 15:40:48 EST
Created attachment 41370 [details]
patches for text.c and mpage.1 to fix feature and documentation of it
Comment 2 Tim Waugh 2002-06-14 10:15:12 EDT
I agree.  Fixed in mpage-2.5.2-2.

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