/[gentoo-x86]/sys-libs/timezone-data/timezone-data-2008c.ebuild
Gentoo

Diff of /sys-libs/timezone-data/timezone-data-2008c.ebuild

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.1 Revision 1.2
1# Copyright 1999-2008 Gentoo Foundation 1# Copyright 1999-2008 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/sys-libs/timezone-data/Attic/timezone-data-2008c.ebuild,v 1.1 2008/05/31 10:23:57 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/sys-libs/timezone-data/Attic/timezone-data-2008c.ebuild,v 1.2 2008/06/03 14:42:36 vapier Exp $
4 4
5inherit eutils toolchain-funcs flag-o-matic 5inherit eutils toolchain-funcs flag-o-matic
6 6
7code_ver=${PV/c/a} 7code_ver=${PV/c/a}
8data_ver=${PV} 8data_ver=${PV}
54 54
55pkg_config() { 55pkg_config() {
56 # make sure the /etc/localtime file does not get stale #127899 56 # make sure the /etc/localtime file does not get stale #127899
57 local tz src 57 local tz src
58 58
59 if [[ -e ${ROOT}/etc/timezone ]] ; then 59 if has_version '<sys-apps/baselayout-2' ; then
60 src="/etc/timezone"
61 tz=$(<"${ROOT}"/etc/timezone)
62 else
63 src="/etc/conf.d/clock" 60 src="/etc/conf.d/clock"
64 tz=$(unset TIMEZONE ; source "${ROOT}"/etc/conf.d/clock ; echo ${TIMEZONE-FOOKABLOIE}) 61 tz=$(unset TIMEZONE ; source "${ROOT}"/etc/conf.d/clock ; echo ${TIMEZONE-FOOKABLOIE})
65 [[ -z ${tz} ]] && return 0 62 [[ -z ${tz} ]] && return 0
66 if [[ ${tz} == "FOOKABLOIE" ]] ; then 63 else
67 elog "You do not have TIMEZONE set in /etc/conf.d/clock." 64 src="/etc/timezone"
68 if [[ ! -e ${ROOT}/etc/localtime ]] ; then 65 if [[ -e ${ROOT}/etc/timezone ]] ; then
69 cp -f "${ROOT}"/usr/share/zoneinfo/Factory "${ROOT}"/etc/localtime 66 tz=$(<"${ROOT}"/etc/timezone)
70 elog "Setting /etc/localtime to Factory."
71 else 67 else
72 elog "Skipping auto-update of /etc/localtime." 68 tz="FOOKABLOIE"
73 fi
74 return 0
75 fi 69 fi
70 fi
71
72 if [[ ${tz} == "FOOKABLOIE" ]] ; then
73 elog "You do not have TIMEZONE set in ${src}."
74
75 if [[ ! -e ${ROOT}/etc/localtime ]] ; then
76 cp -f "${ROOT}"/usr/share/zoneinfo/Factory "${ROOT}"/etc/localtime
77 elog "Setting /etc/localtime to Factory."
78 else
79 elog "Skipping auto-update of /etc/localtime."
80 fi
81 return 0
76 fi 82 fi
77 83
78 if [[ ! -e ${ROOT}/usr/share/zoneinfo/${tz} ]] ; then 84 if [[ ! -e ${ROOT}/usr/share/zoneinfo/${tz} ]] ; then
79 elog "You have an invalid TIMEZONE setting in ${src}" 85 elog "You have an invalid TIMEZONE setting in ${src}"
80 elog "Your /etc/localtime has been reset to Factory; enjoy!" 86 elog "Your /etc/localtime has been reset to Factory; enjoy!"

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.20