[SCM] UNNAMED PROJECT branch, policy-dc10, updated. 0.31-42-g116c34b
Niels Thykier
nthykier-guest at alioth.debian.org
Thu Sep 30 15:01:35 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, policy-dc10 has been updated
via 116c34b6130fdc5f42bd3ac8ede1ce043cde0076 (commit)
from fcfda69b7e116b0575cb7644da072be9ca8748b0 (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 116c34b6130fdc5f42bd3ac8ede1ce043cde0076
Author: Niels Thykier <niels at thykier.net>
Date: Thu Sep 30 17:00:37 2010 +0200
Use a defined value as return value for find_inc.
-----------------------------------------------------------------------
Summary of changes:
jh_manifest | 55 ++++++++++++++++++++++++++++++++++---------------------
1 files changed, 34 insertions(+), 21 deletions(-)
diff --git a/jh_manifest b/jh_manifest
index cd003c1..92dee0c 100755
--- a/jh_manifest
+++ b/jh_manifest
@@ -292,32 +292,45 @@ sub resolve_link{
return $target;
}
+sub find_inc{
+ my $jar = shift;
+ my $path = $jar;
+ $path =~ s@/[^/]+$@@og;
+ foreach my $inc (@incdir){
+ if($path =~ m/$inc$/){
+ return $inc;
+ }
+ }
+ return '';
+}
+
sub rewrite_classpath{
my $jar = shift;
my $cp = shift;
- my $target;
- my $rel = 0;
if( -e $cp ){
+ # Only rewrite if it is a public library.
+ return $cp unless(find_inc($cp));
+ # Absolute system installed library
return resolve_link($jar, $cp);
- }
- foreach my $inc (@incdir){
- if( -e "$inc/$cp" ){
- return resolve_link($jar, $cp, $inc);
- }
- }
- # $cp definitely do not point to a system installed library
- # but it could point to a library in a package we are currently working with. if( -e $cp || -e "/usr/share/java/$cp" ){
- foreach my $pkg (@packages){
- my $ptmpdir = tmpdir($pkg);
- # Skip if it does not exists
- next unless( -d $ptmpdir );
- $ptmpdir = Cwd::abs_path($ptmpdir) or error("Cannot resolve the path to the tempdir of $pkg,");
- if( -e "$ptmpdir/$cp"){
- return resolve_link($jar, $cp, '', $ptmpdir);
- }
- foreach my $inc (@incdir){
- if( -e "$ptmpdir/$inc/$cp" ){
- return resolve_link($jar, $cp, $inc, $ptmpdir);
+ } else {
+ my $reldir = find_inc($jar);
+ if( $reldir && -e "$reldir/$cp" ){
+ return resolve_link($jar, $cp, $reldir);
+ } else {
+ # $cp definitely do not point to a system installed library
+ # but it could point to a library in a package we are currently working with.
+ foreach my $pkg (@packages){
+ my $ptmpdir = tmpdir($pkg);
+ # Skip if it does not exists
+ next unless( -d $ptmpdir );
+ $ptmpdir = Cwd::abs_path($ptmpdir) or error("Cannot resolve the path to the tempdir of $pkg,");
+ if( -e "$ptmpdir/$cp"){
+ return $cp unless(find_inc("$ptmpdir/$cp"));
+ return resolve_link($jar, $cp, '', $ptmpdir);
+ }
+ if( $reldir && -e "$ptmpdir/$reldir/$cp" ){
+ return resolve_link($jar, $cp, $reldir, $ptmpdir);
+ }
}
}
}
hooks/post-receive
--
UNNAMED PROJECT
More information about the pkg-java-commits
mailing list