summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2012-02-02 03:17:56 +0000
committerMike Gilbert <floppym@gentoo.org>2012-02-02 03:17:56 +0000
commitbc967b5e9307025b5d2e8580212f833faefa2881 (patch)
tree5d873aa9e785a4f460127086187dd60d4c5c10a6 /eclass
parentBug #360847: Give users of MySQL 4.0 an easier time in upgrading on a newer c... (diff)
downloadgentoo-2-bc967b5e9307025b5d2e8580212f833faefa2881.tar.gz
gentoo-2-bc967b5e9307025b5d2e8580212f833faefa2881.tar.bz2
gentoo-2-bc967b5e9307025b5d2e8580212f833faefa2881.zip
Introduce ESVN_UMASK variable to override default umask. Patch by Arfrever.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/ChangeLog5
-rw-r--r--eclass/subversion.eclass18
2 files changed, 20 insertions, 3 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog
index 10b0c18bfe6a..e57b9490bcd1 100644
--- a/eclass/ChangeLog
+++ b/eclass/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for eclass directory
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.110 2012/01/31 23:02:00 hwoarang Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.111 2012/02/02 03:17:56 floppym Exp $
+
+ 02 Feb 2012; Mike Gilbert <floppym@gentoo.org> subversion.eclass:
+ Introduce ESVN_UMASK variable to override default umask. Patch by Arfrever.
31 Jan 2012; Markos Chandras <hwoarang@gentoo.org> qt4-build.eclass:
Initial EAPI4 support in qt4-build eclass
diff --git a/eclass/subversion.eclass b/eclass/subversion.eclass
index 2f7dae399ced..09e58f24c81c 100644
--- a/eclass/subversion.eclass
+++ b/eclass/subversion.eclass
@@ -1,6 +1,6 @@
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.72 2011/12/27 22:40:50 neurogeek Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.73 2012/02/02 03:17:56 floppym Exp $
# @ECLASS: subversion.eclass
# @MAINTAINER:
@@ -156,6 +156,12 @@ ESVN_DISABLE_DEPENDENCIES="${ESVN_DISABLE_DEPENDENCIES:-}"
# tree by users.
ESVN_OFFLINE="${ESVN_OFFLINE:-${ESCM_OFFLINE}}"
+# @ECLASS-VARIABLE: ESVN_UMASK
+# @DESCRIPTION:
+# Set this variable to custom umask.
+# This is intended to be set by users.
+ESVN_UMASK="${ESVN_UMASK:-${EVCS_UMASK}}"
+
# @ECLASS-VARIABLE: ESVN_UP_FREQ
# @DESCRIPTION:
# Set the minimum number of hours between svn up'ing in any given svn module. This is particularly
@@ -215,6 +221,10 @@ subversion_fetch() {
addread "/etc/subversion"
addwrite "${ESVN_STORE_DIR}"
+ if [[ -n "${ESVN_UMASK}" ]]; then
+ eumask_push "${ESVN_UMASK}"
+ fi
+
if [[ ! -d ${ESVN_STORE_DIR} ]]; then
debug-print "${FUNCNAME}: initial checkout. creating subversion directory"
mkdir -m 775 -p "${ESVN_STORE_DIR}" || die "${ESVN}: can't mkdir ${ESVN_STORE_DIR}."
@@ -331,6 +341,10 @@ subversion_fetch() {
fi
fi
+ if [[ -n "${ESVN_UMASK}" ]]; then
+ eumask_pop
+ fi
+
einfo " working copy: ${wc_path}"
if ! has "export" ${ESVN_RESTRICT}; then