]> granicus.if.org Git - zfs/commitdiff
arc_summary: prefer python3 version and install when there is no python
authorEli Schwartz <eschwartz93@gmail.com>
Mon, 10 Jun 2019 16:08:53 +0000 (12:08 -0400)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 10 Jun 2019 16:08:53 +0000 (09:08 -0700)
This matches the behavior of other python scripts, such as arcstat and
dbufstat, which are always installed but whose install-exec-hook actions
will simply touch up the shebang if a python interpreter was configured
*and* that interpreter is a python2 interpreter.

Fixes installation in a minimal build chroot without python available.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Ryan Moeller <ryan@freqlabs.com>
Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Closes #8851

cmd/arc_summary/Makefile.am

index a83edffadcb9bedd7114547da6bf443d30b80533..7d83624d66d3e1d589dba0de26f9321b26bf437c 100644 (file)
@@ -4,9 +4,7 @@ if USING_PYTHON_2
 dist_bin_SCRIPTS = arc_summary2
 install-exec-hook:
        mv $(DESTDIR)$(bindir)/arc_summary2 $(DESTDIR)$(bindir)/arc_summary
-endif
-
-if USING_PYTHON_3
+else
 dist_bin_SCRIPTS = arc_summary3
 install-exec-hook:
        mv $(DESTDIR)$(bindir)/arc_summary3 $(DESTDIR)$(bindir)/arc_summary