buildscripts update (surprise surprise :-) ) (2.2.6)

Erik-Jan ej.lfs at xs4all.nl
Thu Apr 3 08:18:48 PST 2003


David Goodlad wrote:
> 
> Hi there
> 
> I've tried your buildscripts from v2.2.4 through these latest ones,
> and they all seem to have a little error with the grep when checking
> for tarballs/patches... I get this line twice:
> 
> grep: Invalid content of \{\}
> 
> Once before the "Checking for required tarballs in
> /mnt/lfs/usr/patches" and once before "Checking for required tarballs
> in /mnt/lfs/usr/patches".
> 
> I've looked through the code but am not sure why it would give this
> error...   Any ideas?
> 
> Thanks!
> Dave
> 

Hi Dave,

I had the same problem with grep, also version 2.4.2. Mu understanding
of the problem is that grep sees { and } as special characters and tries
to expand it somehow, but it should see it as a literal {
By adding a backslash before the { and } it works.

I've attached two patches, one for version 2.2.2 (should work with
2.2.[2-5]) and one for 2.2.6.

Groetjes,
Erik-Jan
-------------- next part --------------
--- build-init-2.2.6.sh.orig	2003-04-03 15:58:06.000000000 +0000
+++ build-init-2.2.6.sh	2003-04-03 16:03:49.000000000 +0000
@@ -409,7 +409,7 @@
 
    # Retrieve package defs from unpack_tarball calls into a list
    local PKGS=$( cat ${SCRIPTLIST} | \
-                 grep -E '^[[:blank:]]*unpack_tarball (\w|-)*\${\w*}' | \
+                 grep -E '^[[:blank:]]*unpack_tarball (\w|-)*\$\{\w*\}' | \
                  awk '{print $2}' | sort -u )
 
    echo -e "\nChecking for required tarballs in ${TARBALLS}\n${BRKLN}"
@@ -467,7 +467,7 @@
 
    # Retrieve package defs from apply_patch calls into a list
    local PATCHLIST=$( cat ${SCRIPTLIST} | \
-                      grep -E '^[[:blank:]]*apply_patch (\w|-)*\${\w*}' | \
+                      grep -E '^[[:blank:]]*apply_patch (\w|-)*\$\{\w*\}' | \
                       awk '{print $2}' | sort -u )
    
    echo -e "\nChecking for required patches in ${PATCHES}\n${BRKLN}"
-------------- next part --------------
--- build-init-2.2.2.sh.orig	2003-03-27 14:04:56.000000000 +0000
+++ build-init-2.2.2.sh	2003-03-27 14:07:25.000000000 +0000
@@ -390,7 +390,7 @@
 
    # Retrieve package defs from unpack_tarball calls into a list
    local PKGS=$( cat ${SCRIPTLIST} | \
-                 grep -E '^[[:blank:]]*unpack_tarball (\w|-)*\${\w*}' | \
+                 grep -E '^[[:blank:]]*unpack_tarball (\w|-)*\$\{\w*\}' | \
                  awk '{print $2}' | sort -u )
 
    echo -e "\nChecking for required tarballs in ${TARBALLS}\n${BRKLN}"
@@ -448,7 +448,7 @@
 
    # Retrieve package defs from apply_patch calls into a list
    local PATCHLIST=$( cat ${SCRIPTLIST} | \
-                      grep -E '[[:blank:]]*apply_patch (\w|-)*\${\w*}' | \
+                      grep -E '[[:blank:]]*apply_patch (\w|-)*\$\{\w*\}' | \
                       awk '{print $2}' | sort -u )
    
    echo -e "\nChecking for required patches in ${PATCHES}\n${BRKLN}"


More information about the lfs-dev mailing list