Pierre Labastie wrote:
> Le 11/01/2014 18:13, Bruce Dubbs a écrit :
>> Pierre Labastie wrote:
>>> Le 11/01/2014 04:18, Bruce Dubbs a écrit :
>>>> Pierre Labastie wrote:
>>>>> Le 10/01/2014 00:08, Bruce Dubbs a écrit :
>>>>>> Pierre,
>>>>>>
>>>>>> In LFS, I want to add an instruction to chapter06/revisedchroot.xml
>>>>>> which is actually titled "Cleaning Up". When I tested jhalfs,
>>>>>> 129-revisedchroot is not run in the Makefile, but
>>>>>> lfs-commands/chapter06/129-revisedchroot is created.
>>>>>>
>>>>>> The revised 'chroot' command should not be run but the new 'rm' command
>>>>>> should be. I'd like to see a role="noauto" (or equivalent) for
>>>>>> <userinput> to skip the chroot command, but also run 129-revisedchroot
>>>>>> in the Makefile.
>>>>>>
>>>>>> Would that be hard to do?
>>>>>>
>>>>>> -- Bruce
>>>>>>
>>>>> I think I could try to do that during the week-end. The easy part is to
>>>>> run
>>>>> the script in the Makefile. The harder part is to split the script,
>>>>> because
>>>>> the chroot instruction is needed too (variable CHROOT2 in the Makefile),
>>>>> but
>>>>> of course should not be run when the script is run. So I think I'll split
>>>>> the
>>>>> script into 129-1-revisedchroot and 129-2-revisedchroot, use the -1 for
>>>>> extracting the chroot command and run the -2 in the Makefile. For
>>>>> discriminating the two strings, I do not think a special role=""
>>>>> attribute is
>>>>> needed, but I need to be sure that the new command to be run does not
>>>>> contain
>>>>> "chroot". Is that the case?
>>>>
>>>> Yes, that's the case, but it may be useful to have a general way to add
>>>> an instruction but not have jhalfs include it. That's what I had in
>>>> mind with the role attribute. Another thought is something like
>>>> role='comment' and have the instruction(s) in that code chunk preceded
>>>> with a #.
>>>>
>>>> -- Bruce
>>>>
>>> Why not use "role='nodump'"? It is enough for jhalfs.
>>
>> OK, I forgot about that. Now we only need to get the section in the
>> Makefile.
>>
>> -- Bruce
>>
> OK, I assume the "chroot ..." instruction will have the role='nodump'
> attribute. I think it'll be easier if the other "chroot ..." instruction (in
> "Entering the Chroot Environment") has the attribute too. I can then include
> in the Makefile all what has no 'nodump' attribute, and get the chroot
> instructions separately.
I;ll do that at next commit.
> Maybe, it would be easier if you could send me a patch of what you have in
> mind, which I could apply to my local copy in order to test.
It's really quite short right now:
$ svn diff
Index: chapter06/chroot.xml
===================================================================
--- chapter06/chroot.xml (revision 10439)
+++ chapter06/chroot.xml (working copy)
@@ -15,7 +15,7 @@
class="username">root</systemitem>, run the following command to
enter the
realm that is, at the moment, populated with only the temporary
tools:</para>
-<screen><userinput>chroot "$LFS" /tools/bin/env -i \
+<screen role="nodump"><userinput>chroot "$LFS" /tools/bin/env -i \
HOME=/root \
TERM="$TERM" \
PS1='\u:\w\$ ' \
Index: chapter06/revisedchroot.xml
===================================================================
--- chapter06/revisedchroot.xml (revision 10439)
+++ chapter06/revisedchroot.xml (working copy)
@@ -10,10 +10,16 @@
<title>Cleaning Up</title>
+ <title>Cleaning Up</title>
+
+ <para>Finally, clean up some extra files left around from running
tests:</para>
+
+<screen><userinput>rm -rf /run/* /tmp/*</userinput></screen>
+
<para>From now on, when reentering the chroot environment after
exiting, use the following modified chroot command:</para>
-<screen><userinput>chroot "$LFS" /usr/bin/env -i \
+<screen role="nodump"><userinput>chroot "$LFS" /usr/bin/env -i \
HOME=/root TERM="$TERM" PS1='\u:\w\$ ' \
PATH=/bin:/usr/bin:/sbin:/usr/sbin \
/bin/bash --login</userinput></screen>
-- Bruce
--
http://linuxfromscratch.org/mailman/listinfo/alfs-discuss
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page