app-backup/flexbackup-1.2.1-r9 fails if any directory in the backup list does not have a prune list. The -r9 update introduced a patch file that removed a 'defined()' test for the existence of a prune entry for each backup target. If a target does not have a prune entry, flexbackup fails with an error of "Can't use an undefined value as a HASH reference at /usr/bin/flexbackup line 4885." Reproducible: Always Steps to Reproduce: 1. Configure a backup set such as: $set{'test'} = '/var /usr'; 2. DO NOT define a prune entry for /var 3. Run flexbackup on the configured set: flexbackup -set test -level incremental Actual Results: Backup will fail at the first partition with error: "Can't use an undefined value as a HASH reference at /usr/bin/flexbackup line 4885." Expected Results: Backups should be done on all partitions in the set. The -r9 ebuild incorporated a patch to remove a warning generated by perl 5.12. The patch changed 2 lines to remove a 'defined()' construct like this: - if (defined(%{$::prune{$prunekey}})) { + if (%{$::prune{$prunekey}}) { The warning generated is: "defined(%hash) is deprecated at /usr/bin/flexbackup line 4885. (Maybe you should just omit the defined()?)" It appears that the warning is being generated in error, since the 'defined()' is not referencing a hash, but a specific element of a hash, just with extra syntax needed because of 'use strict' The previous behavior can be restored by changing the patch to: - if (defined(%{$::prune{$prunekey}})) { + if (defined($prune{$prunekey}) { and adding 'use vars qw( %prune );' at about line 102. I have tested this under perl 5.12 and it supresses the warning message, as well as allowing backups on directories without explicit 'prune' lists.
Thanks for the bug report, analysis and suggestion for fixing this. This should now be fixed in flexbackup-1.2.1-r10.