On 19/05/2019 19:51, Bruce Dubbs via blfs-dev wrote:
> On 5/19/19 11:05 AM, Pierre Labastie via blfs-dev wrote:
>> Hi,
>>
>> A lot of editing has to be done on BLFS scriptlets generated by jhalfs,
>> because there are some instructions for test and for installing docs, which
>> use optional dependencies. Presently, there is no way to know whether an
>> instruction in tag <screen><userinput> is a doc instruction, a test
>> instruction, or a really needed instructions. So the jhalfs outputs them, and
>> the user has to manually edit them (comment out, use only part of it, ...).
>>
>> The idea is to flag those instructions with an attribute of the <screen> tag,
>> but not a role attribute, because it would conflict with role="root" (some of
>> those instructions must be run as root). So my proposition is to add
>> remap="doc" if it is a doc instruction and remap="test" if it is a test
>> instruction.
>>
>> Then jhalfs can comment out those instructions, or generate them in full if
>> timing/sizing is requested.
>>
>> Would you agree with that? I would do the job of adding those tags into the
>> present book (and to update the template), but of course, other editors would
>> have to use them for new pages or new doc/test instructions.
> 
> remap doesn't quite feel right, but I can't find a better one.  I'd say that
> it is OK for our use.

Well, same "attribute hijacking" as for our use of remap in LFS.

> 
> Note that I'm pretty sure that you can do role="root test" or even role="test
> root doc" and use the xsl to test for any of the values. Just a thought.

Analyzing this is less easy: "root" and "test" are not needed at the same
stage of producing the script: "root" comes early, because what is needed
(sudo -E sh << ROOT_EOF ... ROOT_EOF) may enclose several role="root"
instructions, which we have to know in advance. "doc" comes later, when
commenting out lines. The xsl would need to read the same attribute twice (at
least), and examine the four posibilities each time (nothing, "root", "test",
"root test"). Remember that test processing is very limited in xslt. I'd say
it is much easier to separate the information. OTOH, we could use a role
attibute of <userinput> instead of a remap attribute of <screen>. But I fear
that it would be confusing to have 2 attibutes with the same name and
different meanings depending on where they are.

Pierre
-- 
http://lists.linuxfromscratch.org/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to