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