[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: grep in spec file causes rpmbuild to abort with bad exit status
- From: marks <marks adax com>
- To: RPM Package Manager <rpm-list redhat com>
- Subject: Re: grep in spec file causes rpmbuild to abort with bad exit status
- Date: Tue, 9 Jan 2007 16:42:24 -0800 (PST)
Yes, I was using the $? return code. Your suggestion works perfectly.
Thanks. :)
On Wed, 10 Jan 2007, Luciano Miguel Ferreira Rocha wrote:
> Date: Wed, 10 Jan 2007 00:28:56 +0000
> From: Luciano Miguel Ferreira Rocha <strange nsk no-ip org>
> Reply-To: RPM Package Manager <rpm-list redhat com>
> To: rpm-list redhat com
> Subject: Re: grep in spec file causes rpmbuild to abort with bad exit
> status
>
> On Tue, Jan 09, 2007 at 04:14:23PM -0800, marks wrote:
> > Hi,
> >
> > I'm using grep in the install section of my spec file to determine
> > if another file does or does not contain a piece of information.
> > rpmbuild is aborting with a "bad exit status" message when grep
> > does not find the item of interest.
>
> How are you doing that check? Using "$?"?
>
> If you use it directly:
> if grep -q bla file; then
> ....
>
> rpmbuild doesn't exit.
>
> If you want to ignore the exit code of a command, then add ||: (ie. or true).
> Note that will change $? to true.
>
> > Is there a way to turn off rpmbuild's abort of the entire build
> > temporarily while I do the grep?
>
> set +e
> grep
> set -e
>
>
--
Thanks,
Mark Sincerbox
Adax, Inc.
1-510-548-7047 x129
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]