Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 915046 - dev-lang/perl should not depend on app-admin/perl-cleaner
Summary: dev-lang/perl should not depend on app-admin/perl-cleaner
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Perl team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-01 17:54 UTC by sergiotarxz
Modified: 2024-01-06 22:03 UTC (History)
6 users (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 sergiotarxz 2023-10-01 17:54:00 UTC
I thought it would be a nice thing to have the chance to create containers using Portage that only have the packages needed to do whenever they are trying to do.

But when attempted to do so I found that Perl depends on Portage, Python and GCC because its perl-cleaner dependency and that makes it unsuitable to use with slim containers. 

Since perl-cleaner is nothing but a script it could be a dependency of portage instead, but I do not really know how it should be done instead.

The emerge --root feature allowed me previously to make windows executables and other cross compile tricks, but it heavily depends on the runtime dependencies being what it is really needed in runtime.

From my point of view Perl does not need perl-cleaner, instead Portage needs it when Perl is installed.
Comment 1 Ed Wildgoose 2023-10-11 08:46:29 UTC
I've just hit the same bug. I use Gentoo as a toolkit to build our embedded router project. We build tiny root file systems and suddenly the build blew up.

Cause seems to be that >= perl-5.16.1 has changed the definition of PDEPEND

Previously we had:

PDEPEND="
	!minimal? (
		>=app-admin/perl-cleaner-2.5

Now we have:

PDEPEND="
	>=app-admin/perl-cleaner-2.30
	!minimal? (
		>=virtual/perl-CPAN-2.290.0

So this change now causes perl-cleaner to be pulled in, which pulls in python, which pulls in some other stuff causing gcc to be pulled in and more.

Seems like this was done as part of the fix for bug #905625 ?

Can I ask for this change to be considered for reverting please?
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-10-11 08:48:42 UTC
Yeah, very fair point.

I wonder if we can make both of y'all happy with IDEPEND. That implies you need it for --root but it should be depcleanable.

Does that work for you? (Sorry, I can't experiment with it right this second.)
Comment 3 Ed Wildgoose 2023-10-11 08:55:25 UTC
Interesting. I'm not familiar with IDEPEND. 

I build my containers with something like:

ROOT=/some/scratch/space emerge $some_packages

Would this suggestion work for me?
Comment 4 sergiotarxz 2023-10-11 20:10:23 UTC
Hi, if IDEPEND will allow running emerge --root whatever --depclean and prune perl-cleaner it is good enough to me.

But I really wonder if there is need of it being dependency at all, I looked up with ripgrep (Grep alternative) the entire /var/db/repos/gentoo and I did not find a single ebuild or eclass that uses perl-cleaner and it is clear (At least for me) that Perl won't ever use it so it looks not like a real dependency of Perl.

Portage would have no problem pulling it as dependency if portage really will use it, the only problem that I can think about is perl-cleaner not depending on portage to avoid a cyclic dependency and that allowing to install it standalone with emerge --root and not working because there is no portage, but, who would do that?

I wonder how much of a problem would be my proposed solution.
Comment 5 sergiotarxz 2023-10-12 10:24:06 UTC
Also needing perl-cleaner when running emerge --root cross compiling to Windows to install the binpkg is very problematic since mingw won't be able to compile Python because its pthread dependency, but if you are cross compiling to Windows you will have to heavily modify a lots of ebuilds in order to work so it is a minor problem since there are worse problems in cross compiling to Windows support.