On 15:56 Thu 11 Oct , Roy Marples (uberlord) wrote:
> 1.1 sys-apps/baselayout/baselayout-2.0.0_rc5.ebuild
>
> file :
> http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/baselayout/baselayout-2.0.0_rc5.ebuild?rev=1.1&view=markup
> plain:
> http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/baselayout/baselayout-2.0.0_rc5.ebuild?rev=1.1&content-type=text/plain
> cp -p "${ROOT}usr/share/baselayout/${x}" ${ROOT}etc
Two ROOT's to quote here, not just one. =)
> # We need to copy svcdir if upgrading
> if has_version "<sys-apps/${PN}-1.13.0_alpha" ; then
> (
> . "${ROOT}etc/conf.d/rc"
> svcdir="${svcdir:-/var/lib/init.d}"
> einfo "Moving state from ${ROOT}${svcdir} to
> ${ROOT}lib/rcscripts/init.d"
> cp -RPp "${ROOT}${svcdir}"/* "${ROOT}"lib/rcscripts/init.d
> rm -rf "${ROOT}"lib/rcscripts/init.d/daemons \
> "${ROOT}"lib/rcscripts/init.d/console
> umount "${ROOT}${svcdir}" 2>/dev/null
> rm -rf "${ROOT}${svcdir}"
> )
Can this be done in a code block instead, or do svdir and /etc/conf.d/rc
sourcing pollute things too badly?
> if has_version "<sys-apps/${PN}-1.13.0_alpha" ; then
> (
> . "${ROOT}etc/conf.d/rc"
> svcdir="${svcdir:-/var/lib/init.d}"
> einfo "Moving state from ${ROOT}lib/rcscripts/init.d to
> ${ROOT}${svcdir}"
> mkdir -p "${ROOT}${svcdir}"
> cp -RPp "${ROOT}lib/rcscripts/init.d"/* "${ROOT}${svcdir}"
> rm -rf "${ROOT}${svcdir}"/daemons
> umount "${ROOT}lib/rcscripts/init.d" 2>/dev/null
> rm -rf "${ROOT}lib/rcscripts/init.d"
> )
Same question. Also, could this code, as well as the other cases I
cropped out, simply be abstracted into a function instead?
Thanks,
Donnie
--
[EMAIL PROTECTED] mailing list