[BusyBox 0000733]: unreliable/nonportable script generating bb_config.h (fix included)

bugs at busybox.net bugs at busybox.net
Mon Feb 20 11:13:38 UTC 2006


The following issue has been CLOSED 
====================================================================== 
http://busybox.net/bugs/view.php?id=733 
====================================================================== 
Reported By:                rfelker
Assigned To:                BusyBox
====================================================================== 
Project:                    BusyBox
Issue ID:                   733
Category:                   Other
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     closed
Resolution:                 not fixable
Fixed in Version:           
====================================================================== 
Date Submitted:             02-18-2006 23:43 PST
Last Modified:              02-20-2006 03:13 PST
====================================================================== 
Summary:                    unreliable/nonportable script generating bb_config.h
(fix included)
Description: 
The sed command used for generating bb_config.h from config.h does not work
on my system. I'm not sure if the problem is at the makefile level (GNU
make 3.79), the shell level (bash 1.14.7), or the sed level (GNU sed 3.02)
(I forget the makefile quoting semantics), but the script produces "n"
instead of newlines when attempting to break lines. Here is much simpler
code that will do the same thing portably:

@sed -e 's/#undef CONFIG_\(.*\)/#define ENABLE_\1 0/' \
    -e '/#define CONFIG_/{;p;s/#define CONFIG_/#define ENABLE_/;}' \
        < $< >> $@

instead of the current:

@sed -e 's/#undef CONFIG_\(.*\)/#define ENABLE_\1 0/' \
    -e 's/#define CONFIG_\(.*\)/#define CONFIG_\1\n#define ENABLE_\1/' \
        < $< >> $@

Additional simplifications could be done too, of course.

====================================================================== 

---------------------------------------------------------------------- 
 vapier - 02-18-06 23:56  
---------------------------------------------------------------------- 
your sed sucks

the -i option was not added until sed-4.x ... which itself was released
over four years ago

read the mailing list, this is a known "issue"

side note, your make may cause problems as well ... iirc, 3.79 does not
support '|' in the dependency list, but this is in make 3.80 (which also
was released over four years ago) 

---------------------------------------------------------------------- 
 rfelker - 02-19-06 00:07  
---------------------------------------------------------------------- 
Maybe my sed is ancient, but it has all features required by susv3. The
same issues could arise with any non-GNU version of sed as well. Why do
you insist on requiring GNU extensions to sed, when I've offered a fix
that will work on every version of sed ever created and that's probably
faster (or at least simpler to understand since it does not rely on
backreferences)? 

---------------------------------------------------------------------- 
 vodz - 02-20-06 03:13  
---------------------------------------------------------------------- 
Outdated. Current busybox have not this script. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
02-18-06 23:43  rfelker        New Issue                                    
02-18-06 23:43  rfelker        Status                   new => assigned     
02-18-06 23:43  rfelker        Assigned To               => BusyBox         
02-18-06 23:56  vapier         Note Added: 0001111                          
02-18-06 23:56  vapier         Status                   assigned => closed  
02-18-06 23:56  vapier         Resolution               open => won't fix   
02-19-06 00:07  rfelker        Status                   closed => feedback  
02-19-06 00:07  rfelker        Resolution               won't fix => reopened
02-19-06 00:07  rfelker        Note Added: 0001112                          
02-20-06 03:13  vodz           Note Added: 0001121                          
02-20-06 03:13  vodz           Status                   feedback => closed  
02-20-06 03:13  vodz           Resolution               reopened => not fixable
======================================================================




More information about the busybox-cvs mailing list