Recent versions of yt-dlp install a youtube-dl bin, however the python programs that import youtube-dl as a module don't seem to be able to use it. I'd like to have a USE flag to disable the youtube-dl replacement, while waiting for all projects to switch to yt-dlp. It would be even better to install a fake python module as well, to truly replace youtube-dl, however I don't know if this is possible.
>It would be even better to install a fake python module as well, to truly replace youtube-dl, however I don't know if this is possible. This is "kinda" already done along with the bin/ wrapper, but it's just a symlink. /Some/ applications can use that as-is, while others need migration to function properly (unlike the bin/ wrapper which has a compatibility mode, module isn't 100% compatible). Ebuilds can depend on yt-dlp instead if it happens to work (seems vidify ebuild did recently even though it never migrated to yt-dlp upstream), otherwise wait for upstream to migrate. I'm a bit torn at the idea of introducing a USE given 1) ebuilds optfeatures will need to check and request yt-dlp[youtube-dl] if they need it, and if they hard-depend on it then revbumped to depend on (yt-dlp[youtube-dl(+)] || youtube-dl), need to depend on both or else will not be able to pick either way. 2) even if youtube-dl upstream recently shown some activity (1 new commit + release for a bugfix), it's still throttling at 50kB/s and was just a small hotfix, so sooner or later it's probably headed to be last rited and 1) will become useless and need to be cleaned again. Optimally was hoping to just keep looking at the situation and eventually do the last push to get rid of youtube-dl entirely.
> module isn't 100% compatible Feared it was the case. Well then, for now I'll keep both net-misc/youtube-dl-2021.06.06 and net-misc/yt-dlp-2021.10.22, since they don't conflict. Hopefully the few python packages that still import youtube-dl will release a new version soon.
I'll keep this open given it's still an issue until packages have migrated, and there may be further feedback. The opposite option could be considered too, i.e. have youtube-dl[yt-dlp] (default) skip the bin/ command but still install the python module -- then depend on yt-dlp to ensure the command is /always/ available. That way existing ebuilds wouldn't need updates, and it may serve as a mean to advertise yt-dlp to users. In this scenario would remove the module symlink though, slightly unfortunate for ebuilds that were able to use it but I don't think there's many.
Do we have list of packages that are in tree but has not migrated? Perhaps we can patch them up and close it.
(In reply to Piotr Karbowski from comment #4) > Do we have list of packages that are in tree but has not migrated? Perhaps > we can patch them up and close it. Seeing how haven't got further feedback in this bug I'm going to assume (most) users don't need them to coexist right now, so this may be a WONTFIX either way. That aside, it would be semi-possible to clean up at this point. ---Broken as far as I know: - dev-python/pafy + mps-youtube Issue mention pafy may work but last I briefly tried it with yt-dlp it tried to use elements that don't exist and error'ed out (may need to recheck, didn't try much), this may be one of the more problematic consumer. I haven't tried mps-youtube to compare (depends on pafy, unsure if works), but maybe net-misc/ytfzf could be a rough alternative if we were to last rite it. https://github.com/mps-youtube/pafy/issues/303 - media-sound/gpodder A user reported it semi-work, but apparently non-youtube stuff fails (haven't tried but the link has a patch that may be enough) https://github.com/gpodder/gpodder/issues/1176 ---Probably fine and just need the optfeature updated after trying: - net-misc/gallery-dl Last I tried it was broken ("seemed" to work but created no files), but 1.20.0 release changelog says it now prefers yt-dlp. - net-misc/youtube-viewer Haven't tried but I see yt-dlp support in 3.9.6's README.md - older (stable) mpv Last I tried it could use the youtube-dl compat wrapper just fine. - x11-misc/i3blocks-contrib This just wants a mpv with ytdl support and doesn't use youtube-dl directly. - media-video/yle-dl I don't think this use youtube-dl anymore? I can't find how it would from the source beside a old test, seem it was formerly only an alternative backend too.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1abecfaed988a2f682794ed9443ecd10b72b101a commit 1abecfaed988a2f682794ed9443ecd10b72b101a Author: Ionen Wolkens <ionen@gentoo.org> AuthorDate: 2022-02-16 00:34:25 +0000 Commit: Ionen Wolkens <ionen@gentoo.org> CommitDate: 2022-02-16 02:53:42 +0000 net-misc/youtube-dl: adjust and semi-sync ebuild with yt-dlp * add ewarn that users should consider yt-dlp instead * use optfeature.eclass, but unlike yt-dlp keep the mention of mpv/rtmpdump for now (yt-dlp advertises being able to use ffmpeg for streamed content instead) * public-domain -> Unlicense (uses same as yt-dlp) * skip duplicate README.txt and install supportedsites.md * pep517 mode, planned to be used in next yt-dlp release as well * Add IUSE=+yt-dlp to allow concurrent install with yt-dlp: yt-dlp provides a compatibility mode for the "youtube-dl" command to have the same options which should typically work as a drop-in replacement, but can't do this for the python module. For packages that haven't migrated to yt-dlp and still depend on youtube-dl, IUSE=yt-dlp ensures that both the command and python module will be available while allowing users to pick which command they want to use (bug #829501). youtube-dl is likely still due for removal at some point, but at the moment upstream is still active and maintaining the project for these packages and there is little reason to rush removal. ebuilds should preferably depend on yt-dlp if all they need is the command to ease future removal. Closes: https://bugs.gentoo.org/829501 Signed-off-by: Ionen Wolkens <ionen@gentoo.org> net-misc/youtube-dl/metadata.xml | 3 + .../youtube-dl/youtube-dl-2021.12.17-r1.ebuild | 66 ++++++++++++++++++++++ 2 files changed, 69 insertions(+)