Bug 747969 - wrong page from "info diff"
Summary: wrong page from "info diff"
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: diffutils
Version: 16
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-10-21 14:48 UTC by Andrei Gaponenko
Modified: 2011-12-14 23:34 UTC (History)
2 users (show)

Fixed In Version: diffutils-3.2-5.fc16
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-14 23:34:47 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Andrei Gaponenko 2011-10-21 14:48:02 UTC
Description of problem:

"info diff" brings up a wrong page (about difftime()):

// File: libc.info,  Node: Elapsed Time,  Next: Processor And CPU Time,  Prev: // Time Basics,  Up: Date and Time
// 
// 21.2 Elapsed Time

The file /usr/share/info/diffutils.info.gz is installed and can be accessed by
"info diffutils". 

How reproducible:  always

Steps to Reproduce:
1.  Install Fedora 16 beta
2.  yum update
3.  info diff
  
Actual results:  info page about difftime(3)

Expected results: info page about diff(1)

Regards,
Andrei

Comment 1 Fedora Update System 2011-11-25 15:18:45 UTC
diffutils-3.2-3.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/diffutils-3.2-3.fc16

Comment 2 Fedora Update System 2011-11-25 23:24:38 UTC
Package diffutils-3.2-3.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing diffutils-3.2-3.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2011-16419/diffutils-3.2-3.fc16
then log in and leave karma (feedback).

Comment 3 Tim Waugh 2011-11-29 10:48:05 UTC
Real fix in 3.2-4.fc16.

Comment 4 Fedora Update System 2011-11-30 01:59:19 UTC
Package diffutils-3.2-4.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing diffutils-3.2-4.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2011-16419/diffutils-3.2-4.fc16
then log in and leave karma (feedback).

Comment 5 Michael Schwendt 2011-12-07 17:38:06 UTC
This is still broken.


1) postin  does  /sbin/install-info /usr/share/info/diffutils.info.gz /usr/share/info/dir --entry="* diff: (diff).                 The GNU diff."

which ignores the info dir entries specified in the diffutils.info.gz file. Instead, it inserts only the badly formatted custom --entry.


2) postun  does /sbin/install-info --delete /usr/share/info/diffutils.info.gz /usr/share/info/dir --entry="* diff: (diff).                 The GNU diff."

which warns about the non-existing entries and fails to remove the custom entry:

install-info: warning: no entries found for `/usr/share/info/diffutils.info.gz'; nothing deleted

# zgrep "GNU diff" /usr/share/info/dir
* diff: (diff).                 The GNU diff.
* diff: (diff).                 The GNU diff.


Same postun script also does  /sbin/install-info --delete /usr/share/info/diff.info.gz /usr/share/info/dir --entry="* diff: (diff).                 The GNU diff."

which operates on a file that no longer exists as it has not been available in F16 and (for upgrades) has been removed by previous package updates already:

install-info: No such file or directory for /usr/share/info/diff.info.gz

Comment 6 Michael Schwendt 2011-12-07 17:50:29 UTC
Just these
  https://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Texinfo
for /usr/share/info/diffutils.info.gz also make "info diff" work and not display man(1) instead.

Comment 7 Michael Schwendt 2011-12-07 17:51:00 UTC
typo: man(1) -> diff(1)

Comment 8 Tim Waugh 2011-12-08 11:18:05 UTC
Thanks, fixed in git repo now.

Koji builds aren't working at the moment.  Here's what I have:

==>
%post
/sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir || :

%preun
if [ $1 = 0 ]; then
  /sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir || :
fi
<==

I still end up with a bad entry though:

$ zgrep -w diff /usr/share/info/dir
* diff: (diffutils)Invoking diff.               Compare 2 files line by line.
* diff: (diff).                 The GNU diff.

Any idea how I get rid of that?

Comment 9 Michael Schwendt 2011-12-08 12:56:19 UTC
Dunno yet. That bad entry is the relict of the older packages adding a custom entry that could not be deleted.

"man install-info" says about the --delete --entry=TEXT combo:

[...]
 When removing, TEXT specifies the entry to remove.  TEXT is only
              removed  as  a  last resort, if the entry as determined from the
              Info file is not present, and the  basename  of  the  Info  file
              isn't found either.
[...]

Not only is it vague, it doesn't work currently.

Comment 10 Michael Schwendt 2011-12-08 13:10:29 UTC
Seems as if the basename of the specified info file can be determined, deleting the custom entry fails. This works (but is useless nevertheless):

# /sbin/install-info /usr/share/info/diffutils.info.gz /usr/share/info/dir --entry="* diff: (diffutils). Fubared."
# zgrep Fub /usr/share/info/dir
* diff: (diffutils).            Fubared.
* diff: (diffutils).            Fubared.
# /sbin/install-info /usr/share/info/diffutils.info.gz /usr/share/info/dir --entry="* diff: (diffutils). Fubared." --delete
# zgrep Fub /usr/share/info/dir
#

It correctly removed the custom entry due to the correct "diffutils" basename.

It is useless because if one specifies a non-existing info file, install-info exits without removing the custom entry:

# /sbin/install-info /usr/share/info/fubared.info.gz /usr/share/info/dir --entry="* diff: (diffutils). Fubared." --delete --debug
debug: reading dir file /usr/share/info/dir
debug: reading input file /usr/share/info/fubared.info.gz
install-info: No such file or directory for /usr/share/info/fubared.info.gz
# zgrep Fub /usr/share/info/dir* diff: (diffutils).            Fubared.
* diff: (diffutils).            Fubared.

Comment 11 Fedora Update System 2011-12-10 20:03:18 UTC
Package diffutils-3.2-5.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing diffutils-3.2-5.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2011-16419/diffutils-3.2-5.fc16
then log in and leave karma (feedback).

Comment 12 Fedora Update System 2011-12-14 23:34:47 UTC
diffutils-3.2-5.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.


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