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

Re: [PATCH] binutils: slind modifications



On 4/27/06, Nikita V. Youshchenko <yoush@debian.org> wrote:
> > --- /dev/null 2006-04-06 17:49:18.425220240 +0400
> > +++ binutils/debian/cross.postinst.in 2006-04-26 18:04:12.000000000 +0400
> > @@ -0,0 +1,18 @@
> > +#!/bin/sh
> > +
> > +#set -e
> > +
> > +TARGET="__TARGET__"
> > +PREFIX="__PREFIX__"
> > +CONFIG="/etc/dpkg-cross/crosstools"
> > +if [ ! -d "$CONFIG" ]; then
> > +     echo "No dpkg-cross found"
> > +     exit 0
> > +fi
> > +
> > +grep "^$TARGET" $CONFIG > /dev/null 2>&1
> > +
> > +if [ "$1" == "configure" -a $? -ne 0 ]; then
> > +    echo "$TARGET strip default $PREFIX-strip" >> $CONFIG
> > +fi
>
> What for is this?
> Shouldn't dpkg-cross find needed strip binary automatically?
It fails at least for some cases and this forces correct strip tool
for a given architecture.

> And that 'grep' line I don't understand completely - it seems to me that it
> does nothing.
See the condition below, we check for grep's exit code. If we already
have a strip tool for a given architecture ($? is 0), we do nothing,
otherwise add this one that is shipped in our package.

--
I am free of all prejudices. I hate every one equally.

Reply to: