On Thu, 2007-10-11 at 22:25 -0700, Donnie Berkholz wrote:
> > cp -p "${ROOT}usr/share/baselayout/${x}" ${ROOT}etc
> Two ROOT's to quote here, not just one. =)
Fixed, thanks
>
> > # 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?
Possibly. There should not be any collisions, but should also doesn't
mean won't in the future. I chose to take no chances.
>
> > 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?
Not really, they are different and I don't think you'd gain that much.
And for any avid readers of this ebuild, the similar functions for
baselayout-2 versions will be punted once it goes ~ARCH.
Thanks
Roy
--
[EMAIL PROTECTED] mailing list