[Git][java-team/javatools][master] jh_linkjars: Fix bug with multiple dep fields and newlines

Niels Thykier gitlab at salsa.debian.org
Sat Sep 22 07:35:33 BST 2018


Niels Thykier pushed to branch master at Debian Java Maintainers / javatools


Commits:
a87bc535 by Niels Thykier at 2018-09-22T06:31:29Z
jh_linkjars: Fix bug with multiple dep fields and newlines

Signed-off-by: Niels Thykier <niels at thykier.net>

- - - - -


2 changed files:

- debian/changelog
- jh_linkjars


Changes:

=====================================
debian/changelog
=====================================
@@ -1,6 +1,8 @@
 javatools (0.67) UNRELEASED; urgency=medium
 
   * jh_installibs: Fix error when jar file symlink already exist.
+  * jh_linkjars: Handle multiple dependency fields and newlines in
+    them more gracefully.
 
  -- Niels Thykier <niels at thykier.net>  Fri, 21 Sep 2018 16:02:23 +0000
 


=====================================
jh_linkjars
=====================================
@@ -73,11 +73,13 @@ init(options => {
 sub parse_deps_fields {
     my ($field) = @_;
     my @packages;
-    $field =~ s/^\s++//;
-    $field =~ s/\s++$//;
+    $field =~ s/\r?\n/,/g;
+    $field =~ s/^\s*+,?//;
+    $field =~ s/,?\s*+$//;
     for my $clause (split(m/\s*+[,|]\s*+/, $field)) {
+        next if $clause =~ m/^\s*$/;
         # Drop everything after [, ( or <.
-        $clause =~ s/\s*+[\(\[\<].*$//;
+        $clause =~ s/\s*+[[<(].*$//;
         push(@packages, $clause);
     }
     return @packages;



View it on GitLab: https://salsa.debian.org/java-team/javatools/commit/a87bc535da1dcba04e0e5fdca524e00c43de3efe

-- 
View it on GitLab: https://salsa.debian.org/java-team/javatools/commit/a87bc535da1dcba04e0e5fdca524e00c43de3efe
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20180922/c9e1a995/attachment.html>


More information about the pkg-java-commits mailing list