Package: devscripts
Version: 2.18.10
Severity: normal

Hi,

grep-excuses on an architecture specific item trips an "undefined
value as a HASH reference" error:

"""
$ grep-excuses node-srs/amd64
node-srs/amd64 (0.4.8+dfsg-3 to 0.4.8+dfsg-3)
    Maintainer: Debian Javascript Maintainers
Can't use an undefined value as a HASH reference at /usr/bin/grep-excuses line 
340.
"""


The relevant if statement is:

"""
    if (exists $source->{policy_info}) {
        my %age = %{ $source->{policy_info}{age} };
"""

The if-statement here makes the (incorrect) assumption that
policy_info always implies policy_info{age} exists.  Please update the
code to use something like:

"""
-    if (exists $source->{policy_info}) {
+    if (exists $source->{policy_info} and exists $source->{policy_info}{age}) {
"""

Which ensures that the age policy is in fact applied to the item.


This bug is triggered as policies are no longer exclusive to source
migrations.  However, the age policy is only applied to source
migrations (and not architecture specific migrations).

Thanks,
~Niels

Reply via email to