Re: Forcing a script to bomb, etc.

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

 



Michael Jennings wrote:
On Friday, 12 October 2007, at 15:57:01 (-0700),
Philip Prindeville wrote:

 Ok, thanks.  Looking at the example:

 %if %{?_with_ssl:1}%{!?_with_ssl:0}

 that's a little more complicated than it needs to be, isn't it?

 I've seen:

 %if 0%{?_with_ssl:1}

 And that seems to work equally well...

Either will work.  "More clear" vs. "more complicated" is often in the
eye of the beholder.

Well, in this case, "more likely to be mistyped or having a missing curly brace" is the metric of undesirability. ;-)

 Right, but I don't want to capture the shell exit value of %(...)
 as an expression....  I want to bomb out.

I never said anything about %(...)

 I suppose I could have:

 %prep
 ...
 %if !<some sanity tests here>
    echo "This can't possibly be correct." 1>&2
    exit 1
 %endif

If you think that's necessary.

I'm open to suggestions of a better way.


That's what I wanted to do, but it got slapped down.

You'll learn over time whose advice to listen to and whose to ignore.
You may have chosen poorly.  :-)

Well, as the project owner, he pretty much gets the final word.

 We could add an AutobuilderHint: field to the header that wouldn't
 do anything, but that autobuilders could grovel out and use as the
 default set of arguments...

Such a tag would be completely non-portable and entirely outside the
scope of anything RPM should be managing.

Michael




_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux