[jhalfs] 09/14: try to fix func_install_blfs to work in all cases

"Git Owner" ([email protected] via alfs-discuss Mailing List) <[email protected]>
Newsgroups gmane.linux.lfs.automated
Message-ID <[email protected]>
This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch trunk
in repository jhalfs.

commit 2c1a7639907e771c3fadee3d17a313e4d5480249
Author: Pierre Labastie <[email protected]>
AuthorDate: Wed Mar 30 22:35:12 2022 +0200

    try to fix func_install_blfs to work in all cases
    
    WIP...
---
 common/libs/func_install_blfs | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/common/libs/func_install_blfs b/common/libs/func_install_blfs
index 129d33c..c3d6763 100644
--- a/common/libs/func_install_blfs
+++ b/common/libs/func_install_blfs
@@ -32,19 +32,31 @@ echo "copying the local BLFS working copy (may take some time)"
 # of blfs-xml, if blfs-xml already exists; --preserve=timestamps: if the local
 # book has already been validated, tmp is posterior to the others, and
 # validation will not be done again.
-  cp -ruT --preserve=timestamps $BLFS_WC_LOCATION \
+# sudo is needed because make (below) may already have been run and
+# may have put some files owned by root
+  sudo cp -ruT --preserve=timestamps $BLFS_WC_LOCATION \
                                 ${BUILDDIR}${BLFS_ROOT}/$BLFS_XML
 fi
 
 # Copy the LFS book. Note that now, the book is downloaded before running
 # the BLFS tools.
-cp -ruT --preserve=timestamps $BOOK \
+sudo cp -ruT --preserve=timestamps $BOOK \
                               ${BUILDDIR}${BLFS_ROOT}/$LFS_XML
 
 # Downloads the book if necessary, initialize the tracking file and the
 # package database.
+# updating first is needed if the xml sources have already been cloned
+# and we want to set the branches.
+# Note that if LFS-BRANCH or BLFS-BRANCH is empty, which may happen
+# if using a working copy, then the corresponding update is not
+# performed by make (see BLFS/Makefile).
 # sudo is needed if $BUILDDIR/var/lib is owned by root and /var/lib/jhalfs
 # has to be created
+sudo make -j1 -C $BUILDDIR$BLFS_ROOT             \
+          REV=$INITSYS                           \
+          LFS-BRANCH=${COMMIT}                   \
+          BLFS-BRANCH=${BLFS_TREE}               \
+          update
 sudo make -j1 -C $BUILDDIR$BLFS_ROOT             \
           REV=$INITSYS                           \
           TRACKING_DIR=$BUILDDIR$TRACKING_DIR    \
@@ -52,6 +64,7 @@ sudo make -j1 -C $BUILDDIR$BLFS_ROOT             \
           LFS-BRANCH="${COMMIT}"                 \
           BLFS_XML=$BUILDDIR$BLFS_ROOT/$BLFS_XML \
           BLFS-BRANCH=${BLFS_TREE}               \
+          update                                 \
           $BUILDDIR$BLFS_ROOT/packages.xml
 
 # But then $BUILDDIR/var/lib/ is owned by root if just created, which

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

-- 
http://lists.linuxfromscratch.org/sympa/info/alfs-discuss
Unsubscribe: See the above information page
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.