Bugzilla – Attachment 33506 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 - generate 'install_misc/debian.packages' file from debian/control file
bug-8402---generate-installmiscdebianpackages-file.patch (text/plain), 3.23 KB, created by
Mark Tompsett
on 2014-11-13 04:28:42 UTC
(
hide
)
Description:
bug 8402 - generate 'install_misc/debian.packages' file from debian/control file
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2014-11-13 04:28:42 UTC
Size:
3.23 KB
patch
obsolete
>From c9a9cc0ecb82e5e5bdd792c9d3b7c57fb9a8a1e6 Mon Sep 17 00:00:00 2001 >From: Mason James <mtj@kohaaloha.com> >Date: Thu, 25 Apr 2013 23:41:14 +1200 >Subject: [PATCH] bug 8402 - generate 'install_misc/debian.packages' file from > debian/control file > >to test... > >- rename ./install_misc/debian.packages file > mv ./install_misc/debian.packages ./install_misc/debian.packages.old > >- apply patch > git bz apply 8402 > >- run script > ./koha-debian-deps.pl -r > install_misc/debian.packages > >- compare improved package file > diff ./install_misc/debian.packages ./install_misc/debian.packages.old > >- install packages > sudo apt-get install $( < install_misc/debian.packages) > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >Works as advertised >--- > install_misc/koha-debian-deps.pl | 92 ++++++++++++++++++++++++++++++++++++++ > 1 file changed, 92 insertions(+) > create mode 100644 install_misc/koha-debian-deps.pl > >diff --git a/install_misc/koha-debian-deps.pl b/install_misc/koha-debian-deps.pl >new file mode 100644 >index 0000000..9997d5b >--- /dev/null >+++ b/install_misc/koha-debian-deps.pl >@@ -0,0 +1,92 @@ >+#!/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 a file containing a list of debian packages needed to install Koha - from ./debian.control >+ >+script must be run with --run arg, to execute >+ >+=cut >+ >+use Modern::Perl; >+use List::MoreUtils qw(uniq); >+use Parse::DebControl; >+ >+use Getopt::Long; >+my $run,; >+my $result = GetOptions( 'r|run' => \$run, ); >+ >+if ( not $run ) { >+ print_usage(); >+ exit 0; >+} >+ >+my $parser = new Parse::DebControl; >+$parser->DEBUG(); >+ >+my %opt = ( 'stripComments' => 1, ); >+my $data = $parser->parse_file( './debian/control', \%opt ); >+ >+my $deps; >+foreach my $p (@$data) { >+ $deps .= $p->{'Depends'} . "\n" if $p->{'Depends'}; >+} >+ >+my @deps2; >+ >+foreach my $d ( split '\n', $deps ) { >+ >+ next if $d =~ qr/^\$/; >+ >+ $d =~ s/\|.*$//; >+ $d =~ s/,//; >+ $d =~ s/\"//; >+ $d =~ s/^[ \t]+|[ \t]+$//g; >+ $d .= "\n"; >+ >+ push @deps2, $d; >+} >+ >+my @uniq = uniq(@deps2); >+print @uniq; >+ >+sub print_usage { >+ print <<'_USAGE_'; >+ >+this script outputs a list of debian packages for Koha, built from the ./debian.control file >+ >+so, something like... >+ $ ./koha-debian-deps.pl -r > install_misc/debian.packages >+ >+then... >+ $ aptitude install $( < install_misc/debian.packages) >+ >+or... >+ $ apt-get install $( < install_misc/debian.packages) >+ >+ >+script must be run with --run arg, to execute >+ >+Parameters: >+ --run or -r run this script >+_USAGE_ >+ >+} >+ >+1; >-- >1.7.9.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