#581 Specfile parser fixes
Merged by onosek. Opened by oturpe.
oturpe/rpkg spec-parser-read-patches  into  master

Download 581.patch

Fix 1: Consider Patch tags in specfile parser

Patch files can be uploaded to the lookaside cache
and referred to by Patch tags in the specfile.
The specfile parser did not consider this case,
leading to an error if a dist-git repo has such confiration.
Fixed by parsing the patch tags.

Resolves RHBZ#2010518

Fix 2: Continue execution if specfile parsing fails

The unused sources detection feature implemented by class SpecFile
is simply an optimization to avoid downloading unused sources.
The parsing is quite different from other steps performed by rpkg,
which also meant it can fail in new ways.
To avoid situations where an error in this optimization step
prevents usage that would otherwise succeed,
this commit changes handling of such errors from exiting
to logging the situation
and continuing with the assumption that all sources in the sources file
may be needed.

Resolves #583

rebased onto 8f66e5e3a8ae35f46224497583f6d0c473d4b74e

2 new commits added

  • Continue execution if specfile parsing fails
  • Consider Patch tags in specfile parser

Commit 7ede78fc fixes this pull-request

Pull-Request has been merged by onosek

Thanks for the fix. I just did some minor cosmetic changes.

Metadata