[libmodule-corelist-perl] 01/02: Revert debian package handling patch.
dod at debian.org
dod at debian.org
Thu Feb 5 17:09:51 UTC 2015
This is an automated email from the git hooks/post-receive script.
dod pushed a commit to branch master
in repository libmodule-corelist-perl.
commit ac1a8ab4c3f1ef6af27be8a373c563f19690d713
Author: Dominique Dumont <dod at debian.org>
Date: Thu Feb 5 18:03:20 2015 +0100
Revert debian package handling patch.
Turns out patching this module is a bad idea: Module::Corelist is a dual life package.
Patching a dual life package require also patching Perl core module.
This is not manageable.
---
debian/control | 3 +-
debian/patches/handle-debian-package-name | 173 ------------------------------
debian/patches/series | 1 -
3 files changed, 1 insertion(+), 176 deletions(-)
diff --git a/debian/control b/debian/control
index 3b701dd..f73fc5c 100644
--- a/debian/control
+++ b/debian/control
@@ -8,8 +8,7 @@ Uploaders: Krzysztof Krzyzaniak (eloy) <eloy at debian.org>,
Damyan Ivanov <dmn at debian.org>,
Ansgar Burchardt <ansgar at debian.org>,
Salvatore Bonaccorso <carnil at debian.org>,
- Fabrizio Regalli <fabreg at fabreg.it>,
- Dominique Dumont <dod at debian.org>
+ Fabrizio Regalli <fabreg at fabreg.it>
Section: perl
Priority: optional
Build-Depends: debhelper (>= 8)
diff --git a/debian/patches/handle-debian-package-name b/debian/patches/handle-debian-package-name
deleted file mode 100644
index cc8794f..0000000
--- a/debian/patches/handle-debian-package-name
+++ /dev/null
@@ -1,173 +0,0 @@
-Description: handle debian package name as Perl module name
- This debian specific patch enable user to enter Debian package name instead of Perl module name.
-Author: dod
-Applied-Upstream: NA
---- a/lib/Module/CoreList.pm
-+++ b/lib/Module/CoreList.pm
-@@ -24,7 +24,8 @@
- sub first_release_raw {
- my $module = shift;
- $module = shift if eval { $module->isa(__PACKAGE__) }
-- and scalar @_ and $_[0] =~ m#\A[a-zA-Z_][0-9a-zA-Z_]*(?:(::|')[0-9a-zA-Z_]+)*\z#;
-+ and scalar @_ and $_[0] =~ m#\A[a-zA-Z_][0-9a-zA-Z_-]*(?:(::|')[0-9a-zA-Z_]+)*\z#;
-+ $module = map_debian($module);
- my $version = shift;
-
- my @perls = $version
-@@ -72,7 +73,8 @@
- sub is_deprecated {
- my $module = shift;
- $module = shift if eval { $module->isa(__PACKAGE__) }
-- and scalar @_ and $_[0] =~ m#\A[a-zA-Z_][0-9a-zA-Z_]*(?:(::|')[0-9a-zA-Z_]+)*\z#;
-+ and scalar @_ and $_[0] =~ m#\A[a-zA-Z_][0-9a-zA-Z_-]*(?:(::|')[0-9a-zA-Z_]+)*\z#;
-+ $module = map_debian($module);
- my $perl_version = shift;
- $perl_version ||= $];
- return unless $module && exists $deprecated{$perl_version}{$module};
-@@ -82,7 +84,8 @@
- sub deprecated_in {
- my $module = shift;
- $module = shift if eval { $module->isa(__PACKAGE__) }
-- and scalar @_ and $_[0] =~ m#\A[a-zA-Z_][0-9a-zA-Z_]*(?:(::|')[0-9a-zA-Z_]+)*\z#;
-+ and scalar @_ and $_[0] =~ m#\A[a-zA-Z_][0-9a-zA-Z_-]*(?:(::|')[0-9a-zA-Z_]+)*\z#;
-+ $module = map_debian($module);
- return unless $module;
- my @perls = grep { exists $deprecated{$_}{$module} } keys %deprecated;
- return unless @perls;
-@@ -103,7 +106,9 @@
- sub removed_raw {
- my $mod = shift;
- $mod = shift if eval { $mod->isa(__PACKAGE__) }
-- and scalar @_ and $_[0] =~ m#\A[a-zA-Z_][0-9a-zA-Z_]*(?:(::|')[0-9a-zA-Z_]+)*\z#;
-+ and scalar @_ and $_[0] =~ m#\A[a-zA-Z_][0-9a-zA-Z_-]*(?:(::|')[0-9a-zA-Z_]+)*\z#;
-+ $mod = map_debian($mod);
-+
- return unless my @perls = sort { $a cmp $b } first_release_raw($mod);
- my $last = pop @perls;
- my @removed = grep { $_ > $last } sort { $a cmp $b } keys %version;
-@@ -12450,5 +12455,21 @@
- }
- }
-
-+my %debian_map;
-+
-+foreach my $v (keys %version) {
-+ foreach my $pm ( %{ $version{$v} } ) {
-+ next unless defined $pm;
-+ my $k = lc($pm);
-+ $k =~ s/::/-/g;
-+ $debian_map{"lib$k-perl"} = $pm;
-+ }
-+}
-+
-+sub map_debian {
-+ my $mod = shift;
-+ return $debian_map{$mod} // $mod ;
-+}
-+
- 1;
- __END__
---- a/corelist
-+++ b/corelist
-@@ -6,7 +6,7 @@
-
- =head1 DESCRIPTION
-
--See L<Module::CoreList> for one.
-+See L<Module::CoreList> for one. Including the Debian specific part.
-
- =head1 SYNOPSIS
-
-@@ -18,6 +18,9 @@
- corelist --diff PerlVersion PerlVersion
- corelist --upstream <ModuleName>
-
-+ # only on Debian
-+ corelist <debian-package-name-perl>
-+
- =head1 OPTIONS
-
- =over
-@@ -381,7 +384,7 @@
- }
-
- sub display_a {
-- my $mod = shift;
-+ my $mod = Module::CoreList::map_debian(shift);
-
- for my $v (grep !/0[01]0$/, sort keys %Module::CoreList::version ) {
- next unless exists $Module::CoreList::version{$v}{$mod};
---- a/lib/Module/CoreList.pod
-+++ b/lib/Module/CoreList.pod
-@@ -12,6 +12,9 @@
- print Module::CoreList->first_release_by_date('File::Spec'); # prints 5.005
- print Module::CoreList->first_release('File::Spec', 0.82); # prints 5.006001
-
-+ # Only on Debian
-+ print Module::CoreList->first_release('libfile-spec-perl'); # prints 5.00405
-+
- if (Module::CoreList::is_core('File::Spec')) {
- print "File::Spec is a core module\n";
- }
-@@ -41,6 +44,17 @@
- Programmers may also query the contained hash structures to find relevant
- information.
-
-+=head1 Only on Debian
-+
-+corelist also works using Debian package name instead of Perl module
-+name. For instance, using C<libmodule-build-perl> or C<Module::Build>
-+will yield the same results.
-+
-+Note that the Debian specific part does not check whether the Debian
-+package name actually exists. I.e. using C<libconfig-perl> will yield
-+the same result as using C<Config> even though the C<libconfig-perl>
-+Debian package does not exist.
-+
- =head1 FUNCTIONS API
-
- These are the functions that are available, they may either be called as functions or class methods:
---- /dev/null
-+++ b/t/debian-package.t
-@@ -0,0 +1,41 @@
-+#!perl -w
-+use strict;
-+use Module::CoreList;
-+use Test::More tests => 12;
-+
-+BEGIN { require_ok('Module::CoreList'); }
-+
-+is(Module::CoreList->first_release_by_date('libfile-spec-perl'), 5.005,
-+ "File::Spec was first bundled in 5.005");
-+
-+is(Module::CoreList->first_release('libfile-spec-perl'), 5.00405,
-+ "File::Spec was released in perl with lowest version number 5.00405");
-+
-+is(Module::CoreList->first_release('libfile-spec-perl', 0.82), 5.006_001,
-+ "File::Spec reached 0.82 with 5.006_001");
-+
-+is(Module::CoreList::first_release_by_date('libfile-spec-perl'), 5.005,
-+ "File::Spec was first bundled in 5.005");
-+
-+is(Module::CoreList::first_release('libfile-spec-perl'), 5.00405,
-+ "File::Spec was released in perl with lowest version number 5.00405");
-+
-+is(Module::CoreList::first_release('libfile-spec-perl', 0.82), 5.006_001,
-+ "File::Spec reached 0.82 with 5.006_001");
-+
-+is(Module::CoreList::first_release('Module::Build'), 5.009004,
-+ "Module::Build first release with 5.009004");
-+
-+is(Module::CoreList::first_release('libmodule-build-perl'), 5.009004,
-+ "Module::Build reached 0.3603 with 5.009004");
-+
-+is(Module::CoreList::first_release('libmodule-build-perl', 0.4003), 5.017_003,
-+ "Module::Build reached 0.4003 with 5.017_003");
-+
-+ok(! Module::CoreList::is_deprecated('libswitch-perl', 5.010000),
-+ "libswitch-perl not deprecated in 5.010000 (function w/ perl version)"
-+);
-+
-+is(Module::CoreList::deprecated_in('libswitch-perl'), 5.011000,
-+ "libswitch-perl was deprecated in 5.011000 (deprecated_in)"
-+);
diff --git a/debian/patches/series b/debian/patches/series
deleted file mode 100644
index 6e2f256..0000000
--- a/debian/patches/series
+++ /dev/null
@@ -1 +0,0 @@
-handle-debian-package-name
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libmodule-corelist-perl.git
More information about the Pkg-perl-cvs-commits
mailing list