[Pkg-javascript-commits] [npm2deb] 01/02: Check man field is not an array

Praveen Arimbrathodiyil praveen at moszumanska.debian.org
Wed May 10 15:21:23 UTC 2017


This is an automated email from the git hooks/post-receive script.

praveen pushed a commit to branch master
in repository npm2deb.

commit 43b4dabaf3f5e944ee8017256effbcd1dc0f2fb8
Author: Praveen Arimbrathodiyil <praveen at debian.org>
Date:   Wed May 10 20:48:42 2017 +0530

    Check man field is not an array
---
 debian/patches/0005-fix-for-man-array.patch | 29 +++++++++++++++++++++++++++++
 debian/patches/series                       |  1 +
 2 files changed, 30 insertions(+)

diff --git a/debian/patches/0005-fix-for-man-array.patch b/debian/patches/0005-fix-for-man-array.patch
new file mode 100644
index 0000000..7d5aca0
--- /dev/null
+++ b/debian/patches/0005-fix-for-man-array.patch
@@ -0,0 +1,29 @@
+From 0a9f8b01e0fef126a0f350aa0785d56b0a882496 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Lal?= <kapouer at melix.org>
+Date: Fri, 11 Nov 2016 21:27:33 +0100
+Subject: [PATCH] Check man field is not an array
+
+Fixes https://github.com/LeoIannacone/npm2deb/issues/20
+---
+ npm2deb/__init__.py | 10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
+
+--- a/npm2deb/__init__.py
++++ b/npm2deb/__init__.py
+@@ -174,9 +174,13 @@
+                     _os.remove(filename)
+ 
+     def create_manpages(self):
+-        if 'man' in self.json:
+-            content = _os.path.normpath(self.json['man'])
+-            utils.create_debian_file('manpages', content)
++        if not 'man' in self.json:
++            return
++        mans = self.json['man']
++        if not isinstance(mans, (list, tuple)):
++            mans = [mans]
++        paths = [_os.path.normpath(manpath) for manpath in mans]
++        utils.create_debian_file('manpages', "\n".join(paths))
+ 
+     def create_watch(self):
+         args = {}
diff --git a/debian/patches/series b/debian/patches/series
index 0273f40..61bbd2a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@ search-in-experimental.patch
 0002-Add-suggestions-to-improve-the-ITP-report.patch
 0003-hint-ITP.patch
 0004-fix-for-editorconfig.patch
+0005-fix-for-man-array.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/npm2deb.git



More information about the Pkg-javascript-commits mailing list