[Koha-patches] [PATCH] Remove dependencies on perl-base.

Lars Wirzenius lars at catalyst.net.nz
Fri Jun 4 04:52:44 CEST 2010


perl-base is a required package, so it is always installed on a Debian
system, and Debian packages should not depend on it, unless they need
it a specific version, and I don't think we do.
---
 debian/control   |    3 +--
 debian/list-deps |   22 +++++++++++++++++++++-
 2 files changed, 22 insertions(+), 3 deletions(-)

diff --git a/debian/control b/debian/control
index a808675..5f107ba 100644
--- a/debian/control
+++ b/debian/control
@@ -53,7 +53,7 @@ Build-Depends: libalgorithm-checkdigits-perl,
  libpdf-reuse-perl,
  libpdf-table-perl,
  libpoe-perl,
- libscalar-list-utils-perl | perl-base,
+ libscalar-list-utils-perl,
  libschedule-at-perl,
  libsms-send-perl,
  libtest-harness-perl | perl-modules,
@@ -74,7 +74,6 @@ Build-Depends: libalgorithm-checkdigits-perl,
  libyaml-perl,
  libyaml-syck-perl,
  perl,
- perl-base,
  perl-modules, 
  debhelper (>= 7.0.50), gettext, python, python-debian
 
diff --git a/debian/list-deps b/debian/list-deps
index e30c54a..41003b8 100755
--- a/debian/list-deps
+++ b/debian/list-deps
@@ -33,7 +33,16 @@ foreach my $module (keys %$deps) {
     $subpath =~ s,::,/,g;
     my $output = 
         qx(apt-file -l -x search "$prefix/$subpath.pm\$");
-    my @lines = split(/\n/, $output);
+    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") {
+            @lines = (@lines, $line);
+        }
+    }
     if (scalar(@lines) == 1 && $lines[0] ne "") {
         my $pkg = $lines[0];
         print "$pkg\n";
@@ -43,6 +52,17 @@ foreach my $module (keys %$deps) {
             print "$pkg";
         }
         print "\n";
+    } elsif (scalar(@temp) != 0) {
+        # I'm an Essential and I'm OK,
+        # I install all night, and work all day.
+        # I chomp up strings. I eat my bugs.
+        # I go to the base install.
+        # On Fridays I go drinking,
+        # and have buttered commits for git.
+        # (Beer O'Clock is more than two hours
+        # away. I don't even drink beer. There
+        # is no reason to be suspicious of this
+        # commit.)
     } else {
         print "EEEK: unknown package for $module\n";
     }
-- 
1.7.1



More information about the Koha-patches mailing list