Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 595936 - X.Org libraries install thousands of developer man pages
Summary: X.Org libraries install thousands of developer man pages
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 682846
  Show dependency tree
 
Reported: 2016-10-02 14:52 UTC by Chris Mayo
Modified: 2019-04-27 04:50 UTC (History)
1 user (show)

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


Attachments
Patch (xorg-3.eclass.patch,833 bytes, patch)
2019-04-27 00:43 UTC, Arfrever Frehtes Taifersar Arahesis
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Mayo 2016-10-02 14:52:05 UTC
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)
Comment 1 Mart Raudsepp gentoo-dev 2016-10-02 18:56:39 UTC
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
Comment 2 Mart Raudsepp gentoo-dev 2016-10-02 18:57:22 UTC
oh, was still bug-wranglers. Assigning
Comment 3 Matt Turner gentoo-dev 2016-10-04 20:57:09 UTC
(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.
Comment 4 Mart Raudsepp gentoo-dev 2016-10-05 06:37:23 UTC
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?
Comment 5 Larry the Git Cow gentoo-dev 2019-04-07 21:23:33 UTC
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(+)
Comment 6 tt_1 2019-04-08 05:56:55 UTC
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
Comment 7 Matt Turner gentoo-dev 2019-04-08 06:10:37 UTC
(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.
Comment 8 tt_1 2019-04-08 06:14:12 UTC
is there a package you can name which uses xorg-3?
Comment 9 Matt Turner gentoo-dev 2019-04-08 14:28:54 UTC
Sure, anything listed here: https://qa-reports.gentoo.org/output/eapi-per-eclass/xorg-3.eclass/
Comment 10 Arfrever Frehtes Taifersar Arahesis 2019-04-08 18:11:15 UTC
/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.
Comment 11 Arfrever Frehtes Taifersar Arahesis 2019-04-08 18:20:51 UTC
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.
Comment 12 Arfrever Frehtes Taifersar Arahesis 2019-04-08 18:32:27 UTC
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).
Comment 13 Matt Turner gentoo-dev 2019-04-08 19:16:14 UTC
(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.
Comment 14 Larry the Git Cow gentoo-dev 2019-04-24 16:57:14 UTC
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(+)
Comment 15 Arfrever Frehtes Taifersar Arahesis 2019-04-24 17:16:19 UTC
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
Comment 16 Larry the Git Cow gentoo-dev 2019-04-24 17:24:41 UTC
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(-)
Comment 17 Arfrever Frehtes Taifersar Arahesis 2019-04-27 00:43:56 UTC
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.
Comment 18 Larry the Git Cow gentoo-dev 2019-04-27 04:50:52 UTC
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(+)