nixpkgs/pkgs/tools/audio/beets/bash-completion-always-print.patch
Bernardo Meurer 0faf72a557 beets: 1.4.9 -> unstable-2020-12-22
The maintainer has stopped cutting releases[1]. Since the last release,
1.4.9, includes a dependency that is filled with hate speech[2] it's all
the more reason to package the unstable version and eliminate that
requirement.

Moreover a number of fixes, improvements, and features have landed
since.

[1]: https://github.com/beetbox/beets/issues/3625
[2]: https://github.com/NixOS/nixpkgs/pull/90504

Co-authored-by: Doron Behar <doron.behar@gmail.com>
2021-01-03 14:36:53 +02:00

44 lines
1.7 KiB
Diff

diff --git i/beets/ui/commands.py w/beets/ui/commands.py
index 4d010f4b..0b023585 100755
--- i/beets/ui/commands.py
+++ w/beets/ui/commands.py
@@ -1741,20 +1741,6 @@ default_commands.append(config_cmd)
def print_completion(*args):
for line in completion_script(default_commands + plugins.commands()):
print_(line, end=u'')
- if not any(map(os.path.isfile, BASH_COMPLETION_PATHS)):
- log.warning(u'Warning: Unable to find the bash-completion package. '
- u'Command line completion might not work.')
-
-BASH_COMPLETION_PATHS = map(syspath, [
- u'/etc/bash_completion',
- u'/usr/share/bash-completion/bash_completion',
- u'/usr/local/share/bash-completion/bash_completion',
- # SmartOS
- u'/opt/local/share/bash-completion/bash_completion',
- # Homebrew (before bash-completion2)
- u'/usr/local/etc/bash_completion',
-])
-
def completion_script(commands):
"""Yield the full completion shell script as strings.
diff --git i/test/test_ui.py w/test/test_ui.py
index 5cfed1fd..9d3dc458 100644
--- i/test/test_ui.py
+++ w/test/test_ui.py
@@ -1230,12 +1230,7 @@ class CompletionTest(_common.TestCase, TestHelper):
stdout=subprocess.PIPE, env=env)
# Load bash_completion library.
- for path in commands.BASH_COMPLETION_PATHS:
- if os.path.exists(util.syspath(path)):
- bash_completion = path
- break
- else:
- self.skipTest(u'bash-completion script not found')
+ self.skipTest(u'bash-completion script not found')
try:
with open(util.syspath(bash_completion), 'rb') as f:
tester.stdin.writelines(f)