|
|
f40119 |
From c6f460b4bb60352e40e25efe72acd3c2bd14f216 Mon Sep 17 00:00:00 2001
|
|
|
f40119 |
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
|
|
f40119 |
Date: Wed, 28 Jan 2015 13:21:10 +0100
|
|
|
f40119 |
Subject: [PATCH] Replace configuration directory string with a marker
|
|
|
f40119 |
MIME-Version: 1.0
|
|
|
f40119 |
Content-Type: text/plain; charset=UTF-8
|
|
|
f40119 |
Content-Transfer-Encoding: 8bit
|
|
|
f40119 |
|
|
|
f40119 |
This allows to redefine the configuration directory name at build
|
|
|
f40119 |
time.
|
|
|
f40119 |
|
|
|
f40119 |
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
|
|
f40119 |
---
|
|
|
f40119 |
Makefile.PL | 10 +++++-----
|
|
|
f40119 |
README | 10 +++++-----
|
|
|
f40119 |
lib/CPAN.pm | 10 +++++-----
|
|
|
f40119 |
lib/CPAN/HandleConfig.pm | 2 +-
|
|
|
f40119 |
scripts/cpan-mirrors | 2 +-
|
|
|
f40119 |
5 files changed, 17 insertions(+), 17 deletions(-)
|
|
|
f40119 |
|
|
|
f40119 |
diff --git a/Makefile.PL b/Makefile.PL
|
|
|
f40119 |
index 2cd2f82..3b826cf 100644
|
|
|
f40119 |
--- a/Makefile.PL
|
|
|
f40119 |
+++ b/Makefile.PL
|
|
|
f40119 |
@@ -339,21 +339,21 @@ record-session :
|
|
|
f40119 |
$(PERL) -Ilib -MCPAN -e '$$CPAN::Suppress_readline=$$CPAN::Echo_readline=1;shell' | tee ttt.out
|
|
|
f40119 |
|
|
|
f40119 |
run-with-sqlite :
|
|
|
f40119 |
- $(PERL) -I$$HOME/.cpan -Ilib -MCPAN::SQLite -MCPAN::MyConfig -MCPAN -e '$$CPAN::Config->{use_sqlite}++; $$CPAN::Config->{sqlite_dbname}="cpandb-sqlite"; shell'
|
|
|
f40119 |
+ $(PERL) -I$$HOME/.XCPANCONFIGNAMEX -Ilib -MCPAN::SQLite -MCPAN::MyConfig -MCPAN -e '$$CPAN::Config->{use_sqlite}++; $$CPAN::Config->{sqlite_dbname}="cpandb-sqlite"; shell'
|
|
|
f40119 |
|
|
|
f40119 |
testrun_very_offline : rm_mirrored_by run_emu_offline
|
|
|
f40119 |
|
|
|
f40119 |
testrun_emu_offline :
|
|
|
f40119 |
- $(PERL) -I$$HOME/.cpan -Ilib -MCPAN::MyConfig -MCPAN -e '@CPAN::Defaultsites = qw(file:///dev/null); $$CPAN::Config->{urllist} = []; shell'
|
|
|
f40119 |
+ $(PERL) -I$$HOME/.XCPANCONFIGNAMEX -Ilib -MCPAN::MyConfig -MCPAN -e '@CPAN::Defaultsites = qw(file:///dev/null); $$CPAN::Config->{urllist} = []; shell'
|
|
|
f40119 |
|
|
|
f40119 |
rm_mirrored_by :
|
|
|
f40119 |
- rm -f $$HOME/.cpan/sources/MIRRORED.BY*
|
|
|
f40119 |
+ rm -f $$HOME/.XCPANCONFIGNAMEX/sources/MIRRORED.BY*
|
|
|
f40119 |
|
|
|
f40119 |
testrun_http_only :
|
|
|
f40119 |
- $(PERL) -I$$HOME/.cpan -Ilib -MCPAN::MyConfig -MCPAN -e '$$CPAN::Config->{urllist} = [qw(http://www.planet-elektronik.de/CPAN/)]; shell'
|
|
|
f40119 |
+ $(PERL) -I$$HOME/.XCPANCONFIGNAMEX -Ilib -MCPAN::MyConfig -MCPAN -e '$$CPAN::Config->{urllist} = [qw(http://www.planet-elektronik.de/CPAN/)]; shell'
|
|
|
f40119 |
|
|
|
f40119 |
urllist :
|
|
|
f40119 |
- $(PERL) -Ilib -MCPAN -MCPAN::FirstTime -e 'CPAN::FirstTime::init("$$ENV{HOME}/.cpan/CPAN/MyConfig", args => [qw(urllist)])'
|
|
|
f40119 |
+ $(PERL) -Ilib -MCPAN -MCPAN::FirstTime -e 'CPAN::FirstTime::init("$$ENV{HOME}/.XCPANCONFIGNAMEX/CPAN/MyConfig", args => [qw(urllist)])'
|
|
|
f40119 |
|
|
|
f40119 |
runadmin :
|
|
|
f40119 |
$(PERL) -Ilib -MCPAN::Admin -eshell
|
|
|
f40119 |
diff --git a/README b/README
|
|
|
f40119 |
index aaf3101..2618d71 100644
|
|
|
f40119 |
--- a/README
|
|
|
f40119 |
+++ b/README
|
|
|
f40119 |
@@ -269,7 +269,7 @@ DESCRIPTION
|
|
|
f40119 |
restarting the whole get/make/test/install procedure from scratch.
|
|
|
f40119 |
|
|
|
f40119 |
Lockfile
|
|
|
f40119 |
- Interactive sessions maintain a lockfile, by default "~/.cpan/.lock".
|
|
|
f40119 |
+ Interactive sessions maintain a lockfile, by default "~/.XCPANCONFIGNAMEX/.lock".
|
|
|
f40119 |
Batch jobs can run without a lockfile and not disturb each other.
|
|
|
f40119 |
|
|
|
f40119 |
The shell offers to run in *downgraded mode* when another process is
|
|
|
f40119 |
@@ -329,7 +329,7 @@ DESCRIPTION
|
|
|
f40119 |
"install_tested".
|
|
|
f40119 |
|
|
|
f40119 |
mkmyconfig
|
|
|
f40119 |
- mkmyconfig() writes your own CPAN::MyConfig file into your "~/.cpan/"
|
|
|
f40119 |
+ mkmyconfig() writes your own CPAN::MyConfig file into your "~/.XCPANCONFIGNAMEX/"
|
|
|
f40119 |
directory so that you can save your own preferences instead of the
|
|
|
f40119 |
system-wide ones.
|
|
|
f40119 |
|
|
|
f40119 |
@@ -530,7 +530,7 @@ CONFIGURATION
|
|
|
f40119 |
|
|
|
f40119 |
Default values defined in the CPAN/Config.pm file can be overridden in a
|
|
|
f40119 |
user specific file: CPAN/MyConfig.pm. Such a file is best placed in
|
|
|
f40119 |
- "$HOME/.cpan/CPAN/MyConfig.pm", because "$HOME/.cpan" is added to the
|
|
|
f40119 |
+ "$HOME/.XCPANCONFIGNAMEX/CPAN/MyConfig.pm", because "$HOME/.XCPANCONFIGNAMEX" is added to the
|
|
|
f40119 |
search path of the CPAN module before the use() or require() statements.
|
|
|
f40119 |
The mkmyconfig command writes this file for you.
|
|
|
f40119 |
|
|
|
f40119 |
@@ -1996,8 +1996,8 @@ FAQ
|
|
|
f40119 |
|
|
|
f40119 |
You may want to configure something like
|
|
|
f40119 |
|
|
|
f40119 |
- o conf make_arg "| tee -ai /root/.cpan/logs/make.out"
|
|
|
f40119 |
- o conf make_install_arg "| tee -ai /root/.cpan/logs/make_install.out"
|
|
|
f40119 |
+ o conf make_arg "| tee -ai /root/.XCPANCONFIGNAMEX/logs/make.out"
|
|
|
f40119 |
+ o conf make_install_arg "| tee -ai /root/.XCPANCONFIGNAMEX/logs/make_install.out"
|
|
|
f40119 |
|
|
|
f40119 |
so that STDOUT is captured in a file for later inspection.
|
|
|
f40119 |
|
|
|
f40119 |
diff --git a/lib/CPAN.pm b/lib/CPAN.pm
|
|
|
f40119 |
index 4f02850..2c117b4 100644
|
|
|
f40119 |
--- a/lib/CPAN.pm
|
|
|
f40119 |
+++ b/lib/CPAN.pm
|
|
|
f40119 |
@@ -1736,7 +1736,7 @@ restarting the whole get/make/test/install procedure from scratch.
|
|
|
f40119 |
|
|
|
f40119 |
=item Lockfile
|
|
|
f40119 |
|
|
|
f40119 |
-Interactive sessions maintain a lockfile, by default C<~/.cpan/.lock>.
|
|
|
f40119 |
+Interactive sessions maintain a lockfile, by default C<~/.XCPANCONFIGNAMEX/.lock>.
|
|
|
f40119 |
Batch jobs can run without a lockfile and not disturb each other.
|
|
|
f40119 |
|
|
|
f40119 |
The shell offers to run in I<downgraded mode> when another process is
|
|
|
f40119 |
@@ -1810,7 +1810,7 @@ C<install_tested>.
|
|
|
f40119 |
|
|
|
f40119 |
=head2 mkmyconfig
|
|
|
f40119 |
|
|
|
f40119 |
-mkmyconfig() writes your own CPAN::MyConfig file into your C<~/.cpan/>
|
|
|
f40119 |
+mkmyconfig() writes your own CPAN::MyConfig file into your C<~/.XCPANCONFIGNAMEX/>
|
|
|
f40119 |
directory so that you can save your own preferences instead of the
|
|
|
f40119 |
system-wide ones.
|
|
|
f40119 |
|
|
|
f40119 |
@@ -2025,7 +2025,7 @@ in a file CPAN/Config.pm.
|
|
|
f40119 |
|
|
|
f40119 |
Default values defined in the CPAN/Config.pm file can be
|
|
|
f40119 |
overridden in a user specific file: CPAN/MyConfig.pm. Such a file is
|
|
|
f40119 |
-best placed in C<$HOME/.cpan/CPAN/MyConfig.pm>, because C<$HOME/.cpan> is
|
|
|
f40119 |
+best placed in C<$HOME/.XCPANCONFIGNAMEX/CPAN/MyConfig.pm>, because C<$HOME/.XCPANCONFIGNAMEX> is
|
|
|
f40119 |
added to the search path of the CPAN module before the use() or
|
|
|
f40119 |
require() statements. The mkmyconfig command writes this file for you.
|
|
|
f40119 |
|
|
|
f40119 |
@@ -3720,8 +3720,8 @@ there is too much output to keep track of.
|
|
|
f40119 |
|
|
|
f40119 |
You may want to configure something like
|
|
|
f40119 |
|
|
|
f40119 |
- o conf make_arg "| tee -ai /root/.cpan/logs/make.out"
|
|
|
f40119 |
- o conf make_install_arg "| tee -ai /root/.cpan/logs/make_install.out"
|
|
|
f40119 |
+ o conf make_arg "| tee -ai /root/.XCPANCONFIGNAMEX/logs/make.out"
|
|
|
f40119 |
+ o conf make_install_arg "| tee -ai /root/.XCPANCONFIGNAMEX/logs/make_install.out"
|
|
|
f40119 |
|
|
|
f40119 |
so that STDOUT is captured in a file for later inspection.
|
|
|
f40119 |
|
|
|
f40119 |
diff --git a/lib/CPAN/HandleConfig.pm b/lib/CPAN/HandleConfig.pm
|
|
|
f40119 |
index c72439f..a6b92e8 100644
|
|
|
f40119 |
--- a/lib/CPAN/HandleConfig.pm
|
|
|
f40119 |
+++ b/lib/CPAN/HandleConfig.pm
|
|
|
f40119 |
@@ -538,7 +538,7 @@ sub cpan_home_dir_candidates {
|
|
|
f40119 |
push @dirs, $ENV{USERPROFILE} if $ENV{USERPROFILE};
|
|
|
f40119 |
|
|
|
f40119 |
$CPAN::Config->{load_module_verbosity} = $old_v;
|
|
|
f40119 |
- my $dotcpan = $^O eq 'VMS' ? '_cpan' : '.cpan';
|
|
|
f40119 |
+ my $dotcpan = $^O eq 'VMS' ? '_XCPANCONFIGNAMEX' : '.XCPANCONFIGNAMEX';
|
|
|
f40119 |
@dirs = map { File::Spec->catdir($_, $dotcpan) } grep { defined } @dirs;
|
|
|
f40119 |
return wantarray ? @dirs : $dirs[0];
|
|
|
f40119 |
}
|
|
|
f40119 |
diff --git a/scripts/cpan-mirrors b/scripts/cpan-mirrors
|
|
|
f40119 |
index fe0e29c..493c140 100644
|
|
|
f40119 |
--- a/scripts/cpan-mirrors
|
|
|
f40119 |
+++ b/scripts/cpan-mirrors
|
|
|
f40119 |
@@ -143,7 +143,7 @@ to your configuration.
|
|
|
f40119 |
|
|
|
f40119 |
If you don't have a F<MIRRORED.BY> file, this program will download one
|
|
|
f40119 |
for you. It looks through your existing C<urllist> configuration and
|
|
|
f40119 |
-then default locations. It stores it in C<~/.cpan> (or your configured
|
|
|
f40119 |
+then default locations. It stores it in C<~/.XCPANCONFIGNAMEX> (or your configured
|
|
|
f40119 |
location to store files).
|
|
|
f40119 |
|
|
|
f40119 |
=head1 TO DO
|
|
|
f40119 |
--
|
|
|
f40119 |
2.13.6
|
|
|
f40119 |
|