[SCM] UNNAMED PROJECT branch, master, updated. 0.43-9-g7b6ab0b
Niels Thykier
niels at thykier.net
Thu Apr 25 18:54:48 UTC 2013
The following commit has been merged in the master branch:
commit 7b6ab0b5b520bbbe07edcd0b88dc38fd4467b176
Author: Niels Thykier <niels at thykier.net>
Date: Thu Apr 25 20:54:23 2013 +0200
Use space instead of tab in Perl scripts
Signed-off-by: Niels Thykier <niels at thykier.net>
diff --git a/jh_compilefeatures b/jh_compilefeatures
index 7bd05ea..02b0936 100755
--- a/jh_compilefeatures
+++ b/jh_compilefeatures
@@ -183,15 +183,15 @@ sub compile{
my @args = ();
my @deps = ();
DEP_LOOP: foreach my $d (@_){
- # Check if we just built this feature.
- foreach my $s (q{}, '.zip', '.ZIP') {
- my $zip = "$pdebdir/$d$s";
- if( -e $zip ){
- install_zipped_feature($zip, "$pdebdir/build/SDK");
- next DEP_LOOP;
- }
- }
- push(@deps, $d);
+ # Check if we just built this feature.
+ foreach my $s (q{}, '.zip', '.ZIP') {
+ my $zip = "$pdebdir/$d$s";
+ if( -e $zip ){
+ install_zipped_feature($zip, "$pdebdir/build/SDK");
+ next DEP_LOOP;
+ }
+ }
+ push(@deps, $d);
}
push(@args, '-o', escape_shell($orbitdir)) if(defined($orbitdir) && -d $orbitdir);
push(@args, '-j', escape_shell($jvmargs)) if($jvmargs ne q{});
diff --git a/jh_generateorbitdir b/jh_generateorbitdir
index c2a705e..987f490 100755
--- a/jh_generateorbitdir
+++ b/jh_generateorbitdir
@@ -112,18 +112,18 @@ foreach my $jar (find_jars(@orbitdeps)){
error("$jar did not have any OSGi metadata")
unless(defined($symName) && defined($version));
if( -l "$orbitdir/${symName}_${version}.jar"){
- my $ltarget = readlink("$orbitdir/${symName}_${version}.jar");
- if(defined($ltarget)){
- #Use target
- print {$orbit_fd} "$ltarget, $symName, $version\n"
+ my $ltarget = readlink("$orbitdir/${symName}_${version}.jar");
+ if(defined($ltarget)){
+ #Use target
+ print {$orbit_fd} "$ltarget, $symName, $version\n"
unless($dh{NO_ACT});
- } else {
- warning('Cannot determine target of ' .
+ } else {
+ warning('Cannot determine target of ' .
"$orbitdir/${symName}_${version}.jar; jh_installeclipse " .
'will not be able to replace this post-install.' );
- }
- # skip if already linked
- next;
+ }
+ # skip if already linked
+ next;
}
error("No touching $orbitdir/${symName}_${version}.jar - it is a dir")
if( -d "$orbitdir/${symName}_${version}.jar");
@@ -166,26 +166,26 @@ sub find_jars{
my @inc = (q{.}, '/usr/share/java');
my @res = ();
foreach my $globpattern (@_){
- my @i = @inc;
- my $found = 0;
- # Only use inc-path if there is no path.
- @i = (q{}) if($globpattern =~ m@/@o);
- glob_loop: foreach my $p (@inc){
- foreach my $s (q{}, '.jar') {
- my @matches;
- if($p eq ''){
- @matches = glob("$globpattern$s");
- } else {
- @matches = glob("$p/$globpattern$s");
- }
- # skip if nothing matched or it was not a glob and the file does not exist.
- next if (scalar(@matches) == 0 || ! -e $matches[0]);
- push(@res, @matches);
- $found = 1;
- last glob_loop;
- }
- }
- error("Could not find any matches for $globpattern") unless($found);
+ my @i = @inc;
+ my $found = 0;
+ # Only use inc-path if there is no path.
+ @i = (q{}) if($globpattern =~ m@/@o);
+ glob_loop: foreach my $p (@inc){
+ foreach my $s (q{}, '.jar') {
+ my @matches;
+ if($p eq ''){
+ @matches = glob("$globpattern$s");
+ } else {
+ @matches = glob("$p/$globpattern$s");
+ }
+ # skip if nothing matched or it was not a glob and the file does not exist.
+ next if (scalar(@matches) == 0 || ! -e $matches[0]);
+ push(@res, @matches);
+ $found = 1;
+ last glob_loop;
+ }
+ }
+ error("Could not find any matches for $globpattern") unless($found);
}
return @res;
}
diff --git a/jh_installeclipse b/jh_installeclipse
index 9e5730a..2b4c533 100755
--- a/jh_installeclipse
+++ b/jh_installeclipse
@@ -91,10 +91,10 @@ if( -e $orbitcfile) {
# Read the orbit data from jh_generateorbitdir
open(my $fd, '<', $orbitcfile);
while( my $line = <$fd>){
- my ($sysjar, $orbjar);
- chomp($line);
- ($sysjar, $orbjar, undef) = split(/\s*+,\s*+/o, $line);
- push(@orbitdeps, {${\EOB_SYM_NAME} => $orbjar, ${\EOB_SYS_JAR} => $sysjar});
+ my ($sysjar, $orbjar);
+ chomp($line);
+ ($sysjar, $orbjar, undef) = split(/\s*+,\s*+/o, $line);
+ push(@orbitdeps, {${\EOB_SYM_NAME} => $orbjar, ${\EOB_SYS_JAR} => $sysjar});
}
close($fd);
}
@@ -116,46 +116,46 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
$dropins = get_dropins_path($package);
@infiles = filedoublearray($installfile);
if (($package eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) {
- push @infiles, [@ARGV];
+ push @infiles, [@ARGV];
}
foreach my $line (@infiles) {
- my ($zipglob, $dname, $other) = @$line;
- error("Trailing text in $installfile ($other)")
+ my ($zipglob, $dname, $other) = @$line;
+ error("Trailing text in $installfile ($other)")
if(defined($other) && length($other) > 0);
- $dname = $defdname unless(defined($dname) && length($dname) > 0);
- error("Missing (and could not guess) eclipse-name for $zipglob for $package - please provide a default.")
+ $dname = $defdname unless(defined($dname) && length($dname) > 0);
+ error("Missing (and could not guess) eclipse-name for $zipglob for $package - please provide a default.")
unless(defined($dname) && length($dname) > 0);
- foreach my $zip (glob("$pdebdir/$zipglob")){
- foreach my $ext ((q{}, '.zip', '.ZIP')){
- # Guess common extensions - mostly for the "non-globable cases".
- if( -e "$zip${ext}"){
- $zip = "$zip${ext}";
- last;
- }
- }
- install_zipped_feature($zip, "$dropins/$dname", \@orbitdeps,
+ foreach my $zip (glob("$pdebdir/$zipglob")){
+ foreach my $ext ((q{}, '.zip', '.ZIP')){
+ # Guess common extensions - mostly for the "non-globable cases".
+ if( -e "$zip${ext}"){
+ $zip = "$zip${ext}";
+ last;
+ }
+ }
+ install_zipped_feature($zip, "$dropins/$dname", \@orbitdeps,
$package, \%needed);
- }
+ }
}
}
while ( my ($sysjar, $users) = each(%needed) ){
my ($pkg, $ver) = find_dependency($sysjar);
if(!defined($pkg)){
- warning("Cannot determine the package providing $sysjar.");
- next;
+ warning("Cannot determine the package providing $sysjar.");
+ next;
}
$ver =~ s/-1$//o;
foreach my $pack (keys(%$users)){
- addsubstvar($pack, 'orbit:Depends', $pkg, ">= $ver");
+ addsubstvar($pack, 'orbit:Depends', $pkg, ">= $ver");
}
}
foreach my $package (@{$dh{DOPACKAGES}}){
- my $ext=pkgext($package);
- my $substvars="debian/${ext}substvars";
- if (! -e $substvars || system('grep', '-q', '^orbit:Depends=', $substvars) != 0) {
- complex_doit("echo orbit:Depends= >> $substvars");
- }
+ my $ext=pkgext($package);
+ my $substvars="debian/${ext}substvars";
+ if (! -e $substvars || system('grep', '-q', '^orbit:Depends=', $substvars) != 0) {
+ complex_doit("echo orbit:Depends= >> $substvars");
+ }
}
exit(0);
@@ -176,27 +176,27 @@ sub find_dependency{
verbose_print("dpkg -S $sysjar");
open(my $fd, '-|', 'dpkg', '-S', $sysjar);
while( my $input = <$fd> ){
- my ($p, $f);
- chomp($input);
- ($p, $f) = split(/\s*+:\s*+/o, $input);
- if($f eq $sysjar){
- $pkgtable{$p} = 1;
- }
+ my ($p, $f);
+ chomp($input);
+ ($p, $f) = split(/\s*+:\s*+/o, $input);
+ if($f eq $sysjar){
+ $pkgtable{$p} = 1;
+ }
}
close($fd);
if(scalar(keys(%pkgtable)) > 0){
- verbose_print('dpkg -l');
- open(my $dfd, '-|', 'dpkg', '-l');
- while( chomp(my $line = <$dfd>) ){
- my ($pname, $version);
- next if ($line !~ m/^.i/o);
- (undef, $pname, $version, undef) = split(/\s++/o, $line);
- if(exists($pkgtable{$pname})){
- $deppkg = $pname;
- $depver = $version;
- }
- }
- close($dfd);
+ verbose_print('dpkg -l');
+ open(my $dfd, '-|', 'dpkg', '-l');
+ while( chomp(my $line = <$dfd>) ){
+ my ($pname, $version);
+ next if ($line !~ m/^.i/o);
+ (undef, $pname, $version, undef) = split(/\s++/o, $line);
+ if(exists($pkgtable{$pname})){
+ $deppkg = $pname;
+ $depver = $version;
+ }
+ }
+ close($dfd);
}
return ($deppkg, $depver);
}
--
UNNAMED PROJECT
More information about the pkg-java-commits
mailing list