diff mbox series

[meta-oe,wrynose,17/36] mpv: propagate ffmpeg's commercial LICENSE_FLAGS

Message ID 20260804194003.3158916-17-ankur.tyagi85@gmail.com
State New
Headers show
Series [meta-oe,wrynose,1/36] valkey: upgrade 9.0.4 -> 9.0.5 | expand

Commit Message

Ankur Tyagi Aug. 4, 2026, 7:39 p.m. UTC
From: Khem Raj <khem.raj@oss.qualcomm.com>

mpv has an unconditional DEPENDS on ffmpeg, which carries
LICENSE_FLAGS = "commercial". When "commercial" is not in
LICENSE_FLAGS_ACCEPTED (the default), ffmpeg is skipped, and parsing the
universe target - which, unlike world, ignores EXCLUDE_FROM_WORLD -
reports mpv as an unbuildable dependency chain:

  WARNING: Nothing PROVIDES 'ffmpeg' (but .../mpv_0.41.0.bb DEPENDS on
           or otherwise requires it)
  ffmpeg was skipped: Has a restricted license 'commercial' ...
  NOTE: Runtime target 'mpv' is unbuildable, removing...

Since mpv cannot be built or shipped without accepting ffmpeg's terms,
propagate the flag onto mpv itself. bitbake then skips mpv cleanly (in
both world and universe) with the same "restricted license" note as
ffmpeg, and no longer emits the confusing unbuildable-dependency
warnings. This mirrors how oe-core's gstreamer1.0-libav (which also
DEPENDS on ffmpeg) carries LICENSE_FLAGS = "commercial".

The explicit EXCLUDE_FROM_WORLD is now redundant - a recipe skipped for
its license flags is already excluded from world - so drop it.

Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
(cherry picked from commit 5f4e021e2df0cd434f9266aadb2353886e57854a)
Signed-off-by: Ankur Tyagi <ankur.tyagi85@gmail.com>
---
 meta-oe/recipes-multimedia/mplayer/mpv_0.41.0.bb | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta-oe/recipes-multimedia/mplayer/mpv_0.41.0.bb b/meta-oe/recipes-multimedia/mplayer/mpv_0.41.0.bb
index ccb66adb7a..d619152902 100644
--- a/meta-oe/recipes-multimedia/mplayer/mpv_0.41.0.bb
+++ b/meta-oe/recipes-multimedia/mplayer/mpv_0.41.0.bb
@@ -16,6 +16,12 @@  DEPENDS = " \
 LICENSE = "GPL-2.0-or-later"
 LIC_FILES_CHKSUM = "file://LICENSE.GPL;md5=570a9b3749dd0463a1778803b12a6dce"
 
+# mpv links against ffmpeg, which carries LICENSE_FLAGS = "commercial";
+# propagate the flag so mpv is cleanly skipped (in both world and universe)
+# unless "commercial" is in LICENSE_FLAGS_ACCEPTED, rather than surfacing as an
+# unbuildable "Nothing PROVIDES 'ffmpeg'" dependency.
+LICENSE_FLAGS = "commercial"
+
 SRCREV = "41f6a645068483470267271e1d09966ca3b9f413"
 SRC_URI = "git://github.com/mpv-player/mpv;name=mpv;branch=release/${@oe.utils.trim_version('${PV}', 2)};protocol=https;tag=v${PV}"
 
@@ -99,4 +105,3 @@  do_configure:append() {
 }
 
 FILES:${PN} += "${datadir}"
-EXCLUDE_FROM_WORLD = "${@bb.utils.contains("LICENSE_FLAGS_ACCEPTED", "commercial", "0", "1", d)}"