Bugzilla – Attachment 17392 Details for
Bug 8402
generate 'install_misc/debian.packages' file from debian/control file
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
bug 8402 - a script to build ./install_misc/debian.packages from ./debian/control
bug-8402---a-script-to-build-installmiscdebianpack.patch (text/plain), 3.38 KB, created by
Kyle M Hall (khall)
on 2013-04-12 14:39:57 UTC
(
hide
)
Description:
bug 8402 - a script to build ./install_misc/debian.packages from ./debian/control
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2013-04-12 14:39:57 UTC
Size:
3.38 KB
patch
obsolete
>From 6597920bd56f4c08ec0c47cb5db26c898524fbc8 Mon Sep 17 00:00:00 2001 >From: Mason James <mtj@kohaaloha.com> >Date: Wed, 27 Mar 2013 08:29:25 +1300 >Subject: [PATCH] bug 8402 - a script to build ./install_misc/debian.packages from ./debian/control > >to test > >1/ delete existing ./install_misc/debian.packages file > rm ./install_misc/debian.packages > >2/ run script > ./install_misc/build-pkg-file.pl -f > >3/ view new ./install_misc/debian.packages file > more ./install_misc/debian.packages > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >Works as advertised >--- > install_misc/build-pkg-file.pl | 105 ++++++++++++++++++++++++++++++++++++++++ > 1 files changed, 105 insertions(+), 0 deletions(-) > create mode 100644 install_misc/build-pkg-file.pl > >diff --git a/install_misc/build-pkg-file.pl b/install_misc/build-pkg-file.pl >new file mode 100644 >index 0000000..38e4bcb >--- /dev/null >+++ b/install_misc/build-pkg-file.pl >@@ -0,0 +1,105 @@ >+#!/usr/bin/perl >+ >+# Copyright (C) 2013 KohaAloha, NZ >+# >+# This file is part of Koha. >+# >+# Koha is free software; you can redistribute it and/or modify it under the >+# terms of the GNU General Public License as published by the Free Software >+# Foundation; either version 3 of the License, or (at your option) any later >+# version. >+# >+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY >+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR >+# A PARTICULAR PURPOSE. See the GNU General Public License for more details. >+# >+# You should have received a copy of the GNU General Public License along >+# with Koha; if not, write to the Free Software Foundation, Inc., >+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. >+ >+=pod >+a script to build the ./install_misc/debian.packages file from ./debian.control >+ >+script must be run with --force arg, to execute >+ >+=cut >+ >+use Modern::Perl; >+use Data::Printer; >+use Data::Dumper; >+ >+use Parse::Deb::Control; >+ >+use Getopt::Long; >+my $force,; >+my $result = GetOptions( >+ 'f|force' => \$force, >+ >+); >+ >+if ( not $force ) { >+ print_usage(); >+ exit 0; >+} >+ >+my $parser = Parse::Deb::Control->new('./debian/control'); >+ >+my $header = <<EOF; >+# WARNING! This file is manually generated from executing >+# the './install_misc/build-pkg-file.pl script >+# >+# Do not manually edit this file - you risk losing your changes >+EOF >+ >+my $para; >+ >+foreach my $entry ( $parser->get_keys('Package') ) { >+ my $r = ${ $entry->{'value'} }; >+ $para = $entry if $r =~ m/koha-common/; >+} >+ >+my $source; >+foreach my $entry ( $parser->get_keys('Source') ) { >+ my $r = ${ $entry->{'value'} }; >+ $source = $entry if $r =~ m/koha/; >+} >+ >+my $dep = $para->{'para'}->{'Depends'}; >+my $bdep = $source->{'para'}->{'Build-Depends'}; >+my $deps = $dep . $bdep; >+ >+my @deps2; >+push @deps2, $header; >+ >+foreach my $d ( split '\n', $deps ) { >+ next if $d =~ qr/\$/; >+ >+ $d =~ s/,//; >+ $d =~ s/.//; >+ $d =~ s/^[ \t]+|[ \t]+$//g; >+ $d =~ s/\s.*$//; >+ >+ $d =~ s/$/ install/; >+ $d .= "\n"; >+ >+ push @deps2, $d if $d !~ /\$/; >+} >+ >+my $file = './install_misc/debian.packages'; >+open( my $fh, '>', $file ); >+ >+print $fh (@deps2); >+close $fh; >+ >+sub print_usage { >+ print <<_USAGE_; >+a script to build the ./install_misc/debian.packages file from ./debian.control >+ >+script must be run with --force arg, to execute >+ >+Parameters: >+ --force or -f run this script >+_USAGE_ >+} >+ >+1; >-- >1.7.2.5
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 8402
:
16906
|
16907
|
17392
|
17676
|
17677
|
33506
|
33507