Initial import of perl-Dist-CheckConflicts-0.02-2
One shortcoming of the CPAN clients that currently exist is that they have no way of specifying conflicting downstream dependencies of modules. This module attempts to work around this issue by allowing you to specify conflicting versions of modules separately, and deal with them after the module is done installing. For instance, say you have a module Foo, and some other module Bar uses Foo. If Foo were to change its API in a non-backwards-compatible way, this would cause Bar to break until it is updated to use the new API. Foo can't just depend on the fixed version of Bar, because this will cause a circular dependency (because Bar is already depending on Foo), and this doesn't express intent properly anyway - Foo doesn't use Bar at all. The ideal solution would be for there to be a way to specify conflicting versions of modules in a way that would let CPAN clients update conflicting modules automatically after an existing module is upgraded, but until that happens, this module will allow users to do this manually.
This commit is contained in:
parent
13a1531597
commit
fa57707aa6
1
.gitignore
vendored
1
.gitignore
vendored
@ -0,0 +1 @@
|
||||
/Dist-CheckConflicts-0.02.tar.gz
|
90
Dist-CheckConflicts-0.02-old-Test::More.patch
Normal file
90
Dist-CheckConflicts-0.02-old-Test::More.patch
Normal file
@ -0,0 +1,90 @@
|
||||
diff -up Dist-CheckConflicts-0.02/t/01-basic.t.orig Dist-CheckConflicts-0.02/t/01-basic.t
|
||||
--- Dist-CheckConflicts-0.02/t/01-basic.t.orig 2011-01-02 14:20:32.000000000 +0000
|
||||
+++ Dist-CheckConflicts-0.02/t/01-basic.t 2011-01-04 14:43:47.468148878 +0000
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env perl
|
||||
use strict;
|
||||
use warnings;
|
||||
-use Test::More;
|
||||
+use Test::More tests => 6;
|
||||
use lib 't/lib/01';
|
||||
|
||||
{
|
||||
@@ -43,5 +43,3 @@ use lib 't/lib/01';
|
||||
"nested conflicts work"
|
||||
);
|
||||
}
|
||||
-
|
||||
-done_testing;
|
||||
diff -up Dist-CheckConflicts-0.02/t/02-conflicts.t.orig Dist-CheckConflicts-0.02/t/02-conflicts.t
|
||||
--- Dist-CheckConflicts-0.02/t/02-conflicts.t.orig 2011-01-02 14:20:32.000000000 +0000
|
||||
+++ Dist-CheckConflicts-0.02/t/02-conflicts.t 2011-01-04 14:44:21.924129103 +0000
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env perl
|
||||
use strict;
|
||||
use warnings;
|
||||
-use Test::More;
|
||||
+use Test::More tests => 12;
|
||||
use Test::Fatal;
|
||||
use lib 't/lib/02';
|
||||
|
||||
@@ -66,5 +66,3 @@ use lib 't/lib/02';
|
||||
"correct conflict error"
|
||||
);
|
||||
}
|
||||
-
|
||||
-done_testing;
|
||||
diff -up Dist-CheckConflicts-0.02/t/03-dist.t.orig Dist-CheckConflicts-0.02/t/03-dist.t
|
||||
--- Dist-CheckConflicts-0.02/t/03-dist.t.orig 2011-01-02 14:20:32.000000000 +0000
|
||||
+++ Dist-CheckConflicts-0.02/t/03-dist.t 2011-01-04 14:44:52.868009491 +0000
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env perl
|
||||
use strict;
|
||||
use warnings;
|
||||
-use Test::More;
|
||||
+use Test::More tests => 16;
|
||||
use Test::Fatal;
|
||||
use lib 't/lib/03';
|
||||
|
||||
@@ -70,5 +70,3 @@ use lib 't/lib/03';
|
||||
);
|
||||
is(Bar::Conflicts::Bad->dist, 'Bar', "correct dist");
|
||||
}
|
||||
-
|
||||
-done_testing;
|
||||
diff -up Dist-CheckConflicts-0.02/t/04-merge.t.orig Dist-CheckConflicts-0.02/t/04-merge.t
|
||||
--- Dist-CheckConflicts-0.02/t/04-merge.t.orig 2011-01-02 14:20:32.000000000 +0000
|
||||
+++ Dist-CheckConflicts-0.02/t/04-merge.t 2011-01-04 14:45:12.730574644 +0000
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env perl
|
||||
use strict;
|
||||
use warnings;
|
||||
-use Test::More;
|
||||
+use Test::More tests => 2;
|
||||
use lib 't/lib/04';
|
||||
|
||||
{
|
||||
@@ -17,5 +17,3 @@ use lib 't/lib/04';
|
||||
"got the right conflicts"
|
||||
);
|
||||
}
|
||||
-
|
||||
-done_testing;
|
||||
diff -up Dist-CheckConflicts-0.02/t/05-also.t.orig Dist-CheckConflicts-0.02/t/05-also.t
|
||||
--- Dist-CheckConflicts-0.02/t/05-also.t.orig 2011-01-02 14:20:32.000000000 +0000
|
||||
+++ Dist-CheckConflicts-0.02/t/05-also.t 2011-01-04 14:45:31.260101893 +0000
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env perl
|
||||
use strict;
|
||||
use warnings;
|
||||
-use Test::More;
|
||||
+use Test::More tests => 4;
|
||||
use Test::Fatal;
|
||||
use lib 't/lib/05';
|
||||
|
||||
@@ -28,5 +28,3 @@ use lib 't/lib/05';
|
||||
"unknown also entries are ignored"
|
||||
);
|
||||
}
|
||||
-
|
||||
-done_testing;
|
30
Dist-CheckConflicts-0.02-old-eumm.patch
Normal file
30
Dist-CheckConflicts-0.02-old-eumm.patch
Normal file
@ -0,0 +1,30 @@
|
||||
--- Dist-CheckConflicts-0.02/Makefile.PL.orig 2011-01-02 14:20:32.000000000 +0000
|
||||
+++ Dist-CheckConflicts-0.02/Makefile.PL 2011-01-04 14:50:52.788254795 +0000
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
|
||||
|
||||
-use ExtUtils::MakeMaker 6.31;
|
||||
+use ExtUtils::MakeMaker;
|
||||
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
'Test::More' => '0.88'
|
||||
},
|
||||
'CONFIGURE_REQUIRES' => {
|
||||
- 'ExtUtils::MakeMaker' => '6.31'
|
||||
+ 'ExtUtils::MakeMaker' => '0'
|
||||
},
|
||||
'DISTNAME' => 'Dist-CheckConflicts',
|
||||
'EXE_FILES' => [],
|
||||
@@ -49,6 +49,9 @@
|
||||
delete $WriteMakefileArgs{CONFIGURE_REQUIRES}
|
||||
unless eval { ExtUtils::MakeMaker->VERSION(6.52) };
|
||||
|
||||
+delete $WriteMakefileArgs{LICENSE}
|
||||
+ unless eval { ExtUtils::MakeMaker->VERSION(6.31) };
|
||||
+
|
||||
WriteMakefile(%WriteMakefileArgs);
|
||||
|
||||
|
92
perl-Dist-CheckConflicts.spec
Normal file
92
perl-Dist-CheckConflicts.spec
Normal file
@ -0,0 +1,92 @@
|
||||
# We need to patch the test suite if we have an old version of Test::More
|
||||
%global old_test_more %(perl -MTest::More -e 'printf "%d\\n", $Test::More::VERSION < 0.88 ? 1 : 0;' 2>/dev/null || echo 0)
|
||||
|
||||
# We don't really need ExtUtils::MakeMaker > 6.31
|
||||
%global old_eumm %(perl -MExtUtils::MakeMaker -e 'printf "%d\\n", $ExtUtils::MakeMaker::VERSION < 6.31 ? 1 : 0;' 2>/dev/null || echo 0)
|
||||
|
||||
Name: perl-Dist-CheckConflicts
|
||||
Version: 0.02
|
||||
Release: 2%{?dist}
|
||||
Summary: Declare version conflicts for your dist
|
||||
Group: Development/Libraries
|
||||
License: GPL+ or Artistic
|
||||
URL: http://search.cpan.org/dist/Dist-CheckConflicts/
|
||||
Source0: http://search.cpan.org/CPAN/authors/id/D/DO/DOY/Dist-CheckConflicts-%{version}.tar.gz
|
||||
Patch0: Dist-CheckConflicts-0.02-old-eumm.patch
|
||||
Patch1: Dist-CheckConflicts-0.02-old-Test::More.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildArch: noarch
|
||||
BuildRequires: perl(ExtUtils::MakeMaker)
|
||||
BuildRequires: perl(List::MoreUtils) >= 0.12
|
||||
%if "%{?rhel}" != "4"
|
||||
BuildRequires: perl(Pod::Coverage::TrustPod)
|
||||
%endif
|
||||
BuildRequires: perl(Sub::Exporter)
|
||||
BuildRequires: perl(Test::EOL)
|
||||
BuildRequires: perl(Test::Fatal)
|
||||
BuildRequires: perl(Test::More)
|
||||
BuildRequires: perl(Test::NoTabs)
|
||||
BuildRequires: perl(Test::Pod)
|
||||
BuildRequires: perl(Test::Pod::Coverage)
|
||||
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
|
||||
|
||||
%description
|
||||
One shortcoming of the CPAN clients that currently exist is that they have no
|
||||
way of specifying conflicting downstream dependencies of modules. This module
|
||||
attempts to work around this issue by allowing you to specify conflicting
|
||||
versions of modules separately, and deal with them after the module is done
|
||||
installing.
|
||||
|
||||
For instance, say you have a module Foo, and some other module Bar uses Foo. If
|
||||
Foo were to change its API in a non-backwards-compatible way, this would cause
|
||||
Bar to break until it is updated to use the new API. Foo can't just depend on
|
||||
the fixed version of Bar, because this will cause a circular dependency
|
||||
(because Bar is already depending on Foo), and this doesn't express intent
|
||||
properly anyway - Foo doesn't use Bar at all. The ideal solution would be for
|
||||
there to be a way to specify conflicting versions of modules in a way that would
|
||||
let CPAN clients update conflicting modules automatically after an existing
|
||||
module is upgraded, but until that happens, this module will allow users to do
|
||||
this manually.
|
||||
|
||||
%prep
|
||||
%setup -q -n Dist-CheckConflicts-%{version}
|
||||
|
||||
# Don't really need ExtUtils::MakeMaker >= 6.31
|
||||
%if %{old_eumm}
|
||||
%patch0 -p1
|
||||
%endif
|
||||
|
||||
# Test suite needs patching if we have Test::More < 0.88
|
||||
%if %{old_test_more}
|
||||
%patch1 -p1
|
||||
%endif
|
||||
|
||||
%build
|
||||
perl Makefile.PL INSTALLDIRS=vendor
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
rm -rf %{buildroot}
|
||||
make pure_install DESTDIR=%{buildroot}
|
||||
find %{buildroot} -type f -name .packlist -exec rm -f {} \;
|
||||
find %{buildroot} -depth -type d -exec rmdir {} \; 2>/dev/null
|
||||
%{_fixperms} %{buildroot}
|
||||
|
||||
%check
|
||||
make test RELEASE_TESTING=1
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc Changes LICENSE README
|
||||
%{perl_vendorlib}/Dist/
|
||||
%{_mandir}/man3/Dist::CheckConflicts.3pm*
|
||||
|
||||
%changelog
|
||||
* Wed Jan 5 2011 Paul Howarth <paul@city-fan.org> - 0.02-2
|
||||
- Sanitize for Fedora submission
|
||||
|
||||
* Tue Jan 4 2011 Paul Howarth <paul@city-fan.org> - 0.02-1
|
||||
- Initial RPM version
|
Loading…
Reference in New Issue
Block a user