[Pkg-javascript-commits] [npm2deb] 01/02: fix lex-parser crash
Praveen Arimbrathodiyil
praveen at moszumanska.debian.org
Sat Oct 29 08:57:59 UTC 2016
This is an automated email from the git hooks/post-receive script.
praveen pushed a commit to branch master
in repository npm2deb.
commit 2ca5a527d401220548c2144864d91b4ccf722640
Author: Praveen Arimbrathodiyil <praveen at debian.org>
Date: Sat Oct 29 13:41:02 2016 +0530
fix lex-parser crash
---
debian/changelog | 10 ++++++----
debian/patches/0003-fix-crash.patch | 26 ++++++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 33 insertions(+), 4 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 0ea4283..5045fed 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,13 +1,15 @@
-npm2deb (0.2.5-2) UNRELEASED; urgency=medium
+npm2deb (0.2.5-3) UNRELEASED; urgency=medium
* Team upload
- * Use rmadison for finding existing packages.
- Thanks to Shanavas M (Closes: #836182)
* Update minimum version of node-github-url-from-git
(for #840929)
+
+ [ Shanavas M ]
+ * Use rmadison for finding existing packages (Closes: #836182)
* Convert package names to lower case (Closes: #840226)
+ * Fix crash when url is invalid (Closes: #840169)
- -- Pirate Praveen <praveen at debian.org> Thu, 27 Oct 2016 22:02:48 +0530
+ -- Pirate Praveen <praveen at debian.org> Sat, 29 Oct 2016 13:39:33 +0530
npm2deb (0.2.5-1) unstable; urgency=medium
diff --git a/debian/patches/0003-fix-crash.patch b/debian/patches/0003-fix-crash.patch
new file mode 100644
index 0000000..960e6f4
--- /dev/null
+++ b/debian/patches/0003-fix-crash.patch
@@ -0,0 +1,26 @@
+Description: don't crash for invalid url
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=840169
+
+diff --git a/npm2deb/__init__.py b/npm2deb/__init__.py
+index 1eabf0b..473d6a6 100644
+--- a/npm2deb/__init__.py
++++ b/npm2deb/__init__.py
+@@ -412,13 +412,17 @@ class Npm2Deb(object):
+
+ def _get_json_repo_url(self):
+ result = 'FIX_ME repo url'
++ url = None
+ if 'repository' in self.json:
+ repository = self.json['repository']
+ if isinstance(repository, str):
+ url = repository
+ elif isinstance(repository, dict) and 'url' in repository:
+ url = repository['url']
+- if url.startswith('git') or (isinstance(repository, dict) and
++
++ if not url:
++ pass # repository field is not in expected format
++ elif url.startswith('git') or (isinstance(repository, dict) and
+ 'type' in repository and
+ repository['type'] == 'git'):
+ if url.find('github') >= 0:
diff --git a/debian/patches/series b/debian/patches/series
index 7995fd0..cddfa54 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
0001-use-rmadison.patch
0002-convert-to-lowercase.patch
+0003-fix-crash.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