On 09/11/2018 04:39 AM, Pierre Labastie wrote:
On 9/11/18 7:36 AM, Bruce Dubbs wrote:
On 09/10/2018 11:10 PM, Kevin Buckley wrote:

I have no problem with you making those changes, but will raise the issue of
whether the dump-commands is useful at all.  Why not just remove the
dump-commands target from the Makefile?

But it seems to do exactly what its name suggests it should,
if run as part of the "all:" target.

Indeed, I have been comparing it's output with the commands
I ran for an 8.0 LFS build, that I had saved by hand (so as to
add extra XML into my local copy of the 8.3 Book), and, give
or take a few expected differences, it's a match.

If anything the "dump-commands" target is a useful test of whether
the "examples" and "real commands" are marked up correctly, no ?

jhalfs does that.  Check it out.


Well, not in chapter 4 ;) Right now, in jhalfs, the commands from chapter 4 are not read from the book.

It's not easy to automate chapter 4 commands, because they depend on the existence of the lfs user and specially the lfs home directory and the files in it. If there is already an lfs user, and for some reason, the bash startup files are different from what is in the book, it may not be fair to change them... One way out of this could be to always create a new user (with a random name, say x78tu6), but then, all the commands such as "groupadd lfs" should be rewritten by jhalfs to "groupadd x78tu6". Not sure that the equivalent (in xsl language) of a sed command "s/lfs/x78tu6/" would do.

Another possibility could be to run chapter 5 as $USER (not lfs), and to use an "envar" file source'd (possibly with environment reset) at the beginning of each scriptlet. That would depart from the book, though.

I understand that jhalfs does not address Chapters 1-4 of the book directly. There are too many variables that can change (partition, user, source location, etc). Yes, it can download files form Chapter 3, but the user specifies the LFS location.

Those chapters do not need to be automated, especially since it is designed essentially as an editor's development tool.

What I was pointing out was that the extraction of the commands in Chapters 5 and 6 where the bulk of the book is located is done there.

  -- Bruce

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

Reply via email to