r49984 - in /trunk/dh-make-perl: TODO debian/changelog debian/control lib/DhMakePerl.pm
carnil-guest at users.alioth.debian.org
carnil-guest at users.alioth.debian.org
Sun Jan 3 00:32:08 UTC 2010
Author: carnil-guest
Date: Sun Jan 3 00:31:44 2010
New Revision: 49984
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=49984
Log:
* Do not append found entry for examples and docs to the corresponding file,
but open a new file with the found entries. Slightly improve the routines
avoid dublicated entries in package.examples and package.docs when using
--refresh.
* debian/control: Add libarray-unique-perl to (Build-)Depends.
Modified:
trunk/dh-make-perl/TODO
trunk/dh-make-perl/debian/changelog
trunk/dh-make-perl/debian/control
trunk/dh-make-perl/lib/DhMakePerl.pm
Modified: trunk/dh-make-perl/TODO
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/TODO?rev=49984&op=diff
==============================================================================
--- trunk/dh-make-perl/TODO (original)
+++ trunk/dh-make-perl/TODO Sun Jan 3 00:31:44 2010
@@ -25,8 +25,6 @@
* Don't add libmodule-build-perl to Build-Depends if Makefile.PL is also
present, if its not just Module::Build::Compat
* 3.0 source format support for dh-make-perl
-* .examples and .docs are opened with ">>", so on refresh we have duplicated
- entries
* module versions: if META.yml contains e.g. "v1.002000" for 1.2.0 then
extract_name_ver returns exactly "v1.002000" (not good), and extract_basic
adds a leading "0" (even worse). we somehow need to get those versions
Modified: trunk/dh-make-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/debian/changelog?rev=49984&op=diff
==============================================================================
--- trunk/dh-make-perl/debian/changelog (original)
+++ trunk/dh-make-perl/debian/changelog Sun Jan 3 00:31:44 2010
@@ -17,8 +17,13 @@
machine readable copyright file.
* Referesh template for debian/copyright to follow the revision 135 or DEP5
Format-Specification. Update URI of the format specification.
-
- -- Salvatore Bonaccorso <salvatore.bonaccorso at gmail.com> Sat, 26 Dec 2009 13:45:44 +0100
+ * Do not append found entry for examples and docs to the corresponding file,
+ but open a new file with the found entries. Slightly improve the routines
+ avoid dublicated entries in package.examples and package.docs when using
+ --refresh.
+ * debian/control: Add libarray-unique-perl to (Build-)Depends.
+
+ -- Salvatore Bonaccorso <salvatore.bonaccorso at gmail.com> Sun, 03 Jan 2010 01:29:29 +0100
dh-make-perl (0.61) unstable; urgency=low
Modified: trunk/dh-make-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/debian/control?rev=49984&op=diff
==============================================================================
--- trunk/dh-make-perl/debian/control (original)
+++ trunk/dh-make-perl/debian/control Sun Jan 3 00:31:44 2010
@@ -5,6 +5,7 @@
perl (>= 5.10) | libmodule-build-perl
Build-Depends-Indep: perl,
libapt-pkg-perl,
+ libarray-unique-perl,
libclass-accessor-perl,
libemail-date-format-perl,
libfile-find-rule-perl,
@@ -42,6 +43,7 @@
Depends: debhelper (>= 7), ${perl:Depends}, ${misc:Depends},
make, dpkg-dev, fakeroot,
libapt-pkg-perl,
+ libarray-unique-perl,
libclass-accessor-perl,
libemail-date-format-perl,
liblist-moreutils-perl,
Modified: trunk/dh-make-perl/lib/DhMakePerl.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/lib/DhMakePerl.pm?rev=49984&op=diff
==============================================================================
--- trunk/dh-make-perl/lib/DhMakePerl.pm (original)
+++ trunk/dh-make-perl/lib/DhMakePerl.pm Sun Jan 3 00:31:44 2010
@@ -36,6 +36,7 @@
=cut
use AptPkg::Cache ();
+use Array::Unique;
use Config qw( %Config );
use CPAN ();
use Cwd qw( getcwd );
@@ -108,6 +109,10 @@
my ($module_build);
my ( @docs, @examples, $changelog, @args );
+# use Array::Unique for @docs and @examples
+tie @examples, 'Array::Unique';
+tie @docs, 'Array::Unique';
+
my $mod_cpan_version;
=item main_file(file_name)
@@ -1458,12 +1463,40 @@
else {
$fh->print($_) for @content;
if (@examples) {
- open F, '>>', $self->debian_file("$pkgname.examples") or die $!;
+ # pkgname.examples file
+ my $pkg_examples_file = $self->debian_file("$pkgname.examples");
+
+ # if a package.examples exists read these values first
+ if ( -r $pkg_examples_file ) {
+ my $fh = $self->_file_r($pkg_examples_file);
+ my @existing_examples = $fh->getlines;
+ chomp(@existing_examples);
+
+ # make list of files for package.examples unique
+ push @examples, @existing_examples;
+ }
+
+ # write package.examples file with unique entries
+ open F, '>', $pkg_examples_file or die $!;
print F "$_\n" foreach @examples;
close F;
}
if (@docs) {
- open F, '>>', $self->debian_file("$pkgname.docs") or die $!;
+ # pkgname.docs file
+ my $pkg_docs_file = $self->debian_file("$pkgname.docs");
+
+ # if a apcakge.docs exists read these values first
+ if ( -r $pkg_docs_file ) {
+ my $fh = $self->_file_r($pkg_docs_file);
+ my @existing_docs = $fh->getlines;
+ chomp(@existing_docs);
+
+ # make list of files for package.docs unique
+ push @docs, @existing_docs;
+ }
+
+ # write package.docs with unique entries
+ open F, '>', $pkg_docs_file or die $!;
print F "$_\n" foreach @docs;
close F;
}
More information about the Pkg-perl-cvs-commits
mailing list