[Rpm-maint] [rpm-software-management/rpm] RFE: Syntax sugar for bconds with inherited defaults (#941)

Miro Hrončok notifications at github.com
Mon Nov 18 12:33:45 UTC 2019


I often find myself writing code like this:

```
%bcond_with some_thing

%if %{with some_thing}
%bcond_with some_other_thing
%else
%bcond_without some_other_thing
%endif
```

Or the other way around:

```
%bcond_with some_thing

%if %{with some_thing}
%bcond_without some_other_thing
%else
%bcond_with some_other_thing
%endif
```

This allows to do reasonable defaults based on other defaults:

 - if boostrapping, disable tests and documentation build
 - if compatibility package, disallow the devel subpackage

While preserving the ability to customize the bahavior using `--with`/ `--without`:

- disable tests even when not bootstrapping
- build the compatibility package with the devel subpackage

I'd like to have some kind of syntax sugar for this, such as for example:

```
%bcond_with some_thing
%bcond_inherit some_other_thing some_thing
# or
%bcond_antiinherit some_other_thing some_thing
```

Or:

```
%bcond_with some_thing
%bcond_some_thing_inherit some_other_thing
# or
%bcond_some_thing_antiinherit some_other_thing
```
Would that be desirable? I can work on a PR if we agree on the syntax.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/941
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20191118/2403a695/attachment.html>


More information about the Rpm-maint mailing list