On Thu, Nov 27, 2003, Michael Schloh wrote:

>     only allow exact section command matches in rc, and briefly explain
>     CORE and BASE grades in rpmtool
> [...]
>            #   check whether command exists in script at all
>   -        cmdline=`grep "^%$cmd" $rcdir/rc.$s_name`
>   +        cmdline=`grep "^%$cmd[^a-zA-Z0-9]" $rcdir/rc.$s_name`
> [...]

This is broken:

$ cmd="foo"; echo "%foo " | grep "^%$cmd[^a-zA-Z0-9]"
$ _

There can be just "%$cmd" on a single line without any options! So you
have _ALSO_ match against "^%$cmd\$" or even better compare literally
against "%$cmd" only!
                                       Ralf S. Engelschall
                                       [EMAIL PROTECTED]
                                       www.engelschall.com

______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
Developer Communication List                   [EMAIL PROTECTED]

Reply via email to