Bugzilla – Attachment 16906 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.36 KB, created by
Mason James
on 2013-03-26 20:10:51 UTC
(
hide
)
Description:
bug 8402 - a script to build ./install_misc/debian.packages from ./debian/control
Filename:
MIME Type:
Creator:
Mason James
Created:
2013-03-26 20:10:51 UTC
Size:
3.36 KB
patch
obsolete
>From f4f8a83f5f23b509c924f87348bf55fa00dd7eef 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 >Content-Type: text/plain; charset="utf-8" > >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 >--- > 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..a1f955b >--- /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 -f/--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 $ss = ${ $entry->{'value'} }; >+ $para = $entry if $ss =~ m/koha-common/; >+} >+ >+my $source; >+foreach my $entry ( $parser->get_keys('Source') ) { >+ my $ss = ${ $entry->{'value'} }; >+ $source = $entry if $ss =~ m/koha/; >+} >+ >+my $dep = $para->{'para'}->{'Depends'}; >+my $bdep = $source->{'para'}->{'Build-Depends'}; >+my $a = $dep . $bdep; >+ >+my @moo; >+push @moo, $header; >+ >+foreach my $aa ( split '\n', $a ) { >+ next if $aa =~ qr/\$/; >+ >+ $aa =~ s/,//; >+ $aa =~ s/.//; >+ $aa =~ s/^[ \t]+|[ \t]+$//g; >+ $aa =~ s/\s.*$//; >+ >+ $aa =~ s/$/ install/; >+ $aa .= "\n"; >+ >+ push @moo, $aa if $aa !~ /\$/; >+} >+ >+my $file = './install_misc/debian.packages'; >+open( my $fh, '>', $file ); >+ >+print $fh (@moo); >+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 -f/--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