Bugzilla – Attachment 37175 Details for
Bug 4847
Python required for Debian package builds
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 4847: Remove the python dependency for package builds
Bug-4847-Remove-the-python-dependency-for-package-.patch (text/plain), 3.02 KB, created by
Jonathan Druart
on 2015-03-24 12:27:13 UTC
(
hide
)
Description:
Bug 4847: Remove the python dependency for package builds
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2015-03-24 12:27:13 UTC
Size:
3.02 KB
patch
obsolete
>From 7d0f163c8587d3bb145e7f0bf8fd314594c069b9 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Tue, 24 Mar 2015 13:23:53 +0100 >Subject: [PATCH] Bug 4847: Remove the python dependency for package builds > >The only place python is used is in the debian/bd-to-depends script. >This patch rewrite this script using perl. > >Test plan: >The execution of > debian/bd-to-depends >Should return the same output. >--- > debian/bd-to-depends | 44 ++++++++++++++++++++++++++------------------ > debian/control | 4 ++-- > debian/control.in | 2 +- > 3 files changed, 29 insertions(+), 21 deletions(-) > >diff --git a/debian/bd-to-depends b/debian/bd-to-depends >index ce8809b..cff8b24 100755 >--- a/debian/bd-to-depends >+++ b/debian/bd-to-depends >@@ -1,23 +1,31 @@ >-#!/usr/bin/python >+#!/usr/bin/perl > >-import re >-import debian.deb822 >+use strict; >+use warnings; > >-exclusions = [ >+my @exclusions = ( > 'debhelper', >- 'python', >- 'python-debian', >-] >+); > >-exclusions = [re.compile(s) for s in exclusions] >+open my $control_fh, '<', 'debian/control' or die "Cannot open debian/control"; >+my @lines = <$control_fh>; >+close $control_fh; > >-depstring = debian.deb822.Deb822(file('debian/control')).get('Build-Depends') >-deps = [s.strip() for s in depstring.split(',')] >-result = [] >-for dep in deps: >- for ex in exclusions: >- if ex.match(dep): >- break >- else: >- result.append(dep) >-print 'koha:Depends=%s' % ', '.join(result) >+my @build_depends; >+my $in_build_depends_block; >+for my $line ( @lines ) { >+ chomp $line; >+ if ( $line =~ m|Build-Depends:| ) { >+ $in_build_depends_block = 1; >+ $line =~ s|Build-Depends:||; >+ } >+ next unless $in_build_depends_block; >+ if ( $line =~ m|^\s*$| ) { >+ last; >+ } >+ for my $dep ( split ',', $line ) { >+ $dep =~ s|^\s*||; >+ push @build_depends, $dep unless ( map { ( $dep =~ m|$_| ) ? 1 : () } @exclusions); >+ } >+} >+print 'koha:Depends=' . join ( ', ', @build_depends ) . "\n"; >diff --git a/debian/control b/debian/control >index 96a6650..0d923b7 100644 >--- a/debian/control >+++ b/debian/control >@@ -124,8 +124,8 @@ Build-Depends: libalgorithm-checkdigits-perl, > libyaml-perl, > libyaml-syck-perl, > perl, >- perl-modules, >- debhelper (>= 7.0.50), gettext, python, python-debian, xsltproc, docbook-xsl, >+ perl-modules, >+ debhelper (>= 7.0.50), gettext, xsltproc, docbook-xsl, > libxml2-utils, bash-completion, perl-modules (>= 5.14.2) | libtest-simple-perl (>= 0.98) > > Package: koha-common >diff --git a/debian/control.in b/debian/control.in >index 66ebc4c..9f404d6 100644 >--- a/debian/control.in >+++ b/debian/control.in >@@ -10,7 +10,7 @@ Standards-Version: 3.8.4 > # See debian/rules, the override_dh_gencontrol rules. > # There are some exceptions. > Build-Depends:__AUTODEPENDS__, >- debhelper (>= 7.0.50), gettext, python, python-debian, xsltproc, docbook-xsl, >+ debhelper (>= 7.0.50), gettext, xsltproc, docbook-xsl, > libxml2-utils, bash-completion, perl-modules (>= 5.14.2) | libtest-simple-perl (>= 0.98) > > Package: koha-common >-- >2.1.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 4847
:
37175
|
37201