alsa-utils-1.0.18 builds the man page for alsactl_init using docbook. This pulls in several addional packages in a docbook free system. It would be nice to disable the man page generation via a useflag.
Created attachment 171572 [details] Optionally build man pages This ebuild is a modified version of the original. The useflag "doc" was added to determine whether man pages will be built.
Thanks for submitting your modifications, assigning to maintainers.
Technically we should be checking for noman, not doc, but thanks. I'll look at it. :)
(In reply to comment #3) > Technically we should be checking for noman, not doc, but thanks. I'll look at > it. :) Yeah, I know, I just didn't find a global useflag that fits better and didn't want to create a local one. And as doc is disabled by default, man pages would not be installed by default, which could be seen as a bug. I almost expected a change in the used useflag. On the other hand I thought about using docbook as a useflag and just disable this one man page, but that seems to be too much "micromanagement".
Alright, well we can use if has noman $FEATURES, which would work fine in the build process, but it would be kind of a hack to try and use it in the dependencies. Not sure what to do.
(In reply to comment #5) > Alright, well we can use if has noman $FEATURES, which would work fine in the > build process The problem with noman in FEATURES is, that it can't be set per package without using bashrc hacks (I was't sure about that until reading comments of http://blog.flameeyes.eu/2008/12/11/have-you-tested-that). If there was a packages.features file, that would be less of a problem.
Created attachment 182778 [details, diff] Much simpler patch for alsa-utils-1.0.19 At least in alsa-utils-1.0.19 (I did not check 1.0.18), ./configure knows the option --disable-xmlto which avoids generation of the alsactl_init manpage (which needs the xmlto package). Hence, this can be done cleanly without patching any Makefile. Since the main intention of this bug is to avoid the xmlto dependency (BTW: I think xmlto should only be in DEPEND and not in RDEPEND, anyway), I think it makes sense to avoid generation of only that manpage. Hence, IMHO a useflag makes sense, since FEATURES=noman installs no manpages at all which is probably not what most users will want. Moreover, as remarked in an earlier comment, there is no way to set dependencies on a FEATURES basis (the portage metadata cache would break if the dependencies varies with FEATURES). I guess that the main reason why you did not like the doc useflag for this purpose is that you want to have the manpage generated by default. So (unless you want to introduce some local "noxmlto" useflag), I suggest to use EAPI=1 or higher and make USE=+doc the default. I attach a patch for the alsa-utils-1.0.19.ebuild which needs to change only four lines and uses the +doc (as default) useflag to provide the required functionality
I forgot to mention that also after this patch, the xmlto dependency (without explicit USE=-doc) appears also in RDEPEND. Probably this should also be fixed (but this is strictly speaking a different bug which is just inherited from the original ebuild).
(In reply to comment #7) > four lines and uses the +doc (as default) useflag to provide the required > functionality That's still not a real acceptable solution, imo, since one would never associate the doc use flag with getting the basic man pages installed, which are common with all ebuilds. Essentially, you're breaking ranks of what 'doc' use flags does for one package. It's just gonna cause confusion.
We are not speaking about all manpages but only about the rather technical manpage alsactl_init(7) which is only of interest for a subset of users. The doc useflag is used in the same way for eix (the desription of the format which is not of interest to everybody but whose generation needs external tools is only done if the doc useflag is on), and I guess it is easy to find many other such examples. Anyway, I did not want to start a flamewar about the name of the useflag: If a local useflag is used, this would also be fine for me. I just would like to see some option to avoid installation of several packages for a technical man page which I can read in xml-format anyway. (Perhaps it might be an idea to "dodoc" the xml file if the manpage is not generated).
(In reply to comment #10) > We are not speaking about all manpages but only about the rather technical > manpage alsactl_init(7) which is only of interest for a subset of users. Oh! I totally didn't realize that, my bad. Thanks for the patch and bug report. Fixed in alsa-utils-1.0.19-r2