| |
@@ -23,12 +23,16 @@
|
| |
import os
|
| |
import sys
|
| |
import time
|
| |
+
|
| |
+ import rpm
|
| |
+
|
| |
from operator import attrgetter
|
| |
|
| |
from straight.plugin import load # pylint: disable=F0401
|
| |
|
| |
from .datasrc import BuildFilesSource, RpmDataSource, SourcesDataSource
|
| |
from .reports import write_template, write_xml_report, write_json
|
| |
+ from .review_dirs import ReviewDirs
|
| |
from .review_error import ReviewError
|
| |
from .settings import Settings
|
| |
from .spec_file import SpecFile
|
| |
@@ -284,9 +288,10 @@
|
| |
unless invoked from ChecksLister.
|
| |
"""
|
| |
_ChecksLoader.__init__(self)
|
| |
- self.spec = SpecFile(spec_file, self.flags)
|
| |
self.srpm = SRPMFile(srpm_file)
|
| |
self.srpm.unpack()
|
| |
+ rpm.addMacro('_sourcedir', ReviewDirs.srpm_unpacked)
|
| |
+ self.spec = SpecFile(spec_file, self.flags)
|
| |
self.data = self.Data()
|
| |
self.data.rpms = RpmDataSource(self.spec)
|
| |
self.data.buildsrc = BuildFilesSource()
|
| |
Parsing the spec first is impossible when macros involving sources like
%loadare present. Waiting for the SRPM unpacking and telling the rpm module where sources can be found enables the review of such packages.This would allow the hare package pending a review in Fedora to keep its single-pass bootstrap and still be reviewable with the help of fedora-review.
https://bugzilla.redhat.com/show_bug.cgi?id=2385991