Bug 1296427
Summary: | Old timestamp of docs/modifyrepo.1 causes caching the old version | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Stanislav Zidek <szidek> | ||||
Component: | man | Assignee: | Nikola Forró <nforro> | ||||
Status: | CLOSED ERRATA | QA Contact: | Jakub Heger <jheger> | ||||
Severity: | low | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 6.8 | CC: | bnater, isenfeld, james.antill, nforro, ovasik | ||||
Target Milestone: | rc | Keywords: | Patch | ||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | man-1.6f-38.el6 | Doc Type: | If docs needed, set a value | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2017-03-21 10:04:29 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Stanislav Zidek
2016-01-07 09:03:33 UTC
Correction: actual result is empty output (man page that is shown is same as in old version although it changed) and expected result is the difference shown. I think this is rather confusing behaviour of the man itself. Even though I cannot reproduce the issue with exactly your commands (seems that there is a bit difference in my and your sessions when it comes to man output forwarding) below are my observations: # rpm -q createrepo createrepo-0.9.9-22.el6.noarch # find /var/cache/man -name '*modify*' # man modifyrepo # # double-check that --no-compress option is listed # find /var/cache/man -name '*modify*' # # see, no cache was created # MANWIDTH=80 man modifyrepo Formatting page, please wait... # # find /var/cache/man -name '*modify*' /var/cache/man/cat1/modifyrepo.1.lzma # # wow, now we have a cache # ls -l /var/cache/man/cat1/modifyrepo.1.lzma -r--r--r--. 1 root root 1104 Jan 7 06:03 /var/cache/man/cat1/modifyrepo.1.lzma # # rpm -Uvh http://download.devel.redhat.com/brewroot/packages/createrepo/0.9.9/24.el6/noarch/createrepo-0.9.9-24.el6.noarch.rpm Retrieving http://download.devel.redhat.com/brewroot/packages/createrepo/0.9.9/24.el6/noarch/createrepo-0.9.9-24.el6.noarch.rpm Preparing... ########################################### [100%] 1:createrepo ########################################### [100%] # man modifyrepo # # no-compress option is not listed anymore, this is correct # MANWIDTH=80 man modifyrepo # # this time no-compress option is listed as the cache was used # # btw # man modifyrepo > a # MANWIDTH=80 man modifyrepo > b # diff a b # # surprisingly, there is not difference, let's check those files # less a # less b # # nope, non of them contained the no-compress option (i.e. new man page version was listed) Just for completeness, man version was man-1.6f-32.el6.x86_64. (In reply to Karel Srot from comment #2) > I think this is rather confusing behaviour of the man itself. Maybe it is confusing, but man only creates and uses cached cat files if output device is 80 columns wide TTY. So the original problem is reproducible if output is not redirected to files: Steps to Reproduce: 1. ... install createrepo-0.9.9-22.el6 if not present 2. MANWIDTH=80 man modifyrepo (causes /var/cache/man/cat1/modifyrepo.1.lzma to be created) 3. --no-compress option is listed 4. ... update to createrepo-0.9.9-24.el6 5. MANWIDTH=80 man modifyrepo 6. --no-compress option is still listed Sorry about the confusion, it's true that you cannot see the problem while redirecting the output of "man modifyrepo". I think that Karel was suggesting that the current way of caching is not correct (only comparing mtime in is_newer function). I am however not sure if this can be reasonably done in some other way (like storing the precise mtime of the manpage from which was the cache made..?). The issue can be also solved by not preserving the mtime of the man page of rpm during install (install -p in createrepo doc/Makefile). I am not sure what is the best practice here; is it said somewhere (in packaging guidelines maybe?) that the preserving of the mtime (install -p) should not be done? You are right, this should be resolved in man. The same issue can manifest itself with any updated package containing man pages. man-db seems to avoid this by updating mtime of the newly created cat file to match mtime of the original man page. We could use the same approach in man. Created attachment 1112894 [details]
Update cat file timestamps
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2017-0645.html |