Popped up today on #gentoo-dev-help for virtual/ffmpeg: $ cat ffmpeg-9-r2.ebuild # Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=5 DESCRIPTION="Virtual package for FFmpeg executable implementation" # Please note that this virtual is only suited for packages that call # ffmpeg/avconv or one of the remaining executables. If your package # links to one of the libraries, you need to use the following # dependency instead (adding IUSE=libav): # libav? ( media-video/libav:0= ) # !libav? ( media-video/ffmpeg:0= ) SLOT="0" KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 sparc x86 ~amd64-linux ~x86-linux" IUSE="X +encode gsm jpeg2k mp3 opus sdl speex theora threads truetype vaapi vdpau x264" RDEPEND=" >=media-video/ffmpeg-1.2.6-r1:0[X?,encode?,gsm?,jpeg2k?,mp3?,opus?,sdl?,speex?,theora?,threads?,truetype?,vaapi?,vdpau?,x264?] " I suggest adding a check to repoman to: - warn about redundant virtual if it has only one provider - suggest adding a package to package.deprecated if it's not there yet That way users will see a warning and will gradually move away from the virtual.
repoman support has been removed per bug 835013. Please file a new bug (or, I suppose, reopen this one) if you feel this check is still applicable to pkgcheck and doesn't already exist.
If we do this, we should check that all versions of the package have a single provider instead, I think, to avoid issues where we might have subslotted virtuals? dunno
PR opened for pkgcheck
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/proj/pkgcore/pkgcheck.git/commit/?id=9fefb10f2b5ca6dc3e595e1d318956252f396ed0 commit 9fefb10f2b5ca6dc3e595e1d318956252f396ed0 Author: Arthur Zamarin <arthurzam@gentoo.org> AuthorDate: 2022-10-27 19:07:12 +0000 Commit: Arthur Zamarin <arthurzam@gentoo.org> CommitDate: 2022-11-04 12:57:44 +0000 VirtualProvidersCheck: new check for providers issues - check for virtual package defining DEPEND or BDEPEND - check for virtual package with a single provider across versions Closes: https://bugs.gentoo.org/744784 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org> src/pkgcheck/checks/metadata.py | 80 +++++++++++++++++++++- .../VirtualWithBdepend/expected.json | 2 + .../VirtualWithDepend/expected.json | 2 + .../VirtualWithSingleProvider/expected.json | 1 + testdata/repos/standalone/profiles/desc/elibc.desc | 1 + .../repos/standalone/profiles/package.deprecated | 1 + .../VirtualWithBdepend/VirtualWithBdepend-0.ebuild | 6 ++ .../VirtualWithBdepend/VirtualWithBdepend-1.ebuild | 11 +++ .../VirtualWithDepend/VirtualWithDepend-0.ebuild | 6 ++ .../VirtualWithDepend/VirtualWithDepend-1.ebuild | 11 +++ .../VirtualWithSingleProvider1-0.ebuild | 10 +++ .../VirtualWithSingleProvider2-0.ebuild | 10 +++ .../VirtualWithSingleProvider3-0.ebuild | 8 +++ .../VirtualWithSingleProvider3-1.ebuild | 8 +++ .../VirtualWithSingleProvider4-0.ebuild | 8 +++ .../VirtualWithSingleProvider4-1.ebuild | 8 +++ .../VirtualWithSingleProvider5-0.ebuild | 8 +++ .../VirtualWithSingleProvider6-0.ebuild | 9 +++ 18 files changed, 189 insertions(+), 1 deletion(-)