public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in sys-apps/baselayout: ChangeLog baselayout-2.0.0_rc5.ebuild
       [not found] <E1Ig0Ov-0007Wd-EC@stork.gentoo.org>
@ 2007-10-12  5:25 ` Donnie Berkholz
  2007-10-12  6:51   ` Roy Marples
  0 siblings, 1 reply; 2+ messages in thread
From: Donnie Berkholz @ 2007-10-12  5:25 UTC (permalink / raw
  To: gentoo-dev, uberlord

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
-- 
gentoo-dev@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in sys-apps/baselayout: ChangeLog baselayout-2.0.0_rc5.ebuild
  2007-10-12  5:25 ` [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in sys-apps/baselayout: ChangeLog baselayout-2.0.0_rc5.ebuild Donnie Berkholz
@ 2007-10-12  6:51   ` Roy Marples
  0 siblings, 0 replies; 2+ messages in thread
From: Roy Marples @ 2007-10-12  6:51 UTC (permalink / raw
  To: gentoo-dev

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

-- 
gentoo-dev@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-10-12  7:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <E1Ig0Ov-0007Wd-EC@stork.gentoo.org>
2007-10-12  5:25 ` [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in sys-apps/baselayout: ChangeLog baselayout-2.0.0_rc5.ebuild Donnie Berkholz
2007-10-12  6:51   ` Roy Marples

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox