[SCM] UNNAMED PROJECT branch, master, updated. 0.34-2-g1b90795

Niels Thykier nthykier at alioth.debian.org
Sat May 14 09:02:41 UTC 2011


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  1b9079521b94acb0b5698610c861181b9c6d2b1b (commit)
      from  52baa4d629a133f9763e7c7d485cfdc0735e654a (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 1b9079521b94acb0b5698610c861181b9c6d2b1b
Author: Niels Thykier <niels at thykier.net>
Date:   Sat May 14 10:59:19 2011 +0200

    Made jh_manifest error out on missing jars; improved --no-act

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

Summary of changes:
 debian/changelog |    5 +++++
 jh_manifest      |   47 ++++++++++++++++++++++++++++++++++++-----------
 2 files changed, 41 insertions(+), 11 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index a88054a..a240ea9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,11 @@ javatools (0.35) UNRELEASED; urgency=low
 
   * Made jh_manifest always follow symlinks even if they are passed
     via command line.  (Closes: #626329)
+  * Made jh_manifest fail if there are jar files it cannot find,
+    unless the jar has been excluded.  This may cause packages to
+    FTBFS instead of silently not shipping a jar file.
+    (Closes: #626327)
+  * Improved support for --no-act in jh_manifest.
 
  -- Niels Thykier <niels at thykier.net>  Sat, 14 May 2011 10:35:48 +0200
 
diff --git a/jh_manifest b/jh_manifest
index 2834a73..6d368b2 100755
--- a/jh_manifest
+++ b/jh_manifest
@@ -113,17 +113,31 @@ if(!$cp && ($ENV{'CLASSPATH'}//'') ne ''){
 if(@ARGV){
     my $pkg = $dh{FIRSTPACKAGE};
     my $dir = tmpdir($pkg);
+    verbose_print('Assuming targets exists due to --no-act') if $dh{NO_ACT};
     foreach my $jar (@ARGV){
+        my $orig = $jar;
+        my $target = $jar;
+        my $link = 0;
+        # strip any leading / or ./ - it looks better and it
+        # does not accidentally install a system install jar instead.
+        $target =~ s@^\.?/+@@og;
         # Look for it in $dir if it does not exist directly.
-        $jar = "$dir/$jar" unless -f $jar;
+        $target = "$dir/$target" unless -f $target;
         if ( -l $jar ){
             # Follow links
-            my $dest = Cwd::abs_path($jar);
-            error("Cannot resolve link $jar: $!") unless $dest;
-            $jar = $dest;
+            my $dest = Cwd::abs_path($target);
+            error("Cannot resolve link $target: $!") unless $dest;
+            $target = $dest;
+            $link = 1;
         }
-        error("Cannot update $jar: it does not exist.") unless -f $jar;
-        update_jar($jar, undef);
+        # no-act implies others tools are in no-act mode as well
+        error("Cannot update $jar: it does not exist.") unless -f $jar or !$dh{NO_ACT};
+        if ($link){
+            verbose_print("Updating symlinked $target (via $orig)");
+        } else {
+            verbose_print("Updating $target");
+        }
+        update_jar($jar, undef) unless $dh{NO_ACT};
     }
     inhibit_log();
     # behave like the old jh_manifest.
@@ -180,7 +194,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
         delete($files->{$lp});
         delete($manifests->{$link});
         verbose_print("Updating symlinked $path (using manifest for $link)");
-        update_jar("$path", $manifest);
+        update_jar("$path", $manifest) unless $dh{NO_ACT};
     }
     foreach my $jar (keys(%$files)){
         my $lp = $jar;
@@ -188,11 +202,22 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
         $lp =~ s@^\Q$fulldir\E/*@@;
         $manifest = $manifests->{$lp};
         delete($manifests->{$lp});
-        update_jar("$dir/$lp", $manifest);
+        update_jar("$dir/$lp", $manifest) unless $dh{NO_ACT};
     }
-    foreach my $unused (keys(%$manifests)){
-        # complain - unless it has been ignored of course.
-        warning("No jar in $package matching $unused") unless(excludefile($unused));
+    if (keys(%$manifests) && !$dh{NO_ACT}) {
+        # skip this with no-act, since other tools might be running in no-act
+        # mode as well, so this might be a lot of false-positives.
+        my $count = 0;
+        foreach my $unused (keys(%$manifests)){
+            unless(excludefile($unused)){
+                warning("No jar in $package matching $unused.");
+                $count++;
+            } else {
+                verbose_print("Ignoring unused entry for $unused in $package.");
+            }
+        }
+        # Fail if there is at least one unignored unused manifest.
+        exit 1 if $count;
     }
 }
 


hooks/post-receive
-- 
UNNAMED PROJECT



More information about the pkg-java-commits mailing list