Package: timewarrior
Version: 1.2.0-1
Severity: normal
Tags: patch

Hi,

bash completion doesn't work, because the completion script is installed
in /usr/share/bash-completion/ instead of
/usr/share/bash-completion/completions/.

It would probably be better to use dh_bash-completion.

Please find a patch attached :)

(note that it will trigger a lintian warning, I'm disscussing this in
https://salsa.debian.org/lintian/lintian/merge_requests/292).

Cheers,

nodens

-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.4.0-3-amd64 (SMP w/4 CPU cores)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=fr_FR.utf8, LC_CTYPE=fr_FR.utf8 (charmap=UTF-8), 
LANGUAGE=fr_FR.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages timewarrior depends on:
ii  libc6                2.29-10
ii  libgcc-s1 [libgcc1]  10-20200211-1
ii  libgcc1              1:10-20200211-1
ii  libstdc++6           10-20200211-1

Versions of packages timewarrior recommends:
ii  taskwarrior  2.5.1+dfsg-8

Versions of packages timewarrior suggests:
ii  python  2.7.17-2

-- no debconf information
>From 3a78ef9487e71705e4641789a9d04a90e28a1711 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cl=C3=A9ment=20Hermann?= <nod...@debian.org>
Date: Fri, 14 Feb 2020 17:24:27 +0100
Subject: [PATCH] Fix bash-completion installation path

- removes dh-auto-install override
- adds --with-bash-completion to dh call
--adds d/timewarrior.bash-completion control file
- adds bash-completion to build-depends
---
 debian/control                     | 2 +-
 debian/rules                       | 7 +------
 debian/timewarrior.bash-completion | 1 +
 3 files changed, 3 insertions(+), 7 deletions(-)
 create mode 100644 debian/timewarrior.bash-completion

diff --git a/debian/control b/debian/control
index 5984306..f30e6ba 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,7 @@ Section: utils
 Priority: optional
 Maintainer: Debian Tasktools Packaging Team <taskdeb-disc...@nongnu.org>
 Uploaders: Gordon Ball <gor...@chronitis.net>
-Build-Depends: debhelper-compat (= 12), cmake, git, python
+Build-Depends: debhelper-compat (= 12), cmake, git, python, bash-completion
 Standards-Version: 4.4.1
 Homepage: https://timewarrior.net/
 Vcs-Browser: https://salsa.debian.org/tasktools-team/timew
diff --git a/debian/rules b/debian/rules
index 02f9548..611059d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -6,17 +6,12 @@ TAG_VERSION := $(shell echo $(DEB_VERSION_UPSTREAM) | tr '~' 
'.' | sed -e 's/+[d
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 
 %:
-       dh $@
+       dh $@ --with bash-completion
 
 override_dh_auto_configure:
        find . -type f -exec sed -i '1s|^#!/usr/bin/env 
python|#!/usr/bin/python|' {} \;
        dh_auto_configure
 
-override_dh_auto_install:
-       dh_auto_install
-       mkdir -p debian/timewarrior/usr/share/bash-completion
-       cp completion/timew-completion.bash 
debian/timewarrior/usr/share/bash-completion/timew
-
 override_dh_installchangelogs:
        dh_installchangelogs -k ChangeLog
 
diff --git a/debian/timewarrior.bash-completion 
b/debian/timewarrior.bash-completion
new file mode 100644
index 0000000..5f2d031
--- /dev/null
+++ b/debian/timewarrior.bash-completion
@@ -0,0 +1 @@
+completion/timew-completion.bash timew
-- 
2.25.0

Reply via email to