#701 Fix `copr-build` command with `results_dir=subdir` option
Merged by onosek. Opened by oturpe.
oturpe/rpkg copr-build-with-results_dir  into  master

Download 701.patch

Command copr-build was always assuming to find the srpm in the project root directory.
However, srpm command is a dependency for copr-build, and that command does respect results_dir option.
This led copr-build to fail when results_dir=subdir was set:

Error: File rust-retry-1.3.1-5.fc40.src.rpm not found

Fix by using srcrpmdir parameter from the project's Layout to find the srpm.

Signed-off-by: Otto Liljalaakso otto.liljalaakso@iki.fi

I have tested that with this change, COPR builds start correctly with results_dir being both set to subdir and omitted.

rebased onto ce83c214463fceb9ec89d2aeb288595fb4b39329

rebased onto c7efc7c2398dedbb5e46253a750485f4b700550e

Failing tests adjusted to new behavior (which did not actually change, just relative path changed to absolute), and added new test for checking results_dir = subdir option.

rebased onto 710df01255c39b57d0cd90b2b6775b1e4f5052a1

Thanks for the fix (... and unit tests of course).

Pull-Request has been merged by onosek

Metadata