[2018-02-26 09:05] Antoine Beaupre <anar...@debian.org>
> part       text/plain                1568
> Package: gitlint
> Version: 0.9.0-2
> Severity: important
> 
> The hook installed with `gitlint install-hook` fails completely when
> called through a commit:
> 
> gitlint: checking commit message...
> /usr/bin/python: No module named gitlint

Dear maintainer, I prepared patch that fix this issue.

If you do not object, I will NMU it in a week or so.

diff -Nru gitlint-0.9.0/debian/changelog gitlint-0.9.0/debian/changelog
--- gitlint-0.9.0/debian/changelog      2018-02-18 21:48:41.000000000 +0000
+++ gitlint-0.9.0/debian/changelog      2018-11-25 18:57:11.000000000 +0000
@@ -1,3 +1,10 @@
+gitlint (0.9.0-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Make sure gitlint is correctly called from commit hook (Closes: #891538)
+
+ -- Dmitry Bogatov <kact...@debian.org>  Sun, 25 Nov 2018 18:57:11 +0000
+
 gitlint (0.9.0-2) unstable; urgency=medium
 
   * Add missing dependency python3-sh (Closes: #887789)
diff -Nru gitlint-0.9.0/debian/patches/Fix-gitlint-invocation-in-git-hook 
gitlint-0.9.0/debian/patches/Fix-gitlint-invocation-in-git-hook
--- gitlint-0.9.0/debian/patches/Fix-gitlint-invocation-in-git-hook     
1970-01-01 00:00:00.000000000 +0000
+++ gitlint-0.9.0/debian/patches/Fix-gitlint-invocation-in-git-hook     
2018-11-25 18:57:11.000000000 +0000
@@ -0,0 +1,15 @@
+Description: Make sure gitlint is correctly called from commit hook
+Author: Dmitry Bogatov <kact...@debian.org>
+Bug-Debian: https://bugs.debian.org/891538
+
+--- gitlint-0.9.0.orig/gitlint/files/commit-msg
++++ gitlint-0.9.0/gitlint/files/commit-msg
+@@ -26,7 +26,7 @@ fi
+ 
+ run_gitlint(){
+    echo "gitlint: checking commit message..."
+-   cat "$1" | python -m gitlint.cli
++   cat "$1" | python3
+    gitlint_exit_code=$?
+ }
+ 
diff -Nru gitlint-0.9.0/debian/patches/series 
gitlint-0.9.0/debian/patches/series
--- gitlint-0.9.0/debian/patches/series 2018-02-18 21:48:41.000000000 +0000
+++ gitlint-0.9.0/debian/patches/series 2018-11-25 18:57:11.000000000 +0000
@@ -2,3 +2,4 @@
 0002-Change-get_sample-and-get_expected-to-context.patch
 0003-Fix-regexp-matching-in-tests.patch
 0004-Remove-duplicate-line.patch
+Fix-gitlint-invocation-in-git-hook

Reply via email to