Gentoo Archives: gentoo-dev

From: Roy Marples <uberlord@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in sys-apps/baselayout: ChangeLog baselayout-2.0.0_rc5.ebuild
Date: Fri, 12 Oct 2007 07:07:39
Message-Id: 1192171860.3238.5.camel@uberpc.marples.name
In Reply to: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in sys-apps/baselayout: ChangeLog baselayout-2.0.0_rc5.ebuild by Donnie Berkholz
1 On Thu, 2007-10-11 at 22:25 -0700, Donnie Berkholz wrote:
2 > > cp -p "${ROOT}usr/share/baselayout/${x}" ${ROOT}etc
3 > Two ROOT's to quote here, not just one. =)
4
5 Fixed, thanks
6
7 >
8 > > # We need to copy svcdir if upgrading
9 > > if has_version "<sys-apps/${PN}-1.13.0_alpha" ; then
10 > > (
11 > > . "${ROOT}etc/conf.d/rc"
12 > > svcdir="${svcdir:-/var/lib/init.d}"
13 > > einfo "Moving state from ${ROOT}${svcdir} to ${ROOT}lib/rcscripts/init.d"
14 > > cp -RPp "${ROOT}${svcdir}"/* "${ROOT}"lib/rcscripts/init.d
15 > > rm -rf "${ROOT}"lib/rcscripts/init.d/daemons \
16 > > "${ROOT}"lib/rcscripts/init.d/console
17 > > umount "${ROOT}${svcdir}" 2>/dev/null
18 > > rm -rf "${ROOT}${svcdir}"
19 > > )
20 >
21 > Can this be done in a code block instead, or do svdir and /etc/conf.d/rc
22 > sourcing pollute things too badly?
23
24 Possibly. There should not be any collisions, but should also doesn't
25 mean won't in the future. I chose to take no chances.
26
27 >
28 > > if has_version "<sys-apps/${PN}-1.13.0_alpha" ; then
29 > > (
30 > > . "${ROOT}etc/conf.d/rc"
31 > > svcdir="${svcdir:-/var/lib/init.d}"
32 > > einfo "Moving state from ${ROOT}lib/rcscripts/init.d to ${ROOT}${svcdir}"
33 > > mkdir -p "${ROOT}${svcdir}"
34 > > cp -RPp "${ROOT}lib/rcscripts/init.d"/* "${ROOT}${svcdir}"
35 > > rm -rf "${ROOT}${svcdir}"/daemons
36 > > umount "${ROOT}lib/rcscripts/init.d" 2>/dev/null
37 > > rm -rf "${ROOT}lib/rcscripts/init.d"
38 > > )
39 >
40 > Same question. Also, could this code, as well as the other cases I
41 > cropped out, simply be abstracted into a function instead?
42
43 Not really, they are different and I don't think you'd gain that much.
44 And for any avid readers of this ebuild, the similar functions for
45 baselayout-2 versions will be punted once it goes ~ARCH.
46
47 Thanks
48
49 Roy
50
51 --
52 gentoo-dev@g.o mailing list