If one installs x11-misc/xdg-utils-1.2.1-r7 (needed, for example, by www-client/google-chrome), and then runs something like: bzgrep -w perl $(sh -c 'while read kind path rest;do [ "$kind" = "dir" ] || echo $path; done' < /var/db/pkg/x11-misc/xdg-utils-1.2.1-r7/CONTENTS) then one gets only this one line: /usr/bin/xdg-screensaver: perl -e ' That is already covered by the gnome? subsection of the RDEPEND in the ebuild that goes like: RDEPEND=" dev-perl/File-MimeInfo dev-util/desktop-file-utils x11-misc/shared-mime-info dbus? ( sys-apps/dbus gnome? ( dev-perl/Net-DBus dev-perl/X11-Protocol ) ) plasma? ( virtual/pkgconfig ) X? ( x11-apps/xprop x11-apps/xset ) " There are actually fairly few files installed by this package. grep -c obj /var/db/pkg/x11-misc/xdg-utils-1.2.1-r7/CONTENTS gives only 23 files. Reproducible: Always Steps to Reproduce: 1. With only dev-lang/perl installed and -gnome active emerge xdg-utils (note bugzilla itself seems to want this already installed). 2. emerge -pt xdg-utils 3. Or just read the first 40 lines of xdg-utils-1.2.1-r7.ebuild Actual Results: [ebuild N ] dev-perl/File-MimeInfo-0.330.0 USE="-test" PERL_FEATURES="(-debug) -ithreads -quadmath" [ebuild N ] dev-perl/File-DesktopEntry-0.220.0-r1 USE="-test" PERL_FEATURES="(-debug) -ithreads -quadmath" [ebuild N ] virtual/perl-File-Path-2.180.0-r3 [ebuild N ] dev-perl/URI-5.310.0 USE="-test" PERL_FEATURES="(-debug) -ithreads -quadmath" [ebuild N ] virtual/perl-libnet-3.150.0-r1 USE="ssl" [ebuild N ] dev-perl/IO-Socket-SSL-2.89.0 USE="-examples -idn -test" PERL_FEATURES="(-debug) -ithreads -quadmath" [ebuild N ] dev-perl/Net-SSLeay-1.940.0 USE="-examples -minimal -test" PERL_FEATURES="(-debug) -ithreads -quadmath" [ebuild N ] virtual/perl-parent-0.241.0-r1 [ebuild N ] dev-perl/File-BaseDir-0.90.0 USE="-test" PERL_FEATURES="(-debug) -ithreads -quadmath" [ebuild N ] dev-perl/IPC-System-Simple-1.300.0 USE="-test" PERL_FEATURES="(-debug) -ithreads -quadmath" [ebuild N ] virtual/perl-Scalar-List-Utils-1.680.0 [ebuild N ] perl-core/Scalar-List-Utils-1.680.0 PERL_FEATURES="(-debug) -ithreads -quadmath" [nomerge ] dev-perl/URI-5.310.0 USE="-test" PERL_FEATURES="(-debug) -ithreads -quadmath" [ebuild N ] dev-perl/Regexp-IPv6-0.30.0-r2 USE="-test" PERL_FEATURES="(-debug) -ithreads -quadmath" [ebuild N ] dev-perl/MIME-Base32-1.303.0-r1 USE="-test" PERL_FEATURES="(-debug) -ithreads -quadmath" [nomerge ] dev-perl/File-MimeInfo-0.330.0 USE="-test" PERL_FEATURES="(-debug) -ithreads -quadmath" [ebuild N ] dev-perl/Encode-Locale-1.50.0-r1 USE="-test" PERL_FEATURES="(-debug) -ithreads -quadmath" [nomerge ] dev-perl/URI-5.310.0 USE="-test" PERL_FEATURES="(-debug) -ithreads -quadmath" [ebuild N ] virtual/perl-MIME-Base64-3.160.100_rc-r1 [nomerge ] dev-perl/File-MimeInfo-0.330.0 USE="-test" PERL_FEATURES="(-debug) -ithreads -quadmath" [nomerge ] dev-perl/File-BaseDir-0.90.0 USE="-test" PERL_FEATURES="(-debug) -ithreads -quadmath" [ebuild N ] virtual/perl-File-Spec-3.900.0-r1 [ebuild N ] virtual/perl-Exporter-5.780.0 [ebuild N ] virtual/perl-Carp-1.540.0-r1 Expected Results: Just xdg-utils It seems to me that the fix for this is to simply delete that one line at the very beginning of RDEPEND.
Ok. So, I found gentoo bug 353721 by looking through the full from-CVS- through-git history (don't know why my searches didn't turn that up, but I did try). The pretty optional dependency comes through dev-perl/File-MimeInfo:mimeopen. This dependency *used* to be guarded "perl? ( dev-perl/File-MimeInfo )" added in 2012 by 3cb68fb44d671829e849eb5a41ff39eff4423c85 but that conditioning was dropped in the move from xdg-utils-1.1.2.ebuild to xdg-utils-1.1.2-r1.ebuild with a comment by Mike Gilbert: "Drop the 'perl' USE flag since it now becomes mostly useless" which also added 2 new perl packages *later* (i.e. now) made conditional on gnome. { I always hated gnome - *personally* I just wrote my own icon-less window manager 20 years ago and find most of this desktop stuff obscene bloat and provide my own ~/bin/xdg-open anyway and could probably just toss xdg-utils into a packages.provided, but the old 353721 suggests I am not alone at all in disapproving of unconditional pulling in of PerlVerse stuff, though I must confess "mostly useless" made me think of "mostly harmless" and smile :-) }. So, TLDR - this seems like an evolution of the ebuild which added several perl packages and so dropped perl? and then re-conditioned the extra packages but neglected restoring the "perl?" conditional. My new recommendation is thus to just reinstate the "perl?" USE condition for dev-perl/File-MimeInfo. (Honestly, you might want to mention "mimeopen" in a comment, too or at least "xdg-open" or possibly even the 353721 bug.)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9ec102ac52b8ea890181a29f36b9650d1abf44a3 commit 9ec102ac52b8ea890181a29f36b9650d1abf44a3 Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2025-01-07 18:36:29 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2025-01-07 18:36:29 +0000 x11-misc/xdg-utils: reintroduce 'perl' USE flag Closes: https://bugs.gentoo.org/947658 Signed-off-by: Mike Gilbert <floppym@gentoo.org> .../{xdg-utils-1.2.1-r7.ebuild => xdg-utils-1.2.1-r8.ebuild} | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)