After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 316833 - GNU documentation not available in yelp
GNU documentation not available in yelp
Status: RESOLVED FIXED
Product: yelp
Classification: Applications
Component: Info Pages
2.13.x
Other Linux
: High normal
: ---
Assigned To: Shaun McCance
Yelp maintainers
Depends on: 319621
Blocks:
 
 
Reported: 2005-09-21 08:56 UTC by Sebastien Bacher
Modified: 2006-01-07 19:19 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14


Attachments
"yelp info:///folder/" tries info:///folder/dir (739 bytes, patch)
2005-11-11 08:18 UTC, Daniel Macks
none Details | Review
Fix leak in attachment #54620 (763 bytes, patch)
2005-11-11 08:26 UTC, Daniel Macks
none Details | Review
Search for "dir" for info: URIs (1.42 KB, patch)
2005-11-11 08:49 UTC, Daniel Macks
none Details | Review
A different approach (9.22 KB, patch)
2005-12-10 19:27 UTC, Don Scorgie
none Details | Review
Updated (14.63 KB, patch)
2006-01-04 16:27 UTC, Don Scorgie
committed Details | Review

Description Sebastien Bacher 2005-09-21 08:56:08 UTC
This bug has been opened here: http://bugzilla.ubuntu.com/show_bug.cgi?id=7719

"...
There is a load of documentation in /usr/share/info, none of it I can find in
yelp. Documentation on stuff like wget, make, screen, gpgme, flex, automake-1.9,
bash, cvs, etc."
Comment 1 Brent Smith (smitten) 2005-10-13 20:13:53 UTC
This is basically about there being no index for info files.

"yelp info:///folder/file.gz" works fine but there is no index for info files
Comment 2 Daniel Macks 2005-10-17 21:21:43 UTC
The file named 'dir' is the usual table-of-contents file for an info-file
repository. So perhaps ubuntu isn't distributing one (more correctly generating
it on-the-fly after each package installation probably)? Does
  yelp info:///usr/share/info/dir
work? It *tries* to work for me (yelp-2.12.0) but dumps core (as for many .info
files it seems...still diagnosing)

New-feature-wise, I think when fed a directory via a info:// URI, yelp should
attempt to open a file named "dir" if it exists in that directory before just
crashing with an "Could not load document...invalid or does not point to an
actual file" error. And when built with --enable-info, the main page should
parse the "dir" in INFOPATH and link them like it does for manpages iff
--enable-man.
Comment 3 Daniel Macks 2005-11-11 08:18:34 UTC
Created attachment 54620 [details] [review]
"yelp info:///folder/" tries info:///folder/dir
Comment 4 Daniel Macks 2005-11-11 08:26:02 UTC
Created attachment 54622 [details] [review]
Fix leak in attachment #54620 [details]
Comment 5 Daniel Macks 2005-11-11 08:49:18 UTC
Created attachment 54624 [details] [review]
Search for "dir" for info: URIs

"yelp info:///folder/" uses info:///folder/dir (if it exists).

"yelp info:" uses the first info:///$f/dir among all $f in INFOPATH (if one
exists).

Cleaner handling of temp-string variable.
Comment 6 Don Scorgie 2005-12-10 19:27:39 UTC
Created attachment 55846 [details] [review]
A different approach

This creates a table-of-contents section (on the front page) for info pages.

This is generated from the dir file.  If it aint present, no info pages show up
and you'll get a warning about a non-existant section.

The subsections are generated from the subsections in the dir file (as there
seems to be no real standards on this).
Comment 7 Brent Smith (smitten) 2005-12-10 22:47:34 UTC
Works great here!  I did get a weird error at startup though:

/opt/gnome2//share/yelp/info.xml:0: error : unterminated entity reference 
development tools

Additionally, if my man cache patch goes in, then in yelp-toc-pager.c the first
line in the function process_info_pending() will need to be changed:

-YelpDocInfo *dir = yelp_doc_info_new ("info:(dir)");
+YelpDocInfo *dir = yelp_doc_info_new ("info:(dir)", FALSE);

I noticed that some sections showed up twice, e.g. "Programming" was there
twice, but the entries in each were different so this is probably because there
are actually two categories in the "dir" file
Comment 8 Daniel Macks 2005-12-12 17:03:40 UTC
Good approach Don!

Indeed there are no standards for section names...every .info file declares
whatever section it wants (and sometimes package-manager package maintainers
override this choice as well)...it's a giant mess:( Gotta just use whatever is
there (perhaps alphabetize the sections (case-insensitively) and alphabetize the
node-names within them?)

Regarding the duplicate sections of comment 7, the install-info script that
creates dir *should* append to existing sections instead of making duplicates. I
wonder if you have a hand-patched file, or there's some subtle difference
between the two "Programming" ones?

I think it's still important to keep the ability to have info: URIs that point
to a path give the dir from that path. Some systems do have multiple info
collections, each with their own dir, and no system-wide or unified dir, and
this feature would avoid having to know that "dir is the table of contents of a
given info directory".
Comment 9 Don Scorgie 2005-12-13 10:00:28 UTC
A couple of points:
1. The unterminated entity reference: I don't get that at all.  Seems pretty
weird.  In the dir file, is there an empty section "developement tools"?  Or is
it at the end of the dir file?  Otherwise, I'm a bit stumped about this.

2. The sections showing up twice etc.: Yes, its due to different sections in the
dir file.  I've got 2 Programming sections as well, but 1 is "Programming" and
the other is "Programming:".  I've started to file bugs downstream about this
(for Ubuntu), in the hopes they can nag people enough to fix this up a bit, or
at least fix it for them.

3. Since the man cache patch has been committed, I'll roll another patch to fix
it against CVS Head when I get home.

4. The sections should be automatically alphabetised, as well as the nodes
within them, due to xslt goodness.

5. The patch I have doesn't support different dirs.  Trying to load "yelp
info:$PATH_TO_NEW_DIR/dir" or any info:dir will still result in yelp crying. 
This seems to be a pretty tricky problem to solve.  Again, I'll have a look at
this when I get home (again).  I'll also look at getting different dir's
included in the toc.
Comment 10 Don Scorgie 2006-01-04 16:27:49 UTC
Created attachment 56780 [details] [review]
Updated

As promised, an updated version.

A couple of improvements:
1. It now supports different info page collections, provided each collection is in the info_path and has a dir file.  The caveat being that if the same filename is found in both, only 1 will show up (e.g. if the automake-1.4 info page is in 2 different collections it will only show up once in the listings).

2. The multiple entries of the same category name mention by Brent should now be taken care of - if the same category appears twice, they are all lumped in together.

3. trying to load info:dir should bring you to the TOC for info pages.

Plus several small bugfixes.
Comment 11 Brent Smith (smitten) 2006-01-07 03:55:07 UTC
DonS: seems rock solid to me.  My vote is for a commit to HEAD ;-)  I'd even go for turning on info pages by default.

Shaun, try this patch now!

Marking priority HIGH for more review and testing and updated versions.
Comment 12 Don Scorgie 2006-01-07 19:19:02 UTC
Patch has now been committed to CVS HEAD.  Closing