summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorIan Campbell <ijc@debian.org>2016-02-28 09:00:37 +0000
committerIan Campbell <ijc@debian.org>2016-02-28 10:18:43 +0000
commitccd1e60b2fd9d81fae436c1e3595fcf751bde2de (patch)
treee899403acf872df5f9a7c5b22f1585bb846e723a /debian
parented8cee1b61f957d05dcd223e6c954821ea1294e4 (diff)
Stop using defined on hashes (closes: #816164).
Diffstat (limited to 'debian')
-rw-r--r--debian/changelog7
-rw-r--r--debian/patches/00list1
-rw-r--r--debian/patches/70_no_defined_on_hash.dpatch48
3 files changed, 56 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index cec97bc..40bbaa5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+flexbackup (1.2.1-6.3) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Stop using defined on hashes (closes: #816164).
+
+ -- Ian Campbell <ijc@debian.org> Sun, 28 Feb 2016 08:58:49 +0000
+
flexbackup (1.2.1-6.2) unstable; urgency=medium
* Non-maintainer upload.
diff --git a/debian/patches/00list b/debian/patches/00list
index a8f42c2..d3d56ac 100644
--- a/debian/patches/00list
+++ b/debian/patches/00list
@@ -8,3 +8,4 @@
42_afio_cpio_incompatible_ok
50_lzma_support
60_use_afio_default_nocompression
+70_no_defined_on_hash
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 "\./(';