diff options
author | Mike Frysinger <vapier@gentoo.org> | 2011-10-19 20:12:23 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2011-10-19 20:12:23 +0000 |
commit | da4beb8067b66a3ec2a263dadb2b3ff29d9f2aa9 (patch) | |
tree | 77be102a0f12c08d0bdd76adbeefe010cff42367 /sys-libs/timezone-data | |
parent | Stabilize for everyone. (diff) | |
download | gentoo-2-da4beb8067b66a3ec2a263dadb2b3ff29d9f2aa9.tar.gz gentoo-2-da4beb8067b66a3ec2a263dadb2b3ff29d9f2aa9.tar.bz2 gentoo-2-da4beb8067b66a3ec2a263dadb2b3ff29d9f2aa9.zip |
If /etc/localtime is a broken symlink, and /etc/timezone does not exist, assume the user is maintaining their own thing and leave /etc/localtime alone.
(Portage version: 2.2.0_alpha65/cvs/Linux x86_64)
Diffstat (limited to 'sys-libs/timezone-data')
-rw-r--r-- | sys-libs/timezone-data/ChangeLog | 8 | ||||
-rw-r--r-- | sys-libs/timezone-data/timezone-data-2011j.ebuild | 26 | ||||
-rw-r--r-- | sys-libs/timezone-data/timezone-data-2011k.ebuild | 26 | ||||
-rw-r--r-- | sys-libs/timezone-data/timezone-data-2011l.ebuild | 26 |
4 files changed, 55 insertions, 31 deletions
diff --git a/sys-libs/timezone-data/ChangeLog b/sys-libs/timezone-data/ChangeLog index 69f99a3ab5df..f40a4ae02253 100644 --- a/sys-libs/timezone-data/ChangeLog +++ b/sys-libs/timezone-data/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sys-libs/timezone-data # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/timezone-data/ChangeLog,v 1.258 2011/10/19 20:10:58 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/timezone-data/ChangeLog,v 1.259 2011/10/19 20:12:23 vapier Exp $ + + 19 Oct 2011; Mike Frysinger <vapier@gentoo.org> timezone-data-2011j.ebuild, + timezone-data-2011k.ebuild, timezone-data-2011l.ebuild: + If /etc/localtime is a broken symlink, and /etc/timezone does not exist, + assume the user is maintaining their own thing and leave /etc/localtime + alone. 19 Oct 2011; Mike Frysinger <vapier@gentoo.org> timezone-data-2011j.ebuild: Stabilize for everyone. diff --git a/sys-libs/timezone-data/timezone-data-2011j.ebuild b/sys-libs/timezone-data/timezone-data-2011j.ebuild index 55cc8dd5340c..5e83a735b626 100644 --- a/sys-libs/timezone-data/timezone-data-2011j.ebuild +++ b/sys-libs/timezone-data/timezone-data-2011j.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/timezone-data/timezone-data-2011j.ebuild,v 1.2 2011/10/19 20:10:58 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/timezone-data/timezone-data-2011j.ebuild,v 1.3 2011/10/19 20:12:23 vapier Exp $ inherit eutils toolchain-funcs flag-o-matic @@ -64,7 +64,7 @@ src_install() { pkg_config() { # make sure the /etc/localtime file does not get stale #127899 - local tz src + local tz src etc_lt="${ROOT}etc/localtime" if has_version '<sys-apps/baselayout-2' ; then src="${ROOT}etc/conf.d/clock" @@ -82,23 +82,29 @@ pkg_config() { if [[ ${tz} == "FOOKABLOIE" ]] ; then elog "You do not have TIMEZONE set in ${src}." - if [[ ! -e ${ROOT}/etc/localtime ]] ; then - cp -f "${ROOT}"/usr/share/zoneinfo/Factory "${ROOT}"/etc/localtime - elog "Setting ${ROOT}etc/localtime to Factory." + if [[ ! -e ${etc_lt} ]] ; then + # if /etc/localtime is a symlink somewhere, assume they + # know what they're doing and they're managing it themselves + if [[ ! -L ${etc_lt} ]] ; then + cp -f "${ROOT}"/usr/share/zoneinfo/Factory "${etc_lt}" + elog "Setting ${etc_lt} to Factory." + else + elog "Assuming your ${etc_lt} symlink is what you want; skipping update." + fi else - elog "Skipping auto-update of ${ROOT}etc/localtime." + elog "Skipping auto-update of ${etc_lt}." fi return 0 fi if [[ ! -e ${ROOT}/usr/share/zoneinfo/${tz} ]] ; then elog "You have an invalid TIMEZONE setting in ${src}" - elog "Your ${ROOT}etc/localtime has been reset to Factory; enjoy!" + elog "Your ${etc_lt} has been reset to Factory; enjoy!" tz="Factory" fi - einfo "Updating ${ROOT}etc/localtime with ${ROOT}usr/share/zoneinfo/${tz}" - [[ -L ${ROOT}/etc/localtime ]] && rm -f "${ROOT}"/etc/localtime - cp -f "${ROOT}"/usr/share/zoneinfo/"${tz}" "${ROOT}"/etc/localtime + einfo "Updating ${etc_lt} with ${ROOT}usr/share/zoneinfo/${tz}" + [[ -L ${etc_lt} ]] && rm -f "${etc_lt}" + cp -f "${ROOT}"/usr/share/zoneinfo/"${tz}" "${etc_lt}" } pkg_postinst() { diff --git a/sys-libs/timezone-data/timezone-data-2011k.ebuild b/sys-libs/timezone-data/timezone-data-2011k.ebuild index 0732fc3e98b4..b6c2aea5749b 100644 --- a/sys-libs/timezone-data/timezone-data-2011k.ebuild +++ b/sys-libs/timezone-data/timezone-data-2011k.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/timezone-data/timezone-data-2011k.ebuild,v 1.2 2011/10/07 15:23:20 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/timezone-data/timezone-data-2011k.ebuild,v 1.3 2011/10/19 20:12:23 vapier Exp $ inherit eutils toolchain-funcs flag-o-matic @@ -66,7 +66,7 @@ src_install() { pkg_config() { # make sure the /etc/localtime file does not get stale #127899 - local tz src + local tz src etc_lt="${ROOT}etc/localtime" if has_version '<sys-apps/baselayout-2' ; then src="${ROOT}etc/conf.d/clock" @@ -84,23 +84,29 @@ pkg_config() { if [[ ${tz} == "FOOKABLOIE" ]] ; then elog "You do not have TIMEZONE set in ${src}." - if [[ ! -e ${ROOT}/etc/localtime ]] ; then - cp -f "${ROOT}"/usr/share/zoneinfo/Factory "${ROOT}"/etc/localtime - elog "Setting ${ROOT}etc/localtime to Factory." + if [[ ! -e ${etc_lt} ]] ; then + # if /etc/localtime is a symlink somewhere, assume they + # know what they're doing and they're managing it themselves + if [[ ! -L ${etc_lt} ]] ; then + cp -f "${ROOT}"/usr/share/zoneinfo/Factory "${etc_lt}" + elog "Setting ${etc_lt} to Factory." + else + elog "Assuming your ${etc_lt} symlink is what you want; skipping update." + fi else - elog "Skipping auto-update of ${ROOT}etc/localtime." + elog "Skipping auto-update of ${etc_lt}." fi return 0 fi if [[ ! -e ${ROOT}/usr/share/zoneinfo/${tz} ]] ; then elog "You have an invalid TIMEZONE setting in ${src}" - elog "Your ${ROOT}etc/localtime has been reset to Factory; enjoy!" + elog "Your ${etc_lt} has been reset to Factory; enjoy!" tz="Factory" fi - einfo "Updating ${ROOT}etc/localtime with ${ROOT}usr/share/zoneinfo/${tz}" - [[ -L ${ROOT}/etc/localtime ]] && rm -f "${ROOT}"/etc/localtime - cp -f "${ROOT}"/usr/share/zoneinfo/"${tz}" "${ROOT}"/etc/localtime + einfo "Updating ${etc_lt} with ${ROOT}usr/share/zoneinfo/${tz}" + [[ -L ${etc_lt} ]] && rm -f "${etc_lt}" + cp -f "${ROOT}"/usr/share/zoneinfo/"${tz}" "${etc_lt}" } pkg_postinst() { diff --git a/sys-libs/timezone-data/timezone-data-2011l.ebuild b/sys-libs/timezone-data/timezone-data-2011l.ebuild index 31e2783fc725..1887dd0cc302 100644 --- a/sys-libs/timezone-data/timezone-data-2011l.ebuild +++ b/sys-libs/timezone-data/timezone-data-2011l.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/timezone-data/timezone-data-2011l.ebuild,v 1.1 2011/10/10 15:30:13 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/timezone-data/timezone-data-2011l.ebuild,v 1.2 2011/10/19 20:12:23 vapier Exp $ inherit eutils toolchain-funcs flag-o-matic @@ -66,7 +66,7 @@ src_install() { pkg_config() { # make sure the /etc/localtime file does not get stale #127899 - local tz src + local tz src etc_lt="${ROOT}etc/localtime" if has_version '<sys-apps/baselayout-2' ; then src="${ROOT}etc/conf.d/clock" @@ -84,23 +84,29 @@ pkg_config() { if [[ ${tz} == "FOOKABLOIE" ]] ; then elog "You do not have TIMEZONE set in ${src}." - if [[ ! -e ${ROOT}/etc/localtime ]] ; then - cp -f "${ROOT}"/usr/share/zoneinfo/Factory "${ROOT}"/etc/localtime - elog "Setting ${ROOT}etc/localtime to Factory." + if [[ ! -e ${etc_lt} ]] ; then + # if /etc/localtime is a symlink somewhere, assume they + # know what they're doing and they're managing it themselves + if [[ ! -L ${etc_lt} ]] ; then + cp -f "${ROOT}"/usr/share/zoneinfo/Factory "${etc_lt}" + elog "Setting ${etc_lt} to Factory." + else + elog "Assuming your ${etc_lt} symlink is what you want; skipping update." + fi else - elog "Skipping auto-update of ${ROOT}etc/localtime." + elog "Skipping auto-update of ${etc_lt}." fi return 0 fi if [[ ! -e ${ROOT}/usr/share/zoneinfo/${tz} ]] ; then elog "You have an invalid TIMEZONE setting in ${src}" - elog "Your ${ROOT}etc/localtime has been reset to Factory; enjoy!" + elog "Your ${etc_lt} has been reset to Factory; enjoy!" tz="Factory" fi - einfo "Updating ${ROOT}etc/localtime with ${ROOT}usr/share/zoneinfo/${tz}" - [[ -L ${ROOT}/etc/localtime ]] && rm -f "${ROOT}"/etc/localtime - cp -f "${ROOT}"/usr/share/zoneinfo/"${tz}" "${ROOT}"/etc/localtime + einfo "Updating ${etc_lt} with ${ROOT}usr/share/zoneinfo/${tz}" + [[ -L ${etc_lt} ]] && rm -f "${etc_lt}" + cp -f "${ROOT}"/usr/share/zoneinfo/"${tz}" "${etc_lt}" } pkg_postinst() { |