As previously discussed as an aside on bug 534122 a large number of man pages are installed that are only of interest to X developers. Notably x11-libs/libxcb (~2000) and x11-libs/libX11 (~800). Some also have html documents whose installation is not controlled by USE="doc". On a minimal system with noman and nodoc in make.conf this is not an issue. But that is not an option on a workstation where the user normally wants man pages and other documentation. I have worked around by creating /etc/portage/env/nodocman.conf: FEATURES="${FEATURES} nodoc noman" and adding to /etc/portage/package.env: x11-libs/libx* nodocman.conf x11-libs/libX* nodocman.conf (x11-proto documentation is mostly optional with USE="doc" controlling --enable-specs)
Pretty sure FEATURES is cumulative in env/, so you don't need the ${FEATURES}. So you can also do FEATURES="-installsources" kind of stuff in it. If libxcb were to be changed, we should look into not generating the man pages at all from the *.xml files that it does with a small python script during compile time, not just rm -f them. Otherwise I think this needs some more global agreement across Gentoo how to do this and if it's worth controlling user man pages and developer man pages separately
oh, was still bug-wranglers. Assigning
(In reply to Mart Raudsepp from comment #1) > If libxcb were to be changed, we should look into not generating the man > pages at all from the *.xml files that it does with a small python script > during compile time, not just rm -f them. I think that's a good idea in general, especially when things take a long time to compile/generate or require additional dependencies. Do we know if either of those are the case here? libxcb at least, only installs man3 pages (C library functions), so it feels appropriate to put them under USE=doc.
It doesn't feel to take long, but that can be due to fast CPU and SSD. Maybe FEATURES=noman could support section-based filtering?
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=827754d554b5df43c96c6e904a0cc05fffa477eb commit 827754d554b5df43c96c6e904a0cc05fffa477eb Author: Matt Turner <mattst88@gentoo.org> AuthorDate: 2019-04-07 21:22:36 +0000 Commit: Matt Turner <mattst88@gentoo.org> CommitDate: 2019-04-07 21:23:12 +0000 xorg-3.eclass: Remove developer documentation unless requested Closes: https://bugs.gentoo.org/595936 Signed-off-by: Matt Turner <mattst88@gentoo.org> eclass/xorg-3.eclass | 5 +++++ 1 file changed, 5 insertions(+)
that didn't seem to work? [ebuild R ] x11-libs/libxcb-1.13.1:0/1.12::gentoo USE="xkb -doc (-selinux) -static-libs -test" ABI_X86="32 (64) (-x32)" 0 KiB still produces all of the mans
(In reply to tt_1 from comment #6) > that didn't seem to work? > > [ebuild R ] x11-libs/libxcb-1.13.1:0/1.12::gentoo USE="xkb -doc > (-selinux) -static-libs -test" ABI_X86="32 (64) (-x32)" 0 KiB > > still produces all of the mans It was only a fix for xorg-3 ebuilds. I'm not sure whether it's worth porting to xorg-2. Let's give it a few days and see if there are any problems reported with the xorg-3 commit.
is there a package you can name which uses xorg-3?
Sure, anything listed here: https://qa-reports.gentoo.org/output/eapi-per-eclass/xorg-3.eclass/
/usr/share/man/man1/* and /usr/share/man/man5/* are useful for users (e.g. /usr/share/man/man1/Xorg.1.bz2 and /usr/share/man/man5/xorg.conf.5.bz2). It would be better to restrict deletion to only "${D}"/usr/share/man/man3 directory.
And even then, several of affected packages (e.g. x11-libs/libXft, x11-libs/libXrandr, x11-libs/libXxf86dga) do not have "doc" USE flag in IUSE, so now xorg-3.eclass does not provide ability to install their /usr/share/man/man3/* man pages.
I would suggest that this change in eclass be reverted, and that users interested in avoiding man pages set e.g. INSTALL_MASK="/usr/share/man/man3" (either globally in /etc/portage/make.conf or per-package or per-category in /etc/portage/package.env).
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #10) > /usr/share/man/man1/* and /usr/share/man/man5/* are useful for users (e.g. > /usr/share/man/man1/Xorg.1.bz2 and /usr/share/man/man5/xorg.conf.5.bz2). > > It would be better to restrict deletion to only "${D}"/usr/share/man/man3 > directory. Thanks, that's a good point. (In reply to Arfrever Frehtes Taifersar Arahesis from comment #11) > And even then, several of affected packages (e.g. x11-libs/libXft, > x11-libs/libXrandr, x11-libs/libXxf86dga) do not have "doc" USE flag in > IUSE, so now xorg-3.eclass does not provide ability to install their > /usr/share/man/man3/* man pages. No real loss, IMO; but we can certainly add XORG_DOC=doc to those. (In reply to Arfrever Frehtes Taifersar Arahesis from comment #12) > I would suggest that this change in eclass be reverted, and that users > interested in avoiding man pages set e.g. INSTALL_MASK="/usr/share/man/man3" > (either globally in /etc/portage/make.conf or per-package or per-category in > /etc/portage/package.env). Not a terrible plan. I hadn't realized just how many packages unconditionally installed man3 pages.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=80810b400baaea293474dcde65ee2010453cd063 commit 80810b400baaea293474dcde65ee2010453cd063 Author: Matt Turner <mattst88@gentoo.org> AuthorDate: 2019-04-24 16:20:00 +0000 Commit: Matt Turner <mattst88@gentoo.org> CommitDate: 2019-04-24 16:57:00 +0000 xorg-3.eclass: Remove only library call man pages if USE=-doc Arfrever rightly pointed out that there are some useful man pages, and that the issue is about installing thousands of *developer* man pages. Closes: https://bugs.gentoo.org/595936 Signed-off-by: Matt Turner <mattst88@gentoo.org> eclass/xorg-3.eclass | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) Additionally, it has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=87c2f90f4d306f94a5cfb726a49a868235f245e6 commit 87c2f90f4d306f94a5cfb726a49a868235f245e6 Author: Matt Turner <mattst88@gentoo.org> AuthorDate: 2019-04-24 16:32:54 +0000 Commit: Matt Turner <mattst88@gentoo.org> CommitDate: 2019-04-24 16:57:00 +0000 x11-libs/libXxf86dga: Add IUSE=doc Bug: https://bugs.gentoo.org/595936 Signed-off-by: Matt Turner <mattst88@gentoo.org> x11-libs/libXxf86dga/libXxf86dga-1.1.5.ebuild | 1 + 1 file changed, 1 insertion(+) https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=118c1df94ab815a242c9afbd24d7ed2753df4578 commit 118c1df94ab815a242c9afbd24d7ed2753df4578 Author: Matt Turner <mattst88@gentoo.org> AuthorDate: 2019-04-24 16:32:42 +0000 Commit: Matt Turner <mattst88@gentoo.org> CommitDate: 2019-04-24 16:56:59 +0000 x11-libs/libXrandr: Add IUSE=doc Bug: https://bugs.gentoo.org/595936 Signed-off-by: Matt Turner <mattst88@gentoo.org> x11-libs/libXrandr/libXrandr-1.5.2.ebuild | 1 + 1 file changed, 1 insertion(+) https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d5b02ea736651aafcd50f59f105e0e536263a01b commit d5b02ea736651aafcd50f59f105e0e536263a01b Author: Matt Turner <mattst88@gentoo.org> AuthorDate: 2019-04-24 16:32:32 +0000 Commit: Matt Turner <mattst88@gentoo.org> CommitDate: 2019-04-24 16:56:59 +0000 x11-libs/libXft: Add IUSE=doc Bug: https://bugs.gentoo.org/595936 Signed-off-by: Matt Turner <mattst88@gentoo.org> x11-libs/libXft/libXft-2.3.3.ebuild | 1 + 1 file changed, 1 insertion(+) https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d371319f6f60c10ecbdc673dd244c88c44d6f600 commit d371319f6f60c10ecbdc673dd244c88c44d6f600 Author: Matt Turner <mattst88@gentoo.org> AuthorDate: 2019-04-24 16:32:24 +0000 Commit: Matt Turner <mattst88@gentoo.org> CommitDate: 2019-04-24 16:56:59 +0000 x11-libs/libXcursor: Add IUSE=doc Bug: https://bugs.gentoo.org/595936 Signed-off-by: Matt Turner <mattst88@gentoo.org> x11-libs/libXcursor/libXcursor-1.2.0.ebuild | 1 + 1 file changed, 1 insertion(+)
Maybe it would be better to not delete man pages when "doc" USE flag is missing: - if ! use_if_iuse doc; then + if in_iuse doc && ! use doc; then rm -rf "${D}"/usr/share/man/man3 fi
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5ff8e344519b37953c29fd1fe70b4b7b4a43f459 commit 5ff8e344519b37953c29fd1fe70b4b7b4a43f459 Author: Matt Turner <mattst88@gentoo.org> AuthorDate: 2019-04-24 17:23:17 +0000 Commit: Matt Turner <mattst88@gentoo.org> CommitDate: 2019-04-24 17:24:26 +0000 xorg-3.eclass: Don't delete man pages if XORG_DOC=doc is missing There's an eqawarn to warn us about this case a few lines above, but in case we forget, don't delete the man pages. Suggested by Arfrever. Bug: https://bugs.gentoo.org/595936 Signed-off-by: Matt Turner <mattst88@gentoo.org> eclass/xorg-3.eclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Created attachment 574332 [details, diff] Patch After removing ${D}/usr/share/man/man3, if no man pages in other ${D}/usr/share/man/* directories are installed, empty ${D}/usr/share/man would remain and would be registered in /var/db/pkg/${CATEGORY}/${P}/CONTENTS file. I suggest to drop these empty directories.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c7779b29f76d57649a36cd5b6d53c7fb1d8bbe71 commit c7779b29f76d57649a36cd5b6d53c7fb1d8bbe71 Author: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> AuthorDate: 2019-04-27 00:33:50 +0000 Commit: Matt Turner <mattst88@gentoo.org> CommitDate: 2019-04-27 04:50:19 +0000 xorg-3.eclass: Remove parent directories of ${D}/usr/share/man/man3 when empty. Bug: https://bugs.gentoo.org/595936 Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> Signed-off-by: Matt Turner <mattst88@gentoo.org> eclass/xorg-3.eclass | 1 + 1 file changed, 1 insertion(+)