File: 0006-Provide-custom-bash-completion-directory-fallback.patch

package info (click to toggle)
dnf 4.24.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 11,820 kB
  • sloc: python: 27,723; xml: 771; sh: 131; makefile: 35
file content (31 lines) | stat: -rw-r--r-- 1,229 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
From d01057244891d6d858466b7ae46ce346af19dacc Mon Sep 17 00:00:00 2001
From: Mihai Moldovan <ionic@ionic.de>
Date: Sat, 10 Oct 2020 11:49:55 +0200
Subject: [PATCH] Provide custom bash-completion directory fallback.

Older distro versions (like stretch) don't have a bash-completion cmake config
file, so findpackage() won't work correctly.

That's not an issue for more recent versions (buster and up) because they do
provide the needed files, but let's allow specifying a custom path for the
older ones.
---
 etc/bash_completion.d/CMakeLists.txt | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/etc/bash_completion.d/CMakeLists.txt b/etc/bash_completion.d/CMakeLists.txt
index be813103..d8317be3 100644
--- a/etc/bash_completion.d/CMakeLists.txt
+++ b/etc/bash_completion.d/CMakeLists.txt
@@ -2,6 +2,8 @@ find_package(bash-completion QUIET)
 if(NOT BASH_COMPLETION_COMPLETIONSDIR)
     if(BASH_COMPLETION_COMPATDIR)
         set(BASH_COMPLETION_COMPLETIONSDIR ${BASH_COMPLETION_COMPATDIR})
+    elseif(BASH_COMPLETION_FALLBACKDIR)
+        set(BASH_COMPLETION_COMPLETIONSDIR ${BASH_COMPLETION_FALLBACKDIR})
     else()
         set(BASH_COMPLETION_COMPLETIONSDIR "${SYSCONFDIR}/bash_completion.d")
     endif()
-- 
2.26.2