Skip to content

Commit 8cf1283

Browse files
eli-schwartzscop
authored andcommitted
build(pkgutil): don't install on non-Solaris platforms
In commit 0e3a17d, a short-circuit was added that causes the completion to return 1 if the host OS is not solaris. On Gentoo, this triggers a warning: ``` * QA Notice: Problems with installed bash completions were found: * * pkgutil: does not define any completions (failed to source?). * * For more details on installing bash-completions, please see: * https://wiki.gentoo.org/wiki/Bash/Installing_completion_files ``` The purpose of the check is to find broken completions that need to be fixed by their respective upstreams, and in this case the completion is "intentionally broken". It seems straightforward to respect that at an earlier level, which both avoids the QA check and ensures that unneeded files don't get installed on any distro. And... it also means that macOS users can ship their own pkgutil completion without worrying about file clashes with the bash-completion project. The entire reason for the short-circuit was because there's a *different* pkgutil there. Fixes: 0e3a17d
1 parent 165bd32 commit 8cf1283

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

completions/Makefile.am

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,6 @@ bashcomp_DATA = 2to3 \
328328
pkgadd \
329329
pkgrm \
330330
pkgtool \
331-
pkgutil \
332331
plague-client \
333332
pm-hibernate \
334333
pm-is-supported \
@@ -503,6 +502,11 @@ bashcomp_DATA = 2to3 \
503502
zopfli \
504503
zopflipng
505504

505+
506+
if SOLARIS
507+
bashcomp_DATA += pkgutil
508+
endif
509+
506510
EXTRA_DIST = $(bashcomp_DATA)
507511

508512
CLEANFILES = \

configure.ac

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,17 @@ AC_ARG_WITH([pytest],[ --with-pytest=executable],[PYTEST="$withval"])
1111
if test "x$PYTEST" = x; then
1212
AC_CHECK_PROGS([PYTEST],[pytest pytest-3],[pytest])
1313
fi
14+
15+
AC_CANONICAL_HOST
16+
17+
build_solaris=
18+
case ${host_os} in
19+
*solaris*)
20+
build_solaris=yes ;;
21+
esac
22+
23+
AM_CONDITIONAL([SOLARIS], [test "${build_solaris}" = yes])
24+
1425
AC_CONFIG_FILES([
1526
Makefile
1627
completions/Makefile

0 commit comments

Comments
 (0)