#589 Fix srpm and binary rpm lookup in lint subcommand
Merged by onosek. Opened by oturpe.
oturpe/rpkg use-layout-parameters-in-lint  into  master

Download 589.patch

Subcommand lint was looking for srpm only in repository root,
and for rpms only with globs of form %{ARCH}/*.rpm.
This works in many cases,
but not when the config option results_dir is set to subdir
or when (if ever) SRPMLayout is used.
Fixed by using relevant layout parameters
when looking for files to lint.

It is difficult to account for layout parameter rpmfilename properly.
In addition to a basename,
that parameter can contain a path relative to rpmdir
and may contain rpm macros.
Since macro evaluation is not possible in the rpkg lint context,
a simple heuristic is used instead,
covering the known cases:

  1. only basename
  2. relative path %{ARCH}.

Also, support for linting mockbuild results is added.
As mockbuild is arguably even more important than local build,
cases where both mockbuild and local build results are present,
mockbuild results are selected.

Resolves #586

rebased onto a61ac06cef18d0b5e409c08795f48d2ee0c062f5

rebased onto 5bf8cc24dea5d5fb1ba5c66dfd7bb58d42c3cc01

pretty please pagure-ci rebuild

Thanks for the improvement.

Commit 324b9b05 fixes this pull-request

Pull-Request has been merged by onosek

Metadata