Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 701522 - sys-fs/zfs has a hard dependency on python
Summary: sys-fs/zfs has a hard dependency on python
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Richard Yao (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-30 09:55 UTC by Aidan Harris
Modified: 2020-08-27 08:24 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
add minimal usevar (zfs-0.8.2-r2-add-minimal-usevar.diff,538 bytes, patch)
2019-11-30 09:55 UTC, Aidan Harris
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Aidan Harris 2019-11-30 09:55:00 UTC
Created attachment 597952 [details, diff]
add minimal usevar

This is a bit of a niche issue. I'm building a custom initramfs using portage (taking advantage of `emerge --root=` and `emerge --root-deps=rdeps` e.g `emerge --root=/usr/src/initramfs --root-deps=rdeps list-of-packages-to-install-here`) and noticed that zfs is pulling in python when it doesn't need to.

I think this was done because zfs includes some python scripts but as far as I know these scripts aren't necessary for the normal operation of zfs. Would it be possible to add a minimal usevar?
Comment 1 Georgy Yakovlev archtester gentoo-dev 2019-12-06 00:01:27 UTC
I'll see what I can do, but no promises.
It already has kind of convoluted python handling, because python useflag is for pyzfs and like you mentioned it uses python unconditionally for some scripts.
adding 3rd condition to already complex python handling can be difficult.
Comment 2 Georgy Yakovlev archtester gentoo-dev 2020-02-07 04:26:40 UTC
I was able to test and it's possible to avoid python.
probably I'll add USE=scripts which is enabled by default, that will pull python for arcstat and friends.
coming soon
Comment 3 Larry the Git Cow gentoo-dev 2020-08-27 03:21:04 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c31aca67fbcb0c9e360a4dfde0a78c4ab44d9399

commit c31aca67fbcb0c9e360a4dfde0a78c4ab44d9399
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2020-08-27 03:03:09 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2020-08-27 03:03:23 +0000

    sys-fs/zfs: update live ebuild, add minimal useflag
    
    it can be used to avoid python dependency completely
    
    Bug: https://bugs.gentoo.org/701522
    Package-Manager: Portage-3.0.4, Repoman-3.0.1
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 sys-fs/zfs/metadata.xml    |  1 +
 sys-fs/zfs/zfs-9999.ebuild | 18 +++++++++++-------
 2 files changed, 12 insertions(+), 7 deletions(-)
Comment 4 Georgy Yakovlev archtester gentoo-dev 2020-08-27 03:22:15 UTC
took a while, but finally committed to live ebuild.

next 2.0.0 ebuild will have [minimal] useflag to avoid python dependency completely.

also I've added nls useflag, which can avoid gettext dependency.
Comment 5 Larry the Git Cow gentoo-dev 2020-08-27 08:24:06 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2b8df15c030224073db4b37f5e74e4c9bce8fa66

commit 2b8df15c030224073db4b37f5e74e4c9bce8fa66
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2020-08-27 08:07:54 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2020-08-27 08:08:27 +0000

    sys-fs/zfs: backport minimal useflag to 0.8.4
    
    Closes: https://bugs.gentoo.org/701522
    Package-Manager: Portage-3.0.4, Repoman-3.0.1
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 sys-fs/zfs/zfs-0.8.4-r2.ebuild | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

Additionally, it has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cb9038f5a96b76706f4ff4eda26b33871232ecb3

commit cb9038f5a96b76706f4ff4eda26b33871232ecb3
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2020-08-27 07:57:04 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2020-08-27 08:08:26 +0000

    sys-fs/zfs: revbump 2.0.0_rc1, add new useflags
    
    Bug: https://bugs.gentoo.org/701522
    Package-Manager: Portage-3.0.4, Repoman-3.0.1
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 sys-fs/zfs/zfs-2.0.0_rc1-r1.ebuild | 223 +++++++++++++++++++++++++++++++++++++
 1 file changed, 223 insertions(+)