View | Details | Raw Unified | Return to bug 4847
Collapse All | Expand All

(-)a/debian/bd-to-depends (-18 / +26 lines)
Lines 1-23 Link Here
1
#!/usr/bin/python
1
#!/usr/bin/perl
2
2
3
import re
3
use strict;
4
import debian.deb822
4
use warnings;
5
5
6
exclusions = [
6
my @exclusions = (
7
    'debhelper',
7
    'debhelper',
8
    'python',
8
);
9
    'python-debian',
10
]
11
9
12
exclusions = [re.compile(s) for s in exclusions]
10
open my $control_fh, '<', 'debian/control' or die "Cannot open debian/control";
11
my @lines = <$control_fh>;
12
close $control_fh;
13
13
14
depstring = debian.deb822.Deb822(file('debian/control')).get('Build-Depends')
14
my @build_depends;
15
deps = [s.strip() for s in depstring.split(',')]
15
my $in_build_depends_block;
16
result = []
16
for my $line ( @lines ) {
17
for dep in deps:
17
    chomp $line;
18
    for ex in exclusions:
18
    if ( $line =~ m|Build-Depends:| ) {
19
        if ex.match(dep):
19
        $in_build_depends_block = 1;
20
            break
20
        $line =~ s|Build-Depends:||;
21
    else:
21
    }
22
        result.append(dep)
22
    next unless $in_build_depends_block;
23
print 'koha:Depends=%s' % ', '.join(result)
23
    if ( $line =~ m|^\s*$| ) {
24
        last;
25
    }
26
    for my $dep ( split ',', $line ) {
27
        $dep =~ s|^\s*||;
28
        push @build_depends, $dep unless ( map { ( $dep =~ m|$_| ) ? 1 : () } @exclusions);
29
    }
30
}
31
print 'koha:Depends=' . join ( ', ', @build_depends ) . "\n";
(-)a/debian/control (-2 / +2 lines)
Lines 124-131 Build-Depends: libalgorithm-checkdigits-perl, Link Here
124
 libyaml-perl,
124
 libyaml-perl,
125
 libyaml-syck-perl,
125
 libyaml-syck-perl,
126
 perl,
126
 perl,
127
 perl-modules, 
127
 perl-modules,
128
 debhelper (>= 7.0.50), gettext, python, python-debian, xsltproc, docbook-xsl,
128
 debhelper (>= 7.0.50), gettext, xsltproc, docbook-xsl,
129
 libxml2-utils, bash-completion, perl-modules (>= 5.14.2) | libtest-simple-perl (>= 0.98)
129
 libxml2-utils, bash-completion, perl-modules (>= 5.14.2) | libtest-simple-perl (>= 0.98)
130
130
131
Package: koha-common
131
Package: koha-common
(-)a/debian/control.in (-2 / +1 lines)
Lines 10-16 Standards-Version: 3.8.4 Link Here
10
# See debian/rules, the override_dh_gencontrol rules. 
10
# See debian/rules, the override_dh_gencontrol rules. 
11
# There are some exceptions.
11
# There are some exceptions.
12
Build-Depends:__AUTODEPENDS__, 
12
Build-Depends:__AUTODEPENDS__, 
13
 debhelper (>= 7.0.50), gettext, python, python-debian, xsltproc, docbook-xsl,
13
 debhelper (>= 7.0.50), gettext, xsltproc, docbook-xsl,
14
 libxml2-utils, bash-completion, perl-modules (>= 5.14.2) | libtest-simple-perl (>= 0.98)
14
 libxml2-utils, bash-completion, perl-modules (>= 5.14.2) | libtest-simple-perl (>= 0.98)
15
15
16
Package: koha-common
16
Package: koha-common
17
- 

Return to bug 4847