Bugzilla – Attachment 17670 Details for
Bug 9927
tweak list-deps script to build a better ./debian/control file
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9927 - tweak list-deps script to build a better ./debian/control file
Bug-9927---tweak-list-deps-script-to-build-a-bette.patch (text/plain), 1.93 KB, created by
Mason James
on 2013-04-25 08:32:39 UTC
(
hide
)
Description:
Bug 9927 - tweak list-deps script to build a better ./debian/control file
Filename:
MIME Type:
Creator:
Mason James
Created:
2013-04-25 08:32:39 UTC
Size:
1.93 KB
patch
obsolete
>From 4dcd8c7af31e489ba7b62b5aa47d0e0e4d9df5d9 Mon Sep 17 00:00:00 2001 >From: Mason James <mtj@kohaaloha.com> >Date: Thu, 25 Apr 2013 20:16:05 +1200 >Subject: [PATCH] Bug 9927 - tweak list-deps script to build a better ./debian/control file >Content-Type: text/plain; charset="utf-8" > > to test... > > 1/ apply patch > > 2/ rename existing file > mv ./debian/control ./debian/control.old > > 3/ run script > ./debian/update-control > > 4/ compare files, to see improvements > diff ./debian/control ./debian/control.old >--- > debian/list-deps | 15 ++++++++++++--- > 1 files changed, 12 insertions(+), 3 deletions(-) > >diff --git a/debian/list-deps b/debian/list-deps >index dcb6fb8..e5ace5d 100755 >--- a/debian/list-deps >+++ b/debian/list-deps >@@ -38,23 +38,32 @@ my $deps = $C4::Installer::PerlDependencies::PERL_DEPS; > > my $prefix = "^/usr/((lib|share)/perl5|(lib|share)/perl/[0-9.]+)"; > >+ > foreach my $module ( keys %$deps ) { > next if $ignore{$module}; >+ > my $ver = $deps->{$module}->{'min_ver'}; > my $subpath = $module; > $subpath =~ s,::,/,g; > my $output = qx(apt-file -l -x search "$prefix/$subpath.pm\$"); >+ > my @temp = split( /\n/, $output ); > my @lines = (); > > # Remove packages that are required/essential and always installed on > # a Debian system. Debian packages should not have unversioned > # dependencies on such packages. >- foreach my $line (@temp) { >- if ( $line ne "perl-base" ) { >+ >+ #skip if module if its already satisfied by a base perl module >+ my @skip = grep( /^perl-base$|^perl-modules$|^perl$/, @temp); >+ next if scalar @skip > 0 ; >+ >+ # or else, add that module >+ my @temp2 = grep( !/^perl-base$|^perl-modules$|^perl$/, @temp); >+ foreach my $line (@temp2) { > @lines = ( @lines, $line ); >- } > } >+ > if ( scalar(@lines) == 1 && $lines[0] ne "" ) { > my $pkg = $lines[0]; > print "$pkg\n"; >-- >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 9927
:
16915
|
16916
|
16997
|
17670
|
17674