Hello, I use “-doc” use flag in my make.conf file. But it seems this use flag is ignored by app-emulation/lxc since the documentation is generated. The problem is it installs docbook utils I don't need on my server. Reproducible: Always Steps to Reproduce: 1. USE="-doc" emerge -v app-emulation/lxc Actual Results: Documentation generation is enabled in /usr/share/doc/lxc-VERSION, and it installs app-text/docbook-sgml-utils as dependency. Expected Results: Documentation shouldn't be generated, and app-text/docbook-sgml-utils shouldn't be installed. I checked the ebuild code. I'm not a gentoo developper, but maybe something like that will do it (NOT TESTED AT ALL) : --- lxc-0.8.0_rc1-r4.ebuild 2012-05-04 00:54:18.303602130 +0200 +++ lxc-0.8.0_rc1-r5.ebuild 2012-05-04 00:59:17.971423213 +0200 @@ -25,7 +25,6 @@ RDEPEND="sys-libs/libcap" DEPEND="${RDEPEND} - app-text/docbook-sgml-utils >=sys-kernel/linux-headers-3.2" # For init script, so protect with vanilla, they are not strictly @@ -35,7 +34,8 @@ sys-apps/util-linux app-misc/pax-utils >=sys-apps/openrc-0.9.9.1 - )" + ) + doc? (app-text/docbook-sgml-utils)" CONFIG_CHECK="~CGROUPS ~CPUSETS ~CGROUP_CPUACCT @@ -98,7 +98,7 @@ --docdir=/usr/share/doc/${PF} \ --with-config-path=/etc/lxc \ --with-rootfs-path=/usr/lib/lxc/rootfs \ - --enable-doc \ + $(use_enable doc) \ $(use_enable examples) }
Okay let's see if I can add it again with 0.8.0 since they seem to be shipping them once again.
Nope, still not fixed, --disable-doc stops man pages from being installed, which is not going to happen.
Having to install extra packages for documentation that won't be used is an unnecessary pain IMO, although missing man pages due to -doc will be surprising and wrong. However, AFAICT (from weak autotools knowledge and grepping), --enable-doc /only/ controls man page generation (in doc/Makefile.am lines 9-46). This goes for 0.8.0 (as patched in gentoo) and current git, which is somewhat different in this regard. Looking at the rest of the portage tree, there are other packages with similar issues: - dev-cpp/libcmis requires app-text/docbook2X for generating man pages. There, it is solved by introducing a man use flag. - sys-auth/sssd uses the manpages use flag (enabled by default) to generate man pages with docbook and libxslt. Please consider adding such a flag to lxc. Making it default avoids unwanted surprise since the profiles don't know about it. Ebuild patch for completeness: --- a/app-emulation/lxc/lxc-0.8.0-r1.ebuild +++ b/app-emulation/lxc/lxc-0.8.0-r1.ebuild @@ -24,12 +24,12 @@ KEYWORDS="~amd64 ~ppc64 ~x86" LICENSE="LGPL-3" SLOT="0" -IUSE="examples" +IUSE="examples +man" RDEPEND="sys-libs/libcap" DEPEND="${RDEPEND} - app-text/docbook-sgml-utils + man? ( app-text/docbook-sgml-utils ) >=sys-kernel/linux-headers-3.2" RDEPEND="${RDEPEND} @@ -99,7 +99,7 @@ src_configure() { --docdir=/usr/share/doc/${PF} \ --with-config-path=/etc/lxc \ --with-rootfs-path=/usr/lib/lxc/rootfs \ - --enable-doc \ + $(use_enable doc man) \ --disable-apparmor \ $(use_enable examples) } --- a/app-emulation/lxc/metadata.xml +++ b/app-emulation/lxc/metadata.xml @@ -17,5 +17,8 @@ around as they use LXC in contexts where the init script is not useful. </flag> + <flag name="man"> + Build and install man pages. + </flag> </use> </pkgmetadata>
Also voting for this.
Wait .. it does now. :) On my other host I had global -doc and the manpage vanished. Ahh, too much white wine for breakfast :)