[bnd] 01/02: Sort the package lists to improve the reproducibility

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Tue Aug 30 13:40:50 UTC 2016


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

ebourg-guest pushed a commit to branch master
in repository bnd.

commit fe37b4e04c9815b9c420d00852e772c76f241a3c
Author: Emmanuel Bourg <ebourg at apache.org>
Date:   Tue Aug 30 15:37:44 2016 +0200

    Sort the package lists to improve the reproducibility
---
 debian/changelog                                |  2 ++
 debian/patches/reproducible-packages-list.patch | 38 +++++++++++++++++++++++++
 debian/patches/series                           |  1 +
 3 files changed, 41 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index dbe7c30..1b6f81a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,8 @@ bnd (2.4.1-5) UNRELEASED; urgency=medium
 
   * Team upload.
   * Removed the build dependency on libswt-gtk-3-java
+  * Reproducibility improvements:
+    - Sort the package lists generated by bnd (as in the Export-Package field)
 
  -- Emmanuel Bourg <ebourg at apache.org>  Mon, 01 Aug 2016 22:20:22 +0200
 
diff --git a/debian/patches/reproducible-packages-list.patch b/debian/patches/reproducible-packages-list.patch
new file mode 100644
index 0000000..1f08773
--- /dev/null
+++ b/debian/patches/reproducible-packages-list.patch
@@ -0,0 +1,38 @@
+Description: Sort the package lists to improve the reproducibility
+Author: Emmanuel Bourg <ebourg at apache.org>
+Forwarded: no
+--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/Packages.java
++++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/Packages.java
+@@ -6,12 +6,12 @@
+ import aQute.bnd.osgi.Descriptors.PackageRef;
+ 
+ public class Packages implements Map<PackageRef,Attrs> {
+-	private LinkedHashMap<PackageRef,Attrs>	map;
++	private TreeMap<PackageRef,Attrs>	map;
+ 	static Map<PackageRef,Attrs>			EMPTY	= Collections.emptyMap();
+ 
+ 	public Packages(Packages other) {
+ 		if (other.map != null) {
+-			map = new LinkedHashMap<Descriptors.PackageRef,Attrs>(other.map);
++			map = new TreeMap<Descriptors.PackageRef,Attrs>(other.map);
+ 		}
+ 	}
+ 
+@@ -100,7 +100,7 @@
+ 
+ 	public Attrs put(PackageRef key, Attrs value) {
+ 		if (map == null)
+-			map = new LinkedHashMap<PackageRef,Attrs>();
++			map = new TreeMap<PackageRef,Attrs>();
+ 
+ 		return map.put(key, value);
+ 	}
+@@ -109,7 +109,7 @@
+ 		if (this.map == null) {
+ 			if (map.isEmpty())
+ 				return;
+-			this.map = new LinkedHashMap<PackageRef,Attrs>();
++			this.map = new TreeMap<PackageRef,Attrs>();
+ 		}
+ 		this.map.putAll(map);
+ 	}
diff --git a/debian/patches/series b/debian/patches/series
index 8d71617..63b0db0 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -11,3 +11,4 @@ gradle-compatibility.patch
 use-bootstrapped-gradle-plugin.patch
 remove-recursion-in-macro-warning.patch
 reproducible-timestamps.patch
+reproducible-packages-list.patch

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



More information about the pkg-java-commits mailing list