[jhalfs] 13/14: Fix some bugs in func_install_blfs

"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 30a444a477c81be74f78165f6098747231d11951
Author: Pierre Labastie <[email protected]>
AuthorDate: Fri Apr 1 10:22:57 2022 +0200

    Fix some bugs in func_install_blfs
    
    - do not try to copy downloaded files to $SRC_ARCHIVE: they may
      belong to another user, and so be non writable.
    - trunk/BOOK is not used anymore in BLFS/Makefile
    - do not make update a second time
---
 common/libs/func_install_blfs | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/common/libs/func_install_blfs b/common/libs/func_install_blfs
index c3d6763..47263de 100644
--- a/common/libs/func_install_blfs
+++ b/common/libs/func_install_blfs
@@ -22,8 +22,6 @@ fi
 # Set some harcoded envars to their proper values
 sed -i s@tracking-dir@$TRACKING_DIR@ \
     ${BUILDDIR}${BLFS_ROOT}/{Makefile,gen-makefile.sh,gen_pkg_book.sh}
-sed -i s@trunk/BOOK@$BLFS_TREE@ \
-    ${BUILDDIR}${BLFS_ROOT}/Makefile
 
 # If we have a working copy, copy it:
 if [[ "$BLFS_WORKING_COPY" = "y" ]]; then
@@ -64,7 +62,6 @@ 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
@@ -162,17 +159,17 @@ mv scripts $BUILDDIR$BLFS_ROOT
 # Generates a list containing download and copying instructions for tarballs
 echo -e '#!/bin/bash\nset -e\n' > $BUILDDIR$BLFS_ROOT/download_script
 sed -n -e '/PACKAGE=/,/^fi/{/^fi/a\
-cp $PACKAGE $JH_SRC_ARCHIVE
+[ ! -f "$JH_SRC_ARCHIVE/$PACKAGE" ] && cp $PACKAGE $JH_SRC_ARCHIVE
 p}' \
        -e '/|[ ]*md5sum/p' \
        -e '/PACKAGE1=/,/^fi/{/^fi/a\
-cp $PACKAGE1 $JH_SRC_ARCHIVE
+[ ! -f "$JH_SRC_ARCHIVE/$PACKAGE1" ] && cp $PACKAGE1 $JH_SRC_ARCHIVE
 p}' \
        -e '/PATCH=/,/^fi/{/^fi/a\
-cp $PATCH $JH_SRC_ARCHIVE
+[ ! -f "$JH_SRC_ARCHIVE/$PATCH" ] && cp $PATCH $JH_SRC_ARCHIVE
 p}' \
        -e '/URL=/,/^fi/{/^fi/a\
-cp $BOOTPACKG $JH_SRC_ARCHIVE
+[ ! -f "$JH_SRC_ARCHIVE/$BOOTPACKG" ] && cp $BOOTPACKG $JH_SRC_ARCHIVE
 p}' \
     $BUILDDIR$BLFS_ROOT/scripts/* >> $BUILDDIR$BLFS_ROOT/download_script
 chmod u+x $BUILDDIR$BLFS_ROOT/download_script

-- 
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.