Hardlinks cannot be established over device/partition boundaries: >>> Original instance of package unmerged safely. ln: failed to create hard link ‘/var/lib/openntpd/chroot/etc/localtime’ => ‘/etc/localtime’: Invalid cross-device link * ERROR: net-misc/openntpd-20080406-r6::gentoo failed (postinst phase): * (no error message) * * Call stack: * ebuild.sh, line 93: Called pkg_postinst * environment, line 2864: Called die * The specific snippet of code: * ln /etc/localtime "${NTP_HOME}"/etc/localtime || die; * * If you need support, post the output of `emerge --info '=net-misc/openntpd-20080406-r6::gentoo'`, * the complete build log and the output of `emerge -pqv '=net-misc/openntpd-20080406-r6::gentoo'`. * The complete build log is located at '/var/tmp/portage/net-misc/openntpd-20080406-r6/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/net-misc/openntpd-20080406-r6/temp/environment'. * Working directory: '/usr/lib64/portage/pym' * S: '/var/tmp/portage/net-misc/openntpd-20080406-r6/work/openntpd-20080406p' !!! FAILED postinst: 1 In this case /var is a separate partition.
How do you like something like this? --- /var/lib/overlays/gentoo-x86/net-misc/openntpd/openntpd-20080406-r6.ebuild 2013-12-03 03:05:01.457058687 -0700 +++ openntpd-20080406-r6.ebuild 2013-12-03 03:05:00.577494086 -0700 @@ -74,11 +74,20 @@ systemd_newunit "${FILESDIR}/${PN}.service-${PV}-r3" ntpd.service } +pkg_config() { + if ! ln /etc/localtime "${EROOT}${NTP_HOME}"/etc/localtime ; then + cp /etc/localtime "${EROOT}${NTP_HOME}"/etc/localtime || die + einfo "We could not create a hardlink from /etc/localtime to ${NTP_HOME}/etc/localtime," + einfo "so please run 'emerge --config =${CATEGORY}/${PF}' whenever you changed" + einfo "your timezone." + fi +} + pkg_postinst() { # remove localtime file from previous installations rm -f "${EROOT}${NTP_HOME}"/etc/localtime - mkdir -p "${NTP_HOME}"/etc - ln /etc/localtime "${NTP_HOME}"/etc/localtime || die + mkdir -p "${EROOT}${NTP_HOME}"/etc + pkg_config chown -R root:root "${EROOT}${NTP_HOME}" || die use syslog && [[ -f ${EROOT}/var/log/ntpd.log ]] && \
Looks good.
+ 05 Dec 2013; Christoph Junghans <ottxor@gentoo.org> + openntpd-20080406-r6.ebuild: + fixed cross-device link issue (bug #493178) +