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.
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