Re: [PATCH] kconfig: Add merge_config.sh script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2011-11-21 at 14:48 -0800, john stultz wrote:
> On Sat, 2011-11-19 at 01:51 -0500, Arnaud Lacombe wrote:
> > You'll find below some more nits
> > 
> > 1) bail out early on error.
> 
> Actually, I spoke a little too soon.
> 
> The set -e option causes us to bomb out if grep doesn't find a config
> option (grep returns 1 if nothing is found). So I'll have to drop that
> change for now.

Catching the error explicitly is easy enough, so folded in the following
fix (copied here from a terminal, so its whitespace damaged, I know) to
your patch:

@@ -20,8 +20,6 @@
 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 #  See the GNU General Public License for more details.

-set -e
-
 clean_up() {
        rm -f $TMP_FILE
        exit
@@ -68,6 +66,9 @@ TMP_FILE=$(mktemp ./.tmp.config.XXXXXXXXXX)
 for MERGE_FILE in $MERGE_LIST ; do
        echo "Merging $MERGE_FILE"
        CFG_LIST=$(sed -n "$SED_CONFIG_EXP" $MERGE_FILE)
+       if [ $? != 0 ] ; then
+               exit 1
+       fi

        for CFG in $CFG_LIST ; do
                grep -q -w $CFG $TMP_FILE


thanks
-john

--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux