[PATCH] Set MODULEBUILDRC environment variable
Ansgar Burchardt
ansgar at 43-1.org
Mon Mar 9 15:37:32 UTC 2009
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 at 43-1.org>
---
dh_auto_build | 1 +
dh_auto_clean | 1 +
dh_auto_configure | 1 +
dh_auto_install | 1 +
dh_auto_test | 1 +
5 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/dh_auto_build b/dh_auto_build
index a3c9521..75ce51c 100755
--- a/dh_auto_build
+++ b/dh_auto_build
@@ -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}});
}
diff --git a/dh_auto_clean b/dh_auto_clean
index 6c97b10..610155a 100755
--- a/dh_auto_clean
+++ b/dh_auto_clean
@@ -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}});
}
diff --git a/dh_auto_configure b/dh_auto_configure
index 6b8adf5..41f6210 100755
--- a/dh_auto_configure
+++ b/dh_auto_configure
@@ -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}});
}
diff --git a/dh_auto_install b/dh_auto_install
index 8e7ab90..264725c 100755
--- a/dh_auto_install
+++ b/dh_auto_install
@@ -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}});
}
diff --git a/dh_auto_test b/dh_auto_test
index 05c11b2..baccd10 100755
--- a/dh_auto_test
+++ b/dh_auto_test
@@ -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}});
}
--
1.6.1.3
--=-=-=--
More information about the pkg-perl-maintainers
mailing list