Skip Menu |

This queue is for tickets about the CPAN CPAN distribution.

Report information
The Basics
Id: 39573
Status: resolved
Priority: 0/
Queue: CPAN

People
Owner: Nobody in particular
Requestors: GAAS [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Add patches_dir configuration variable [PATCH]
The following patch adds a configuration variable called 'patches_dir' which can be set to a local directory where CPAN should look for patch files before trying to download them remotely. Patch relative to 1.92_65.
Subject: patches_dir.patch
commit d794a6844a93101ff30b0150633eefe37b2956e9 Author: Gisle Aas <gisle@aas.no> Date: Wed Sep 24 10:46:34 2008 +0200 Introduce patches_dir configuration variable. diff --git a/lib/CPAN.pm b/lib/CPAN.pm index 8006a98..d87e02a 100644 --- a/lib/CPAN.pm +++ b/lib/CPAN.pm @@ -6842,7 +6842,12 @@ sub try_download { } my $countedpatches = @$patches == 1 ? "1 patch" : (scalar @$patches . " patches"); $CPAN::Frontend->myprint("Going to apply $countedpatches:\n"); + my $patches_dir = $CPAN::Config->{patches_dir}; for my $patch (@$patches) { + if ($patches_dir && !File::Spec->file_name_is_absolute($patch)) { + my $f = File::Spec->catfile($patches_dir, $patch); + $patch = $f if -f $f; + } unless (-f $patch) { if (my $trydl = $self->try_download($patch)) { $patch = $trydl; @@ -11386,6 +11391,7 @@ defined: pager location of external program more (or any pager) password your password if you CPAN server wants one patch path to external prg + patches_dir local directory containing patch files perl5lib_verbosity verbosity level for PERL5LIB additions prefer_installer legal values are MB and EUMM: if a module comes with both a Makefile.PL and a Build.PL, use the diff --git a/lib/CPAN/HandleConfig.pm b/lib/CPAN/HandleConfig.pm index ce68f90..4664767 100644 --- a/lib/CPAN/HandleConfig.pm +++ b/lib/CPAN/HandleConfig.pm @@ -76,6 +76,7 @@ $VERSION = "5.5"; "pager", "password", "patch", + "patches_dir", "perl5lib_verbosity", "prefer_installer", "prefs_dir",
Thanks! Applied to my repository.