FS#58531 - [btrfs-progs] Missing python bindings

Attached to Project: Arch Linux
Opened by Leonid Isaev (lisaev) - Thursday, 10 May 2018, 01:37 GMT
Last edited by Sébastien Luttringer (seblu) - Sunday, 27 May 2018, 16:59 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Sébastien Luttringer (seblu)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Currently, core/btrfs-progs depens on python, presumably to support bindings for libbtrfsutils. However, the package doesn't contain any python-related files. This is because one needs to install the bindings with make install_python, see https://github.com/kdave/btrfs-progs/blob/master/INSTALL . On the other hand, btrfs-progs is a core package and doesn't strictly require python (the size ratio of python / btrfs-progs is ~ 26). Therefore, I suggest to move python from depends() to optdepends() (makedepends already contains python-setuptools which will pull python).

The above amount to the following change of PKGBUILD (also attached):
--- a/PKGBUILD 2018-05-07 19:38:22.191309889 -0600
+++ b/PKGBUILD 2018-05-09 19:34:32.400125421 -0600
@@ -8,8 +8,9 @@
pkgrel=2
pkgdesc='Btrfs filesystem utilities'
arch=('x86_64')
-depends=('glibc' 'libutil-linux' 'e2fsprogs' 'lzo' 'zlib' 'zstd' 'python')
+depends=('glibc' 'libutil-linux' 'e2fsprogs' 'lzo' 'zlib' 'zstd')
makedepends=('git' 'asciidoc' 'xmlto' 'systemd' 'python-setuptools')
+optdepends=('python: for libbtrfsutil python bindings')
url='https://btrfs.wiki.kernel.org'
replaces=('btrfs-progs-unstable')
conflicts=('btrfs-progs-unstable')
@@ -59,6 +60,7 @@
package() {
cd $pkgname-v$pkgver
make DESTDIR="$pkgdir" install
+ make DESTDIR="$pkgdir" install_python

# install bash completion ( FS#44618 )
install -Dm644 btrfs-completion "$pkgdir/usr/share/bash-completion/completions/btrfs"

Thanks!
This task depends upon

Closed by  Sébastien Luttringer (seblu)
Sunday, 27 May 2018, 16:59 GMT
Reason for closing:  Fixed
Additional comments about closing:  btrfs-progs-4.16.1-2
Comment by Eli Schwartz (eschwartz) - Thursday, 10 May 2018, 02:05 GMT
We can't have core packages depending on packages in extra...

We've done optdepends before, yes. makedepends are basically common. But not depends.
Comment by Doug Newgard (Scimmia) - Thursday, 10 May 2018, 15:28 GMT
"We can't have core packages depending on packages in extra..."

Says who?
Comment by Leonid Isaev (lisaev) - Saturday, 12 May 2018, 16:01 GMT
I don't see why cross-repo makedepends is ok, while depends is not...

But my point was only regarding size. I don't need a 130 mb python3 stack on a minimal server, just to be able to snapshot btrfs volumes. And, of course, formally btrfs-progs is broken atm...
Comment by Eli Schwartz (eschwartz) - Sunday, 13 May 2018, 14:19 GMT
@Scimmia,

Because in this one case, it shouldn't be a hard dependency at all, but more generally packages in core pass through testing while packages in extra do not. Depending on packages in extra defeats the whole point of having a core repo in the first place.

This is much worse than having packages in extra which depend on community, which no one really cares about enforcing.

@lisaev,

If a makedepends breaks but the existing package still works, it doesn't break the core system, which is the point of minimal [core] which passes through [testing]. Also if your mirror breaks and core/extra are mismatched, then core (with the packages necessary for booting into a minimally working system) should continue to work.
Comment by Leonid Isaev (lisaev) - Monday, 14 May 2018, 00:33 GMT
For the record, I agree that [core] should be self-contained. I only meant that it would also be nice if packages from at least base group could be build using only core. It's not the case now... for instance, systemd requires meson/ninja stack from community.
Comment by Sébastien Luttringer (seblu) - Wednesday, 16 May 2018, 22:55 GMT
btrfs-progs-4.16.1-2 is fixing this and is on its way to testing.

Loading...