summaryrefslogtreecommitdiff
path: root/debian/patches/70_no_defined_on_hash.dpatch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/70_no_defined_on_hash.dpatch')
-rw-r--r--debian/patches/70_no_defined_on_hash.dpatch48
1 files changed, 48 insertions, 0 deletions
diff --git a/debian/patches/70_no_defined_on_hash.dpatch b/debian/patches/70_no_defined_on_hash.dpatch
new file mode 100644
index 0000000..f4eae76
--- /dev/null
+++ b/debian/patches/70_no_defined_on_hash.dpatch
@@ -0,0 +1,48 @@
+#!/bin/sh /usr/share/dpatch/dpatch-run
+## 70_no_defined_on_hash.dpatch by Ian Campbell <ijc@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Bug #816164 patch by Ian Campbell <ijc@debian.org>
+## DP:
+## DP: defined(%hash) and defined(@array) have been deprecated for a while and
+## DP: are now fatal errors:
+## DP:
+## DP: Can't use 'defined(%hash)' (Maybe you should just omit the defined()?) at /usr/bin/flexbackup line 1053.
+## DP: Can't use 'defined(@array)' (Maybe you should just omit the defined()?) at /usr/bin/flexbackup line 2688.
+## DP:
+## DP: See http://perldoc.perl.org/perldelta.html#defined%28%40array%29-and-defined%28%25hash%29-are-now-fatal-errors
+## DP:
+## DP: http://perldoc.perl.org/functions/defined.html recommends just checking
+## DP: for length (i.e. removing the defined()). Do so.
+
+@DPATCH@
+diff -urNad flexbackup-svn~/flexbackup flexbackup-svn/flexbackup
+--- flexbackup-svn~/flexbackup 2016-02-28 08:54:08.338589461 +0000
++++ flexbackup-svn/flexbackup 2016-02-28 08:56:08.934584524 +0000
+@@ -1050,7 +1050,7 @@
+ } else {
+ $prunekey = $dir;
+ }
+- if (defined(%{$::prune{$prunekey}})) {
++ if ($::prune{$prunekey}) {
+ &log("| NOTE: \$prune is ignored for type=dump");
+ }
+
+@@ -2685,7 +2685,7 @@
+ }
+
+ # Flag old config file
+- if (defined(@cfg::filesystems) or defined($cfg::mt_var_blksize)) {
++ if (@cfg::filesystems or defined($cfg::mt_var_blksize)) {
+ # so strict shuts up
+ my $junk = @cfg::filesystems;
+ $junk = $cfg::mt_var_blksize;
+@@ -4883,7 +4883,7 @@
+ $prunekey = $dir;
+ }
+
+- if (defined(%{$::prune{$prunekey}})) {
++ if ($::prune{$prunekey}) {
+ # FreeBSD needs -E (above) and no backslashes around the (|) chars
+ if ($::uname =~ /FreeBSD/) {
+ $cmd .= '-regex "\./(';