Bug 3388 - perf: enable man pages for basic 'help' functionality
Summary: perf: enable man pages for basic 'help' functionality
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: kernel (show other bugs)
Version: 3.3.3
Hardware: x86 Multiple
: Medium normal
Target Milestone: 3.4
Assignee: Michael Opdenacker
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2012-11-05 15:49 UTC by Tom Zanussi
Modified: 2021-07-30 15:26 UTC (History)
8 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Yes (doc changes required)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Zanussi 2012-11-05 15:49:06 UTC
The help for perf subcommands that a user gets when using 'perf <subcommand> help' relies on manpage support for those subcommands.  Support for 'man' isn't installed by default - we should add a dependency to add manpage support when perf is included in an image.

root@crownbay:~# perf help record
  Warning: failed to exec 'man': No such file or directory
  Fatal: no man viewer handled the request
Comment 1 Bruce Ashfield 2012-11-05 22:10:50 UTC
I assume we'll make this optional on a flag somehow ? (sort of
like the script support). I'm just thinking that some small 
images might want perf, but not man and it's dependencies .. but
maybe it's really small and wouldn't make a difference.
Comment 2 Tom Zanussi 2012-11-05 22:16:13 UTC
Well, the manpages are pretty extensive so I wouldn't call them small, though I kind of assumed that images that included perf meant -sdk images mainly, where it wouldn't be much of an issue.

But it wouldn't be a big deal to add an option that turned it off if - the fact that it you're mentioning it means it's likely to be important to someone, so let's consider such a flag as part of fixing this.
Comment 3 Ross Burton 2014-01-16 16:42:14 UTC
I just had a quick look at this in case it was trivial to at least get the man pages into perf-doc.  It won't work out of the box: we'd need to copy (at least) xmlto from meta-oe, and add a recipe for asciidoc.
Comment 4 Paul Eggleton 2015-01-30 18:32:33 UTC
Minor update - we do at least have xmlto in OE-Core as of recently.
Comment 5 dengke 2016-07-27 05:19:30 UTC
This is because that the help man pages of perf depends on the asciidoc tools.

Steps:
1. Add the recipe for asciidoc.
2. Add the RDEPENDS_${PN}-doc += "man" for perf recipe.
3. Add the DEPENDS += "xmlto-native asciidoc-native"

Explain:
The first make sure the asciidco tools exist.
The second make sure the man command when using 'perf help <subcommand>'
The third make sure the man pages's correct produce.
Comment 6 Michael Opdenacker 2021-07-16 18:34:07 UTC
Can this bug be closed?
The documentation still refers to it, and I would like to remove the reference to it...
Thanks in advance
Michael.
Comment 7 Michael Opdenacker 2021-07-21 13:21:12 UTC
Re-opening this bug.
When I add "perf" to the image and its "manpages" feature to local.conf:

IMAGE_INSTALL_append = " perf"
PACKAGECONFIG_append_pn-perf = " manpages"

Then I build core-image-minimal:
bitbake core-image-minimal

However, I still don't get the expected behaviour:

root@qemux86-64:~# perf help record
failed to exec 'man': No such file or directoryno man viewer handled the request

But do we really want to add manpages to the image?
We could also drop this idea.
What do you think?
Comment 8 Michael Opdenacker 2021-07-21 13:24:28 UTC
Reset the default assigned as dengke.du@windriver.com doesn't seem to be active any more.

Also added that a documentation change is needed (because this bug is referred to in the documentation)
Comment 9 Richard Purdie 2021-07-22 15:11:29 UTC
Did you add "api-documentation" to DISTRO_FEATURES? See manpages.bbclass
Comment 10 Stephen K Jolley 2021-07-22 15:13:39 UTC
See Richards question
Comment 11 Michael Opdenacker 2021-07-22 20:28:47 UTC
Just tried to add:
DISTRO_FEATURES_append = " api-documentation"

But getting the exact same error.
Thanks for your help!
Comment 12 Michael Opdenacker 2021-07-28 14:57:57 UTC
Still stuck here, help appreciated.
Thanks in advance
Michael.
Comment 13 Bruce Ashfield 2021-07-29 13:46:32 UTC
I can have a look at this later in August (I'm heading on vacation), and confirm whether we can get this working, or just close the bug.
Comment 14 Michael Opdenacker 2021-07-29 13:48:20 UTC
Great, thanks Bruce!
Comment 15 Richard Purdie 2021-07-30 11:39:04 UTC
Shouldn't this be:

IMAGE_INSTALL_append = " perf-doc"

?
Comment 16 Richard Purdie 2021-07-30 12:25:21 UTC
I confirmed that the configuration that makes this work is:

IMAGE_INSTALL_append = " perf perf-doc"
DISTRO_FEATURES_append = " api-documentation"
Comment 17 Michael Opdenacker 2021-07-30 15:26:00 UTC
I confirm that this solution works.
I can close this bug and update the documentation.
Many thanks!