]> git.donarmstrong.com Git - debhelper.git/commitdiff
Set MODULEBUILDRC environment variable
authorAnsgar Burchardt <ansgar@43-1.org>
Mon, 9 Mar 2009 15:37:32 +0000 (16:37 +0100)
committerJoey Hess <joey@gnu.kitenet.net>
Mon, 9 Mar 2009 17:23:12 +0000 (13:23 -0400)
When building packages using Module::Build and a ~/.modulebuildrc
containing

  install install_base=~

the build will end up installing files in /root.

This patch makes debhelper export MODULEBUILDRC="/dev/null" whenever
Module::Build is used to avoid using ~/.modulebuildrc.

Closes: #517423
Signed-off-by: Ansgar Burchardt <ansgar@43-1.org>
dh_auto_build
dh_auto_clean
dh_auto_configure
dh_auto_install
dh_auto_test

index a3c95211847441751d16fa277ae6400032cecb20..75ce51cf78d19180cef1ba1bd0c45db798ce499b 100755 (executable)
@@ -46,6 +46,7 @@ elsif (-e "setup.py") {
        doit("python", "setup.py", "build", @{$dh{U_PARAMS}});
 }
 elsif (-e "Build.PL" && -e "Build") {
+       $ENV{MODULEBUILDRC} = "/dev/null";
        doit("perl", "Build", @{$dh{U_PARAMS}});
 }
 
index 6c97b106a491a3ed62f5969b56dbc7d7944a3005..610155ae5653eaad2d69e79b5807c54d021bc73f 100755 (executable)
@@ -60,6 +60,7 @@ elsif (-e "setup.py") {
        doit('find', '.', '-name', '*.pyc', '-exec', 'rm', '{}', ';');
 }
 elsif (-e "Build.PL" && -e "Build") {
+       $ENV{MODULEBUILDRC} = "/dev/null";
        doit("perl", "Build", "--allow_mb_mismatch", 1, "distclean", @{$dh{U_PARAMS}});
 }
 
index 6b8adf524d016c3996ff98cad586ccf111d0e494..41f6210fb29cce210fa902cf7ef969e5bcc4060a 100755 (executable)
@@ -92,6 +92,7 @@ elsif (-e "Makefile.PL") {
 }
 elsif (-e "Build.PL") {
        $ENV{PERL_MM_USE_DEFAULT}=1; # Module::Build can also use this.
+       $ENV{MODULEBUILDRC} = "/dev/null";
        doit("perl", "Build.PL", "installdirs=vendor", @{$dh{U_PARAMS}});
 }
 
index 8e7ab907ae8b5123fb6753db73b00285a65726d7..264725ca80da60ea64c02289a36cc23548c94592 100755 (executable)
@@ -90,6 +90,7 @@ elsif (-e "setup.py") {
                @{$dh{U_PARAMS}});
 }
 elsif (-e "Build.PL" && -e "Build") {
+       $ENV{MODULEBUILDRC} = "/dev/null";
        doit("perl", "Build", "install", "destdir=$destdir",
                "create_packlist=0", @{$dh{U_PARAMS}});
 }
index 05c11b225fef080a8cfebb3ae5d080cd49a4a92f..baccd10af59b7233903a9baa84e0e15539f352c4 100755 (executable)
@@ -55,6 +55,7 @@ if (-e "Makefile" || -e "makefile" || -e "GNUmakefile") {
        }
 }
 elsif (-e "Build.PL" && -e "Build") {
+       $ENV{MODULEBUILDRC} = "/dev/null";
        doit(qw/perl Build test/, @{$dh{U_PARAMS}});
 }