summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-06-08 15:44:52 -0600
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-06-08 15:44:52 -0600
commit724cc90d771d840c4579e3b2443cad21fd6fe231 (patch)
treeb225ba2aca8cbd14807f4892999d62354cb88bab
parentad49ac2698b331a94b97dbad6d68c85bff8fa94a (diff)
libremakepkg: add -N flag to enable networking, for distcc support
-rwxr-xr-xsrc/chroot-tools/libremakepkg13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/chroot-tools/libremakepkg b/src/chroot-tools/libremakepkg
index cd81876..baf8015 100755
--- a/src/chroot-tools/libremakepkg
+++ b/src/chroot-tools/libremakepkg
@@ -174,7 +174,11 @@ build() {
local user=$LIBREUSER
$INCHROOT || user=nobody
- run -N "$copydir" "sudo -u ${user} -- makepkg ${makepkg_args} -e"
+ if $NONET; then
+ run -N "$copydir" "sudo -u ${user} -- makepkg ${makepkg_args} -e"
+ else
+ run "$copydir" "sudo -u ${user} -- makepkg ${makepkg_args} -e"
+ fi
}
# Functions that check for issues with the build ###############################
@@ -221,6 +225,9 @@ usage() {
echo 'Options:'
echo ' -n <CHROOT> Name of the chroot to use'
echo ' -l <COPY> Name of, or absolute path to, the copy to use'
+ echo " -N Don't disable networking during build() or package()"
+ echo ' Only use this as a temporary hack to use distcc,'
+ echo ' until actual distcc support is added.'
echo ' -R Repackage contents of the package without rebuilding'
echo ' -h Show this message'
}
@@ -241,10 +248,12 @@ main() {
INCHROOT=true
fi
- while getopts 'n:l:Rh' arg ; do
+ NONET=true
+ while getopts 'n:l:NRh' arg ; do
case "${arg}" in
n) CHROOT=$OPTARG;;
l) COPY=$OPTARG;;
+ N) NONET=false;;
R) repack=true; makepkg_args+=" -R";;
h) usage; return 0;;
*) usage; return 1;;