Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 230634

Summary: sys-apps/file always depends on virtual/python even with USE="-python"
Product: Gentoo Linux Reporter: Michael Croes <mycroes>
Component: New packagesAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED FIXED    
Severity: enhancement CC: ansla80, esigra, flameeyes, maxposedon, python, sadam31300
Priority: High    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: file-5.03.ebuild.patch

Description Michael Croes 2008-07-03 13:57:26 UTC
On line 5 of the ebuild for sys-apps/file-4.23 distutils is inherited. Distutils inherits the python eclass and thus virtual/python is added to DEPEND.

Reproducible: Always

Steps to Reproduce:
1. install file
2.
3.

Actual Results:  
the package manager will also want to install python, even if it's disabled in use flags.

Expected Results:  
File should get installed without having virtual/python as dependency

Possible fix would be to remove 'distutils ' from the inherit line and add a line 'use python && inherit distutils' below.
Comment 1 Anonymous 2008-09-18 20:02:55 UTC
This is very annoying if you run paludis and don't need python. Especially if you consider that everytime you run python somebody kills a kitten.
Comment 2 Andrei Slavoiu 2009-04-12 11:22:15 UTC
This is even more annoying when crosscompiling for an embedded system that really has no use for python.
The problem is with the distutils eclass that uncoditionaly adds this dependancy.
Comment 3 Nirbheek Chauhan (RETIRED) gentoo-dev 2009-04-12 16:16:59 UTC
I think a better way to add this would be with a var like NO_AUTO_DEP

If set, DEPEND is not automatically appended with virtual/python. This would be relevant for subversion.eclass as well (django ebuild tests).

In the meantime, people can just do package.provided for virtual/python, or get some other blank package to satisfy the dep.
Comment 4 Michael Croes 2009-04-12 20:26:19 UTC
(In reply to comment #3)
> I think a better way to add this would be with a var like NO_AUTO_DEP
Seems to me that's a workaround, not a solution.

> In the meantime, people can just do package.provided for virtual/python, or get
> some other blank package to satisfy the dep.
I'd suggest everyone to create their own ebuild, and either removing all the mention of python in it or at least the distutils inherit (I believe "use FLAG" is not supposed to be used in ebuilds anymore).
Comment 5 Nirbheek Chauhan (RETIRED) gentoo-dev 2009-04-13 15:35:02 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > I think a better way to add this would be with a var like NO_AUTO_DEP
> Seems to me that's a workaround, not a solution.
> 

Conditional inherits are not allowed, since they would invalidate metadata cache, and multiple inherits are also not allowed. The easiest cache-invariant method I can think of is the NO_AUTO_DEP solution.
Comment 6 Diego Elio Pettenò (RETIRED) gentoo-dev 2009-09-08 11:21:37 UTC
*** Bug 284051 has been marked as a duplicate of this bug. ***
Comment 7 Diego Elio Pettenò (RETIRED) gentoo-dev 2009-09-08 11:23:01 UTC
Nirbheek's solution is what other packages do too. The alternative is splitting the Python bindings in their own package.
Comment 8 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-09-09 19:39:26 UTC
(In reply to comment #1)
> Especially if you consider that everytime you run python somebody kills a
> kitten.

Everytime you run Paludis somebody kills a kitten.
Comment 9 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-09-09 19:41:52 UTC
Created attachment 203625 [details, diff]
file-5.03.ebuild.patch

sys-apps/file maintainers:
Please apply this patch.
Comment 10 SpanKY gentoo-dev 2009-09-09 19:49:25 UTC
feel free to commit it
Comment 11 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-09-09 20:25:34 UTC
Fixed.
Comment 12 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-09-09 20:26:57 UTC
*** Bug 268919 has been marked as a duplicate of this bug. ***
Comment 13 Michael Croes 2009-09-09 21:31:37 UTC
(In reply to comment #8)
> (In reply to comment #1)
> > Especially if you consider that everytime you run python somebody kills a
> > kitten.
> 
> Everytime you run Paludis somebody kills a kitten.
> 

Only in Portage compatibility mode.

Thanks for squashing this one guys!