Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 750257 - sys-boot/grub: Please depend on media-libs/libsdl only if both sdl and grub_platforms_emu are set
Summary: sys-boot/grub: Please depend on media-libs/libsdl only if both sdl and grub_p...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal minor
Assignee: Mike Gilbert
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-19 21:10 UTC by Guillermo D. H.
Modified: 2020-10-20 19:36 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 Guillermo D. H. 2020-10-19 21:10:20 UTC
Currently, all ebuilds have DEPEND="sdl? ( media-libs/libsdl )". The effect of setting the sdl USE flag is passing an --enable-grub-emu-sdl option to the configure script. However, analysis of the configure.ac script reveals that this option is ignored if "emu" is not specified in a --with-platform option; all evaluations of variable enable_grub_emu_sdl happen inside "if test "$platform" = emu; then [...]; fi" blocks, and there is even a comment that reads:

# Ignore --enable-emu-* if platform is not emu

On the other hand, installing libSDL typically installs a lot of other packages as dependencies if a desktop profile is selected with default USE flag settings, including several X11 libraries, Mesa, LLVM and Clang, when it will actually only be needed if grub_platforms_emu is set (selecting --with-platform=emu), and that, in turn, will only happen by explicit user's request, since no profile sets that USE flag by default.

So please, change the dependency on libSDL to:

grub_platforms_emu? ( sdl? ( media-libs/libsdl ) )


Reproducible: Always

Actual Results:
Comment 1 Mike Gilbert gentoo-dev 2020-10-20 18:18:20 UTC
Why do you have the sdl USE flag enabled if you don't want to install SDL?
Comment 2 Mike Gilbert gentoo-dev 2020-10-20 18:25:25 UTC
Oh, I see: targets/desktop/make.profile has USE="sdl".
Comment 3 Larry the Git Cow gentoo-dev 2020-10-20 18:28:42 UTC
The bug has been closed via the following commit(s):

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

commit 5ffc093d9e14966f59d98b6aa23df3cb5229b844
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2020-10-20 18:27:54 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2020-10-20 18:27:54 +0000

    sys-boot/grub: adjust sdl dependency
    
    Closes: https://bugs.gentoo.org/750257
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>

 sys-boot/grub/grub-2.04-r1.ebuild            | 4 +++-
 sys-boot/grub/grub-2.05_alpha20200310.ebuild | 4 +++-
 sys-boot/grub/grub-9999.ebuild               | 4 +++-
 3 files changed, 9 insertions(+), 3 deletions(-)
Comment 4 Guillermo D. H. 2020-10-20 19:36:21 UTC
(In reply to Mike Gilbert from comment #2)
> Oh, I see: targets/desktop/make.profile has USE="sdl".

Exactly.

Thank you, Mike.