Skip to content

Commit b578fc1

Browse files
committedAug 20, 2015
creatensis.pl: support for excluding packages (including their dependencies)
1 parent d7c653c commit b578fc1

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed
 

‎ms-windows/osgeo4w/creatensis.pl

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,22 @@
102102
my %pkgs;
103103
104104
sub getDeps {
105-
my ($pkg) = @_;
106-
107-
return if exists $pkgs{$pkg};
108-
109-
print " Including package $pkg\n" if $verbose;
110-
$pkgs{$pkg} = 1;
105+
my $pkg = shift;
106+
107+
my $deponly = $pkg =~ /-$/;
108+
$pkg =~ s/-$//;
109+
110+
unless($deponly) {
111+
return if exists $pkgs{$pkg};
112+
print " Including package $pkg\n" if $verbose;
113+
$pkgs{$pkg} = 1;
114+
} elsif( exists $pkgs{$pkg} ) {
115+
print " Excluding package $pkg\n" if $verbose;
116+
delete $pkgs{$pkg};
117+
return;
118+
} else {
119+
print " Including dependencies of package $pkg\n" if $verbose;
120+
}
111121
112122
foreach my $p ( @{ $dep{$pkg} } ) {
113123
getDeps($p);
@@ -461,4 +471,5 @@ =head1 SYNOPSIS
461471
If no packages are given 'qgis-full' and it's dependencies will be retrieved
462472
and packaged.
463473
474+
Packages with a appended '-' are excluded, but their dependencies are included.
464475
=cut

0 commit comments

Comments
 (0)
Please sign in to comment.