Package: dh-make-drupal Version: 1.8-1 Severity: minor Tags: patch Hey!
I had to package some third party Drupal plugins which are admittetly in a bad shape; the license file was missing. This led to the following error message: | /usr/bin/dh-make-drupal:330:in `join': can't convert nil into String (TypeError) | from /usr/bin/dh-make-drupal:330:in `setup_copyright' | from /usr/bin/dh-make-drupal:191:in `build_structure' | from /usr/bin/dh-make-drupal:1152:in `run' | from /usr/bin/dh-make-drupal:1161:in `<main>' the reason for this: | def find_license | files_at_root.select {|f| f =~ /license/i} | end (...skip to line 330...) | if license = File.join(@instdir, find_license[0]) nil (aka file does not exists) cannot be converted to a String; so the error handling that is in place does not work as expected: | else | Logger.instance.warn('No license file found in distribution, cannot' + | 'guess copyright information - Please check by' + | 'hand.') To make it work the way it is expected to feel free to use the attached patch that just checks find_license[0] to be not nil... Thank you for your work; it is very much appreciated! -- Adi PS: I backported v1.8 to wheezy as I had lots of issues with v1.3; I'd love to see an 'official' backport of dh-make-drupal! ;-)
--- a/dh-make-drupal 2015-02-25 12:21:41.676214005 +0100 +++ b/dh-make-drupal 2015-02-25 11:48:54.000000000 +0100 @@ -327,7 +327,7 @@ # Canonically, Drupal modules include LICENSE.txt. Even more, # canonically it is the GPLv2 - For further joy, it's usually # one of two exact same files! :-) - if license = File.join(@instdir, find_license[0]) + if find_license[0] != nil && license = File.join(@instdir, find_license[0]) data = File.read(license) || '' # Avoid an exception if file is missing if ["998ed0c116c0cebfcd9b2107b0d82973", "b234ee4d69f5fce4486a80fdaf4a4263"].include? Digest::MD5.hexdigest(data)
signature.asc
Description: Digital signature