r7111 - in /trunk/dh-make-perl: debian/changelog dh-make-perl

gwolf at users.alioth.debian.org gwolf at users.alioth.debian.org
Fri Aug 24 18:45:58 UTC 2007


Author: gwolf
Date: Fri Aug 24 18:45:58 2007
New Revision: 7111

URL: http://svn.debian.org/wsvn/?sc=1&rev=7111
Log:
Added warning when copyright information is incomplete

Modified:
    trunk/dh-make-perl/debian/changelog
    trunk/dh-make-perl/dh-make-perl

Modified: trunk/dh-make-perl/debian/changelog
URL: http://svn.debian.org/wsvn/trunk/dh-make-perl/debian/changelog?rev=7111&op=diff
==============================================================================
--- trunk/dh-make-perl/debian/changelog (original)
+++ trunk/dh-make-perl/debian/changelog Fri Aug 24 18:45:58 2007
@@ -1,9 +1,13 @@
 dh-make-perl (0.29) unstable; urgency=low
 
+  [ Damyan Ivanov ]
   * rules*.xs: add a call to dh_shlibdeps for arch-dependent packages
     Thanks to Martín Ferrari for spotting
 
- -- Damyan Ivanov <dmn at debian.org>  Tue, 21 Aug 2007 09:47:49 +0300
+  [ Gunnar Wolf ]
+  * Added warning when the extracted copyright information is incomplete
+
+ -- Gunnar Wolf <gwolf at debian.org>  Fri, 24 Aug 2007 13:45:24 -0500
 
 dh-make-perl (0.28) unstable; urgency=low
 

Modified: trunk/dh-make-perl/dh-make-perl
URL: http://svn.debian.org/wsvn/trunk/dh-make-perl/dh-make-perl?rev=7111&op=diff
==============================================================================
--- trunk/dh-make-perl/dh-make-perl (original)
+++ trunk/dh-make-perl/dh-make-perl Fri Aug 24 18:45:58 2007
@@ -858,6 +858,8 @@
 
 sub create_copyright {
         my $fh = _file_w(shift);
+	my $incomplete = '';
+
 	$fh->print(
 "This is the debian package for the $perlname module.
 It was created by $maintainer using dh-make-perl.
@@ -865,6 +867,8 @@
 ");
         if (defined $upsurl) {
                 $fh->print("It was downloaded from $upsurl\n\n");
+	} else {
+	        $incomplete .= "No upstream URL\n";
         }
 	$fh->print(
 "This copyright info was automatically extracted from the perl module.
@@ -874,7 +878,10 @@
 ");
 	if (defined $author) {
 		$fh->print("The upstream author is: $author.\n");
-	}
+	} else {
+	        $incomplete .= "No upstream author\n";
+	}
+
 	if (defined($copyright)) {
 		$fh->print($copyright);
 		# Fun with regexes
@@ -893,6 +900,8 @@
 /usr/share/common-licenses/GPL
 ");
 		}
+	} else {
+	        $incomplete .= "No licensing information\n";
 	}
 
 	my $year = (localtime)[5]+1900;
@@ -903,6 +912,10 @@
 ");
 
 	$fh->close;
+
+	if ($incomplete) {
+	    _warn_incomplete_copyright($incomplete)
+	}
 }
 
 sub create_readme {
@@ -1020,6 +1033,21 @@
 	$val = defined($data->{$subkey.$key})?$data->{$subkey.$key}:$data->{$key};
 	return &$val() if (defined($val) && ref($val) eq 'CODE');
 	return $val;
+}
+
+sub _warn_incomplete_copyright {
+    print '*'x10, '
+Copyright information incomplete!
+
+Upstream copyright information could not be automatically determined.
+
+If you are building this package for your personal use, you might disregard
+this information; however, if you intend to upload this package to Debian
+(or in general, if you plan on distributing it), you must look into the
+complete copyright information.
+
+The causes for this warning are:
+', @_;
 }
 
 sub _file_r {




More information about the Pkg-perl-cvs-commits mailing list