Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 414535 - app-emulation/lxc should support doc use flag
Summary: app-emulation/lxc should support doc use flag
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Diego Elio Pettenò (RETIRED)
Keywords: PATCH
Depends on:
Reported: 2012-05-03 23:04 UTC by Niniryoku
Modified: 2014-05-30 09:37 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Niniryoku 2012-05-03 23:04:12 UTC

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 @@
-	app-text/docbook-sgml-utils
 # For init script, so protect with vanilla, they are not strictly
@@ -35,7 +34,8 @@
-	)"
+	)
+	doc? (app-text/docbook-sgml-utils)"
@@ -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)
Comment 1 Diego Elio Pettenò (RETIRED) gentoo-dev 2012-11-14 02:50:12 UTC
Okay let's see if I can add it again with 0.8.0 since they seem to be shipping them once again.
Comment 2 Diego Elio Pettenò (RETIRED) gentoo-dev 2012-11-14 02:52:42 UTC
Nope, still not fixed, --disable-doc stops man pages from being installed, which is not going to happen.
Comment 3 eroen 2013-01-12 02:20:44 UTC
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/ 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"
+IUSE="examples +man"
-	app-text/docbook-sgml-utils
+	man? ( app-text/docbook-sgml-utils )
@@ -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
+    <flag name="man">
+      Build and install man pages.
+    </flag>
Comment 4 Walter 2014-05-30 09:29:25 UTC
Also voting for this.
Comment 5 Walter 2014-05-30 09:37:01 UTC
Wait .. it does now. :) On my other host I had global -doc and the manpage vanished. Ahh, too much white wine for breakfast :)