Michael J Gruber kirjoitti 16.1.2023 klo 14.46:
`--srpm` is named misleadingly, by the way, because it names the "transport of the
source" when indeed it implies a potentially different source version. That's
another reasons why removing it (the name) and making it the mode of operation for
`scratch-build` makes sense:
- `scratch-build` is about doing things from (your) scratch. That involves an srpm for
technical reasons.
- `build` is about building something pushed, and `--scratch` only changes where it is
build.
Actually, --srpm is named like that because you can also do 'fedpkg
scratch-build --srpm path/to/my/src.rpm', which does what you would
expect. Generating the srpm from the local working directory is just the
default when no path is given.
Now I'm wondering: Does `fedpkg build --srpm` imply `--scratch`?
I would hope so, and I'm really wondering whether any srpm-mode should belong to that
command at all. It's much clearer if `build` deals with sources "in the
buildsystem" only, and {copr,scratch,local,mock}-build with the local sources. (Yes,
`local` and `mockbuild` could have helpful aliases, too.)
I tried it. 'fedpkg build --srpm' is not a scratch build. However, Koji
does not accept such build requests: "ActionNotAllowed: policy violation
(build_from_srpm)".