1 |
On 15:56 Thu 11 Oct , Roy Marples (uberlord) wrote: |
2 |
> 1.1 sys-apps/baselayout/baselayout-2.0.0_rc5.ebuild |
3 |
> |
4 |
> file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/baselayout/baselayout-2.0.0_rc5.ebuild?rev=1.1&view=markup |
5 |
> 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 |
6 |
|
7 |
> cp -p "${ROOT}usr/share/baselayout/${x}" ${ROOT}etc |
8 |
|
9 |
Two ROOT's to quote here, not just one. =) |
10 |
|
11 |
> # We need to copy svcdir if upgrading |
12 |
> if has_version "<sys-apps/${PN}-1.13.0_alpha" ; then |
13 |
> ( |
14 |
> . "${ROOT}etc/conf.d/rc" |
15 |
> svcdir="${svcdir:-/var/lib/init.d}" |
16 |
> einfo "Moving state from ${ROOT}${svcdir} to ${ROOT}lib/rcscripts/init.d" |
17 |
> cp -RPp "${ROOT}${svcdir}"/* "${ROOT}"lib/rcscripts/init.d |
18 |
> rm -rf "${ROOT}"lib/rcscripts/init.d/daemons \ |
19 |
> "${ROOT}"lib/rcscripts/init.d/console |
20 |
> umount "${ROOT}${svcdir}" 2>/dev/null |
21 |
> rm -rf "${ROOT}${svcdir}" |
22 |
> ) |
23 |
|
24 |
Can this be done in a code block instead, or do svdir and /etc/conf.d/rc |
25 |
sourcing pollute things too badly? |
26 |
|
27 |
> if has_version "<sys-apps/${PN}-1.13.0_alpha" ; then |
28 |
> ( |
29 |
> . "${ROOT}etc/conf.d/rc" |
30 |
> svcdir="${svcdir:-/var/lib/init.d}" |
31 |
> einfo "Moving state from ${ROOT}lib/rcscripts/init.d to ${ROOT}${svcdir}" |
32 |
> mkdir -p "${ROOT}${svcdir}" |
33 |
> cp -RPp "${ROOT}lib/rcscripts/init.d"/* "${ROOT}${svcdir}" |
34 |
> rm -rf "${ROOT}${svcdir}"/daemons |
35 |
> umount "${ROOT}lib/rcscripts/init.d" 2>/dev/null |
36 |
> rm -rf "${ROOT}lib/rcscripts/init.d" |
37 |
> ) |
38 |
|
39 |
Same question. Also, could this code, as well as the other cases I |
40 |
cropped out, simply be abstracted into a function instead? |
41 |
|
42 |
Thanks, |
43 |
Donnie |
44 |
-- |
45 |
gentoo-dev@g.o mailing list |