#749 Feature: Enhance `install` subcommand with build conditionals
Merged by onosek. Opened by guillermodotn.
guillermodotn/rpkg master  into  master

Download 749.patch

This PR introduces two new command-line flags for on-the-fly modification of rpmbuild arguments directly from the install subcommand:
- --with <bcond>: Appends a build condition (bcond) to rpmbuild arguments.
- --without <bcond>: Removes or disables a build condition (bcond) from rpmbuild arguments.

Also corrects a typo and extends doc-string.

This PR is meant to address the following issue raised downstream at fedpkg repo:
https://pagure.io/fedpkg/issue/541

Adding the argument like this is not backwards compatible, and tool building on rpkg would need to the option if it calls the method. It would be less disruptive to add the new argument to the end and provide a default value.

1 new commit added

  • fix: Make installargs in install method optional for backward compatibility and handle in cmd.extend.

Looking at the result, it looks OK at first sight. There are 4 commits:
1. Typo change - This change can be in its own commit eventually. I usually don't do this for such minor changes. It just adds overhead.
2. First version
3. Small addon
4. Fixed version - arguments position fixed.

I think that commits 2, 3 and 4 should be squashed together. The development history just adds confusion, in my opinion.

@lsedlar is right - one has to be careful about it in rpkg. This code can be used even by tools that are not maintained by us, and thus, potentially hard to fix on their side.

2 new commits added

  • feat: Add `--with` and `--without` CLI options to `install` subcommand, and enhance documentation for Commands.local
  • type: fix typo in requirements README.

Let's keep the commit's title length reasonable. For example:

`install`: add rpmbuild arguments `--with` and `--without`

Solves: https://pagure.io/fedpkg/issue/541
As per the manual https://manpages.ubuntu.com/manpages/focal/man1/pagure.1.html
"Solves" is not among the magic words. Use "Resolves" or "Fixes"

Otherwise, it looks fine.

2 new commits added

  • feat: Add `--with` and `--without` CLI options to `install` subcommand, and
  • type: fix typo in requirements README.

2 new commits added

  • install`: add rpmbuild arguments `--with` and `--without
  • type: fix typo in requirements README.

Pull-Request has been merged by onosek

Metadata