[Git][java-team/eclipse-debian-helper][master] 4 commits: Standards-Version updated to 4.6.1

Emmanuel Bourg (@ebourg) gitlab at salsa.debian.org
Mon Dec 12 11:27:20 GMT 2022



Emmanuel Bourg pushed to branch master at Debian Java Maintainers / eclipse-debian-helper


Commits:
ccb818c4 by Emmanuel Bourg at 2022-12-12T12:25:27+01:00
Standards-Version updated to 4.6.1

- - - - -
b71251fb by Emmanuel Bourg at 2022-12-12T12:25:45+01:00
Support multiple bundles directories

- - - - -
96c2ffad by Emmanuel Bourg at 2022-12-12T12:25:47+01:00
Fixed some typos

- - - - -
450c82a0 by Emmanuel Bourg at 2022-12-12T12:25:47+01:00
Upload to unstable

- - - - -


3 changed files:

- debian/changelog
- debian/control
- src/perl/eclipse_bundles.pm


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+eclipse-debian-helper (1.9) unstable; urgency=medium
+
+  * Support multiple bundles directories
+  * Standards-Version updated to 4.6.1
+
+ -- Emmanuel Bourg <ebourg at apache.org>  Mon, 12 Dec 2022 11:55:33 +0100
+
 eclipse-debian-helper (1.8) unstable; urgency=medium
 
   * Do not return an error if bundle.properties is missing at the install phase
@@ -29,14 +36,14 @@ eclipse-debian-helper (1.5) unstable; urgency=medium
 eclipse-debian-helper (1.4) unstable; urgency=medium
 
   * Team upload.
-  * Support other bundle dirrectories than 'bundles' and the base directory
+  * Support other bundle directories than 'bundles' and the base directory
 
  -- Jochen Sprickerhof <jspricke at debian.org>  Fri, 19 Oct 2018 13:13:21 +0200
 
 eclipse-debian-helper (1.3) unstable; urgency=medium
 
   * Add a symlink in /usr/lib/eclipse/plugins/ when installing a plugin
-  * New parameter to set the shortname of a bundle
+  * New parameter to set the short name of a bundle
 
  -- Emmanuel Bourg <ebourg at apache.org>  Fri, 28 Sep 2018 00:21:02 +0200
 


=====================================
debian/control
=====================================
@@ -4,7 +4,7 @@ Priority: optional
 Maintainer: Debian Java Maintainers <pkg-java-maintainers at lists.alioth.debian.org>
 Uploaders: Emmanuel Bourg <ebourg at apache.org>
 Build-Depends: debhelper-compat (= 13),
-Standards-Version: 4.5.0
+Standards-Version: 4.6.1
 Vcs-Git: https://salsa.debian.org/java-team/eclipse-debian-helper.git
 Vcs-Browser: https://salsa.debian.org/java-team/eclipse-debian-helper
 Homepage: https://salsa.debian.org/java-team/eclipse-debian-helper


=====================================
src/perl/eclipse_bundles.pm
=====================================
@@ -29,17 +29,35 @@ sub new {
 	chomp $bundles;
 	@{$this->{bundles}} = split(/ /, $bundles);
 
-	if (-d "$this->{bundles}[0]") {
-		$this->{bundledir} = ".";
-	} elsif (-d "bundles/$this->{bundles}[0]") {
-		$this->{bundledir} = "bundles";
-	} else {
-		die "Couldn't locate the base directory of the bundles";
+	# Locate the bundle directories
+	@{$this->{bundledirs}} = getBundleDirectories($this);
+	if (scalar @{$this->{bundledirs}} == 0) {
+		die "WARNING: Couldn't locate the base directory of the bundles";
 	}
 
 	return $this;
 }
 
+#
+# Locates the directories containing at least one of the bundles defined
+# in debian/bundles.
+#
+sub getBundleDirectories {
+	my $this = $_[0];
+	my %bundledirs = ();
+	my @directories = `find . -maxdepth 2 -type d -printf '%P\n' | sort`;
+	for my $directory (@directories) {
+	chomp($directory);
+		for my $bundle (@{$this->{bundles}}) {
+			my $bundledir = $this->get_sourcepath($directory . "/" . $bundle);
+			if ( -d $bundledir ) {
+				$bundledirs{$directory} = "";
+			}
+		}
+	}
+	return sort keys %bundledirs;
+}
+
 sub build {
 	my $this=shift;
 	my $d_ant_prop = $this->get_sourcepath('debian/ant.properties');
@@ -48,8 +66,10 @@ sub build {
 		push(@args, '-propertyfile', $d_ant_prop);
 	}
 
+	my @bundledirs = @{$this->{bundledirs}};
+
 	push(@args, "-Dbasedir", ".");
-	push(@args, "-Dbundledir", $this->{bundledir});
+	push(@args, "-Dbundledir", $bundledirs[0]);
 	push(@args, "-f", "debian/build.xml");
 	for my $bundle (@{$this->{bundles}}) {
 		push(@args, basename($bundle));
@@ -100,8 +120,10 @@ sub clean {
 	my $this=shift;
 
 	$this->doit_in_builddir("rm", "-Rf", "debian/bundles.properties");
-	for my $bundle (@{$this->{bundles}}) {
-		$this->doit_in_builddir("rm", "-Rf", "$this->{bundledir}/$bundle/target");
+	for my $bundledir (@{$this->{bundledirs}}) {
+		for my $bundle (@{$this->{bundles}}) {
+			$this->doit_in_builddir("rm", "-Rf", "$bundledir/$bundle/target");
+		}
 	}
 
 	$this->doit_in_builddir("mh_clean");



View it on GitLab: https://salsa.debian.org/java-team/eclipse-debian-helper/-/compare/f22944ba31e6da16fe0989f6a9b9488533e35871...450c82a0032dc8c0490a3f5b92ed80d4df21b3fa

-- 
View it on GitLab: https://salsa.debian.org/java-team/eclipse-debian-helper/-/compare/f22944ba31e6da16fe0989f6a9b9488533e35871...450c82a0032dc8c0490a3f5b92ed80d4df21b3fa
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/20221212/7429dca8/attachment.htm>


More information about the pkg-java-commits mailing list