[SCM] UNNAMED PROJECT branch, master, updated. 0.30-33-gba02732

Niels Thykier nthykier-guest at alioth.debian.org
Mon Jul 5 07:40:36 UTC 2010


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "UNNAMED PROJECT".

The branch, master has been updated
       via  ba02732b307658b87597fefbbcc14d7a86a1a68d (commit)
      from  668363777e13c68c4c2e880bde51f1cb6c52e4f1 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit ba02732b307658b87597fefbbcc14d7a86a1a68d
Author: Niels Thykier <niels at thykier.net>
Date:   Mon Jul 5 09:39:58 2010 +0200

    Fixed whitespace and made the new manifest deflated.

-----------------------------------------------------------------------

Summary of changes:
 jh_manifest |   74 ++++++++++++++++++++++++++++++----------------------------
 1 files changed, 38 insertions(+), 36 deletions(-)

diff --git a/jh_manifest b/jh_manifest
index 3fe4b8e..9b7f20c 100755
--- a/jh_manifest
+++ b/jh_manifest
@@ -104,7 +104,7 @@ if(!$cp && $ENV{'CLASSPATH'}//'' ne ''){
 
 if(@ARGV){
     foreach my $jar (@ARGV){
-	update_jar($jar, undef);
+        update_jar($jar, undef);
     }
     inhibit_log();
     # behave like the old jh_manifest.
@@ -119,23 +119,23 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
     my $err;
     # skip if it does not exist.
     if( ! -d $dir ){
-	verbose_print("Skipping $package - $dir does not exist (or is not a dir).");
-	next;
+        verbose_print("Skipping $package - $dir does not exist (or is not a dir).");
+        next;
     }
     if($man){
-	open(my $mfd, "<", $man) or die("$man: $!");
-	$manifest = parse_manifest_fd($mfd, $man);
-	close($mfd);
+        open(my $mfd, "<", $man) or die("$man: $!");
+        $manifest = parse_manifest_fd($mfd, $man);
+        close($mfd);
     }
     if (defined($dh{EXCLUDE_FIND}) && $dh{EXCLUDE_FIND} ne ''){
-	$find_cmd.=" '!' \\( $dh{EXCLUDE_FIND} \\) -a ";
+        $find_cmd.=" '!' \\( $dh{EXCLUDE_FIND} \\) -a ";
     }
     $find_cmd .= " '!' -type l -a -name '*.jar'";
     verbose_print("$find_cmd");
     open(my $jarfiles, "-|", "$find_cmd") or error("$find_cmd: $!");
     while( my $jar = <$jarfiles> ) {
-	chomp($jar);
-	update_jar($jar, $manifest);
+        chomp($jar);
+        update_jar($jar, $manifest);
     }
     close($jarfiles);
     # Shame on me - using internal subs from Dh_Lib - but it works.
@@ -160,48 +160,50 @@ sub update_jar{
     ($con, $stat) = $zip->contents( 'META-INF/MANIFEST.MF' );
     die("Could not read manifest from $jar ($stat): $!") unless(!defined($stat) or $stat == AZ_OK);
     if(defined($stat)) {
-	verbose_print("Reading manifest from $jar");
-	open(my $fd, "<", \$con) or error("open read string: $!");
-	$manifest = parse_manifest_fd($fd, $jar);
-	close($fd);
+        verbose_print("Reading manifest from $jar");
+        open(my $fd, "<", \$con) or error("open read string: $!");
+        $manifest = parse_manifest_fd($fd, $jar);
+        close($fd);
     } else {
-	verbose_print("$jar does not have a manifest.");
-	$manifest = Debian::Javahelper::Manifest->new();
-	$new_manifest = 1;
+        verbose_print("$jar does not have a manifest.");
+        $manifest = Debian::Javahelper::Manifest->new();
+        $new_manifest = 1;
     }
     if(defined($merge)){
-	$manifest->merge($merge);
-	$dirty = 1;
+        $manifest->merge($merge);
+        $dirty = 1;
     }
     $main = $manifest->get_section(MAIN_SECTION, 1);
     if($cp && (!$envcp || ($main->get_value('Class-Path')//'') eq '')){
-	$main->set_value('Class-Path', $cp);
-	$dirty = 1;
+        $main->set_value('Class-Path', $cp);
+        $dirty = 1;
     }
     if($mcl){
-	$main->set_value('Main-Class', $mcl);
-	$dirty = 1;
+        $main->set_value('Main-Class', $mcl);
+        $dirty = 1;
     }
     if($jvm){
-	$main->set_value('Debian-Java-Home', $jvm);
-	$dirty = 1;
+        $main->set_value('Debian-Java-Home', $jvm);
+        $dirty = 1;
     }
     if($jopt){
-	$main->set_value('Debian-Java-Parameters', $jopt);
-	$dirty = 1;
+        $main->set_value('Debian-Java-Parameters', $jopt);
+        $dirty = 1;
     }
     if($dirty){
-	my $var;
-	open(my $fd, ">", \$var) or error("open write string: $!");
-	write_manifest_fd($manifest, $fd, $jar);
-	close($fd);
-	verbose_print("Updating manifest in $jar");
-	$zip->removeMember( 'META-INF/MANIFEST.MF' ) unless($new_manifest);
-	$zip->addString($var, 'META-INF/MANIFEST.MF');
-	# This on the other hand may fail.
-	$zip->overwrite() == AZ_OK or error("Writing modified jar ($jar) failed: $!");
+        my $var;
+        my $mem;
+        open(my $fd, ">", \$var) or error("open write string: $!");
+        write_manifest_fd($manifest, $fd, $jar);
+        close($fd);
+        verbose_print("Updating manifest in $jar");
+        $zip->removeMember( 'META-INF/MANIFEST.MF' ) unless($new_manifest);
+        $mem = $zip->addString($var, 'META-INF/MANIFEST.MF');
+        $mem->desiredCompressionMethod(COMPRESSION_DEFLATED);
+        # This on the other hand may fail.
+        $zip->overwrite() == AZ_OK or error("Writing modified jar ($jar) failed: $!");
     } else {
-	verbose_print("No update of $jar required.");
+        verbose_print("No update of $jar required.");
     }
     1;
 }


hooks/post-receive
-- 
UNNAMED PROJECT



More information about the pkg-java-commits mailing list