[maven-repo-helper] 01/02: Fixed the 'mh_install -i' error when building arch indep packages (Closes: #805228)

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Wed Jul 20 22:21:11 UTC 2016


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

ebourg-guest pushed a commit to branch master
in repository maven-repo-helper.

commit 86615a1f47685293167f6f37bc33c58aeaaf4af3
Author: Emmanuel Bourg <ebourg at apache.org>
Date:   Thu Jul 21 00:01:50 2016 +0200

    Fixed the 'mh_install -i' error when building arch indep packages (Closes: #805228)
---
 debian/changelog                                    |  8 ++++++++
 src/main/java/org/debian/maven/repo/POMCleaner.java | 10 ++++------
 src/main/share/mh_lib.sh                            |  2 ++
 3 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 66abe19..d5bc558 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+maven-repo-helper (1.9.2) UNRELEASED; urgency=medium
+
+  * Team upload.
+  * Fixed the error caused by the -i option added to mh_install by DH
+    when building the architecture independent packages only (Closes: #805228)
+
+ -- Emmanuel Bourg <ebourg at apache.org>  Wed, 20 Jul 2016 23:25:39 +0200
+
 maven-repo-helper (1.9.1) unstable; urgency=medium
 
   * Added the debian.package property in the relocated poms
diff --git a/src/main/java/org/debian/maven/repo/POMCleaner.java b/src/main/java/org/debian/maven/repo/POMCleaner.java
index 879ab95..9a3f3af 100644
--- a/src/main/java/org/debian/maven/repo/POMCleaner.java
+++ b/src/main/java/org/debian/maven/repo/POMCleaner.java
@@ -316,12 +316,10 @@ public class POMCleaner extends POMTransformer {
                 publishedRulesExtra.add(arg.substring(2));
             } else if (arg.startsWith("--extra-published-rule=")) {
                 publishedRulesExtra.add(arg.substring("--extra-published-rule=".length()));
-            } else if (arg.startsWith("-i") || arg.startsWith("--ignore-rules=")) {
-                if (arg.startsWith("-i")) {
-                    ignoreRulesFiles.add(new File(arg.substring(2)));
-                } else {
-                    ignoreRulesFiles.add(new File(arg.substring("--ignore-rules=".length())));
-                }
+            } else if (arg.startsWith("-i") && arg.length() > 2) {
+                ignoreRulesFiles.add(new File(arg.substring(2)));
+            } else if (arg.startsWith("--ignore-rules=")) {
+                ignoreRulesFiles.add(new File(arg.substring("--ignore-rules=".length())));
             } else if (arg.startsWith("-I")) {
                 ignoreRulesExtra.add(arg.substring(2));
             } else if (arg.startsWith("--extra-ignore-rule=")) {
diff --git a/src/main/share/mh_lib.sh b/src/main/share/mh_lib.sh
index 86ca362..4cb5a0d 100644
--- a/src/main/share/mh_lib.sh
+++ b/src/main/share/mh_lib.sh
@@ -21,6 +21,8 @@ parseargs()
          exit 0
       elif [ "-h" = "$1" ] || [ "--help" = "$1" ]; then
          syntax
+      elif [ "-i" = "$1" ]; then
+         : # skip -i options passed by dh when 'dpkg-buildpackage -A' is called
       elif [ "-" = "${1:1:1}" ]; then
       # long opt
          optn=$(echo "$1" | sed -n 's/^--\([^=]*\)\(=.*\)*$/\1/p' | sed 's/-/_/g')

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/maven-repo-helper.git



More information about the pkg-java-commits mailing list