Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 881433 - dev-qt/*:6: optional installation of examples and example sources
Summary: dev-qt/*:6: optional installation of examples and example sources
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Qt Bug Alias
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-15 21:55 UTC by i.Dark_Templar
Modified: 2023-09-09 16:22 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description i.Dark_Templar 2022-11-15 21:55:31 UTC
When building and installing qt6 packages from Gentoo, no example or example sources are installed, and there is no USE-flag which could enable that.

Reproducible: Always

Steps to Reproduce:
1. emerge dev-qt/qtbase:6
Actual Results:  
No examples installed. No option to install examples.

Expected Results:  
Available option for installation of examples and example sources.

Examples are available in QtCreator when they're properly installed. Without them, "Examples" tab should be empty.
Comment 1 Larry the Git Cow gentoo-dev 2023-09-05 13:05:43 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c2d1b889127af2b11559f0ac3c41313058a4969a

commit c2d1b889127af2b11559f0ac3c41313058a4969a
Author:     Ionen Wolkens <ionen@gentoo.org>
AuthorDate: 2023-09-04 00:45:10 +0000
Commit:     Ionen Wolkens <ionen@gentoo.org>
CommitDate: 2023-09-05 13:01:13 +0000

    qt6-build.eclass: switch examples dir to /usr/lib*/qt6/examples
    
    This is used to install compiled test executables (not source
    examples or similar), meant to be executed from qtcreator
    (not that I've tried it).
    
    We do not install examples (yet), so no need to worry about files
    or qtbase remembering a bad path.
    
    Looking at other distros (at least those that do not set this to
    a docdir like we were and there are many), putting this under
    lib/*qt6/ alongside qt6/bin seems to be the typical choice.
    
    For actual source code examples, Qt has opted to not support installing
    these anymore (QTBUG-86302) so we'd have to doins -r ourselves either
    way, likely like normal docs unless something expects to find these in
    the Qt examples dir.
    
    Bug: https://bugs.gentoo.org/881433
    Signed-off-by: Ionen Wolkens <ionen@gentoo.org>

 eclass/qt6-build.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 2 i.Dark_Templar 2023-09-05 17:29:07 UTC
(In reply to Larry the Git Cow from comment #1)
>     For actual source code examples, Qt has opted to not support installing
>     these anymore (QTBUG-86302) so we'd have to doins -r ourselves either
>     way, likely like normal docs unless something expects to find these in
>     the Qt examples dir.

QtCreator expects sources of examples in QT6_EXAMPLESDIR when it making instance of example project. "doins -r" into correct directory works for me.
Comment 3 Ionen Wolkens gentoo-dev 2023-09-05 20:45:08 UTC
(In reply to i.Dark_Templar from comment #2)
> (In reply to Larry the Git Cow from comment #1)
> >     For actual source code examples, Qt has opted to not support installing
> >     these anymore (QTBUG-86302) so we'd have to doins -r ourselves either
> >     way, likely like normal docs unless something expects to find these in
> >     the Qt examples dir.
> 
> QtCreator expects sources of examples in QT6_EXAMPLESDIR when it making
> instance of example project. "doins -r" into correct directory works for me.
Thanks, will keep that in mind when I get to that then (won't happen right away, but it's on my TODO to integrate this in the eclass).
Comment 4 Ionen Wolkens gentoo-dev 2023-09-09 07:44:02 UTC
Hm, I have USE=examples working fine locally but after trying out Qt Creator I'm kind of having second thoughts about this approach.

1. does not seem to be much point in going through the trouble of *building* examples, all Qt Creator needs is the sources to build them itself -- at best it's some never-really-used standalone demos buried in QT6_EXAMPLESDIR that adds a maintenance/testing cost (plus had to do ugly workarounds given some of them mis-installed in double examples dir)

2. similarly to qt-docs, a user could be interested in a more complete set of examples sources

3. installed examples mismatch with qt-docs given didn't do the USE=doc approach to give the same limited set, this results in a lot of dead examples in Qt Creator

Feels may be better off with a qt-examples package (like suggested in bug #669268) or maybe better yet qt-docs[examples] given could re-use logic+USE. Could probably revert the above commit too given there won't be arch-specific data if it is just sources.

Before making anything final, may end up packaging qt-creator:6 myself so I can happy with how it turns out.
Comment 5 Ionen Wolkens gentoo-dev 2023-09-09 14:07:09 UTC
(In reply to Ionen Wolkens from comment #4)
>maybe better yet qt-docs[examples]
Yeah, this seems to be working pretty well -- qt creator examples tab is looking complete and things work. Liking this better than per-package.

Full qt-docs-6.5.2[examples,html,qch,*] is a good ~600MB installed with 20554 files though.
Comment 6 Larry the Git Cow gentoo-dev 2023-09-09 16:22:46 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=77a553c300865ce45391322a6257b100fcd3c96a

commit 77a553c300865ce45391322a6257b100fcd3c96a
Author:     Ionen Wolkens <ionen@gentoo.org>
AuthorDate: 2023-09-09 12:03:16 +0000
Commit:     Ionen Wolkens <ionen@gentoo.org>
CommitDate: 2023-09-09 16:21:25 +0000

    dev-qt/qt-docs: add examples IUSE (qt6)
    
    Same logic (unless we'd want to use large sources tarballs),
    and feels simpler to merge into one ebuild. Docs also provide
    the example-manifests needed for Qt Creator to find them.
    
    Also improve intructions for bumping, albeit it is simpler than
    it looks and should rarely need updates outside major bumps.
    
    Interestingly the formerly gone broken png from qt-docs:5 makes
    a comeback inside the qtdoc-examples archive.
    
    Closes: https://bugs.gentoo.org/881433
    Signed-off-by: Ionen Wolkens <ionen@gentoo.org>

 dev-qt/qt-docs/Manifest                           |  31 +++++
 dev-qt/qt-docs/qt-docs-6.5.2_p202307080352.ebuild | 145 +++++++++++++++-------
 2 files changed, 132 insertions(+), 44 deletions(-)

Additionally, it has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=79c47b2e54405c57a59043099aa098faf245d79a

commit 79c47b2e54405c57a59043099aa098faf245d79a
Author:     Ionen Wolkens <ionen@gentoo.org>
AuthorDate: 2023-09-09 14:23:07 +0000
Commit:     Ionen Wolkens <ionen@gentoo.org>
CommitDate: 2023-09-09 16:20:26 +0000

    dev-qt/qtbase: revbump for examplesdir revert
    
    Not overly worth the revbump (now), but want to clear this up and
    other small things now that we are getting examples esp. given may
    look at packaging Qt6 Creator soon.
    
    And expect may still be some time before 6.5.3 and 6.6
    
    Bug: https://bugs.gentoo.org/881433
    Signed-off-by: Ionen Wolkens <ionen@gentoo.org>

 dev-qt/qtbase/{qtbase-6.5.2-r1.ebuild => qtbase-6.5.2-r2.ebuild} | 0
 1 file changed, 0 insertions(+), 0 deletions(-)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f31f050dc8174a9031d41c5d7b5c52fc43dc0915

commit f31f050dc8174a9031d41c5d7b5c52fc43dc0915
Author:     Ionen Wolkens <ionen@gentoo.org>
AuthorDate: 2023-09-09 07:17:46 +0000
Commit:     Ionen Wolkens <ionen@gentoo.org>
CommitDate: 2023-09-09 16:06:32 +0000

    Revert "qt6-build.eclass: switch examples dir to /usr/lib*/qt6/examples"
    
    This reverts commit c2d1b889127af2b11559f0ac3c41313058a4969a.
    
    See bug #881433, turns out probably should not build examples.
    So old location makes more sense if we are only going to install
    sources in it.
    
    Note does mean qtbase will need to be rebuilt before start using
    that location though (unused currently).
    
    Bug: https://bugs.gentoo.org/881433
    Signed-off-by: Ionen Wolkens <ionen@gentoo.org>

 eclass/qt6-build.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)