Bug 20428: Added missing parameter --upload-tmp-path
[koha.git] / debian / list-deps
index dcb6fb8..d599df8 100755 (executable)
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-use strict;
-use warnings;
+use Modern::Perl;
 
 use C4::Installer::PerlDependencies;
 
 # These are packages that may not be in the apt archive in a way that
 # apt-file can find, e.g. in the Koha repo rather than the regular
 # debian one.
-my %overrides = ();
+my %overrides = (
+    'LWP::Protocol::https' => 'liblwp-protocol-https-perl|libwww-perl (<<6.02), libio-socket-ssl-perl',
+    'IO::Socket::IP'       => 'perl-modules (>= 5.20.0) | perl-modules-5.22 | perl-modules-5.24 | libio-socket-ip-perl',
+    'Swagger2'             => 'libswagger2-perl (>= 0.59)',
+    'Mojolicious'          => 'libmojolicious-perl (>= 6.0)',
+);
 
 # These are packages we're going to ignore
 my %ignore = (
@@ -36,7 +40,7 @@ my %ignore = (
 
 my $deps = $C4::Installer::PerlDependencies::PERL_DEPS;
 
-my $prefix = "^/usr/((lib|share)/perl5|(lib|share)/perl/[0-9.]+)";
+my $prefix = "^/usr/((lib|share)/perl5|(lib|share)/perl/[0-9.]+|(lib|share)/.*-linux-gnu.*/perl/[0-9.]+|(lib|share)/.*-linux-gnu.*/perl5/[0-9.]+)";
 
 foreach my $module ( keys %$deps ) {
     next if $ignore{$module};
@@ -55,7 +59,10 @@ foreach my $module ( keys %$deps ) {
             @lines = ( @lines, $line );
         }
     }
-    if ( scalar(@lines) == 1 && $lines[0] ne "" ) {
+    if ( exists $overrides{$module} ) {
+        print "$overrides{$module}\n";
+    }
+    elsif ( scalar(@lines) == 1 && $lines[0] ne "" ) {
         my $pkg = $lines[0];
         print "$pkg\n";
     }
@@ -63,6 +70,8 @@ foreach my $module ( keys %$deps ) {
         foreach my $pkg (@lines) {
             print " | " if ( $pkg ne $lines[0] );
             print "$pkg";
+            print " | $pkg" . "-5.22" if ( $pkg eq "perl-modules" );
+            print " | $pkg" . "-5.24" if ( $pkg eq "perl-modules" );
         }
         print "\n";
     }
@@ -80,8 +89,8 @@ foreach my $module ( keys %$deps ) {
         # commit.)
         # RM note: suspicious?  me?  always!
     }
-    elsif ( exists $overrides{$module} ) {
-        print "$overrides{$module}\n";
+    elsif ( ! $deps->{$module}->{'required'} ) {
+        # Ignore because we don't have it and we don't care.
     }
     else {
         print "EEEK: unknown package for $module\n";