From d593bb95370f53ae2fa92c44bb6efcf1c5c61766 Mon Sep 17 00:00:00 2001 From: mischief Date: Wed, 27 May 2015 12:47:43 -0700 Subject: [PATCH] sys-libs/timezone-data: remove code that sets /etc/localtime we set leave /etc/localtime unset so that the default timezone is UTC. fixes #1265 --- ...b.ebuild => timezone-data-2015b-r1.ebuild} | 58 +------------------ 1 file changed, 1 insertion(+), 57 deletions(-) rename sdk_container/src/third_party/coreos-overlay/sys-libs/timezone-data/{timezone-data-2015b.ebuild => timezone-data-2015b-r1.ebuild} (62%) diff --git a/sdk_container/src/third_party/coreos-overlay/sys-libs/timezone-data/timezone-data-2015b.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-libs/timezone-data/timezone-data-2015b-r1.ebuild similarity index 62% rename from sdk_container/src/third_party/coreos-overlay/sys-libs/timezone-data/timezone-data-2015b.ebuild rename to sdk_container/src/third_party/coreos-overlay/sys-libs/timezone-data/timezone-data-2015b-r1.ebuild index 4d3b793751..8d362a0462 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-libs/timezone-data/timezone-data-2015b.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/sys-libs/timezone-data/timezone-data-2015b-r1.ebuild @@ -93,63 +93,7 @@ src_install() { fi } -get_TIMEZONE() { - local tz src="${EROOT}etc/timezone" - if [[ -e ${src} ]] ; then - tz=$(sed -e 's:#.*::' -e 's:[[:space:]]*::g' -e '/^$/d' "${src}") - else - tz="FOOKABLOIE" - fi - [[ -z ${tz} ]] && return 1 || echo "${tz}" -} - -pkg_preinst() { - local tz=$(get_TIMEZONE) - if ! use right_timezone && [[ ${tz} == right/* ]] ; then - eerror "Your timezone is set to '${tz}' but you have USE=-right_timezone." - die "Please fix your USE or timezone" - fi -} - -pkg_config() { - # make sure the /etc/localtime file does not get stale #127899 - local tz src="${EROOT}etc/timezone" etc_lt="${EROOT}etc/localtime" - - tz=$(get_TIMEZONE) || return 0 - if [[ ${tz} == "FOOKABLOIE" ]] ; then - elog "You do not have TIMEZONE set in ${src}." - - 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 "${EROOT}"/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 ${etc_lt}." - fi - return 0 - fi - - if [[ ! -e ${EROOT}/usr/share/zoneinfo/${tz} ]] ; then - elog "You have an invalid TIMEZONE setting in ${src}" - elog "Your ${etc_lt} has been reset to Factory; enjoy!" - tz="Factory" - fi - if [[ -L ${etc_lt} ]]; then - einfo "Skipping symlinked ${etc_lt}" - else - einfo "Updating ${etc_lt} with ${EROOT}usr/share/zoneinfo/${tz}" - cp -f "${EROOT}"/usr/share/zoneinfo/"${tz}" "${etc_lt}" - fi -} - pkg_postinst() { - rm -rf "${EROOT}"/usr/share/zoneinfo/.gentoo-upgrade & - pkg_config - wait + rm -rf "${EROOT}"/usr/share/zoneinfo/.gentoo-upgrade }