mirror of
https://github.com/peridotbuild/pv2.git
synced 2024-11-24 14:11:25 +00:00
processor fix
This commit is contained in:
parent
99035af3e9
commit
01a6696adc
@ -814,16 +814,18 @@ class GitImport(Import):
|
|||||||
if HAS_RPMAUTOSPEC and os.path.exists(source_git_repo_changelog):
|
if HAS_RPMAUTOSPEC and os.path.exists(source_git_repo_changelog):
|
||||||
# Check that the spec file really has %autochangelog
|
# Check that the spec file really has %autochangelog
|
||||||
AUTOCHANGELOG = False
|
AUTOCHANGELOG = False
|
||||||
for line in source_git_repo_spec:
|
with open(source_git_repo_spec, 'r') as spec_file:
|
||||||
if re.search(r'^%autochangelog', line):
|
for line in spec_file:
|
||||||
|
if re.match(r'^%autochangelog', line):
|
||||||
print('autochangelog found')
|
print('autochangelog found')
|
||||||
AUTOCHANGELOG = True
|
AUTOCHANGELOG = True
|
||||||
|
spec_file.close()
|
||||||
# It was easier to do this then reimplement logic
|
# It was easier to do this then reimplement logic
|
||||||
if AUTOCHANGELOG:
|
if AUTOCHANGELOG:
|
||||||
try:
|
try:
|
||||||
rpmautocl.process_distgit(
|
rpmautocl.process_distgit(
|
||||||
source_git_repo_path,
|
source_git_repo_spec,
|
||||||
'/tmp/{self.rpm_name}.spec'
|
f'/tmp/{self.rpm_name}.spec'
|
||||||
)
|
)
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
raise err.GenericError('There was an error with autospec.') from exc
|
raise err.GenericError('There was an error with autospec.') from exc
|
||||||
|
Loading…
Reference in New Issue
Block a user