mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-04-04 03:08:21 +08:00
honor custom RPM %_sourcedir
If the user redefines %_sourcedir in ~/.rpmmacros, `mbs-build local` will fail trying to build module-build-macros otherwise because rpmbuild will look for sources -- macros.modules -- in the wrong place.
This commit is contained in:
@@ -241,8 +241,10 @@ chmod 644 %buildroot/%_sysconfdir/rpm/macros.zz-modules
|
||||
|
||||
# We are not interested in the rpmbuild stdout...
|
||||
null_fd = open(os.devnull, 'w')
|
||||
execute_cmd(['rpmbuild', '-bs', '%s.spec' % name, '--define',
|
||||
'_topdir %s' % td], cwd=td, stdout=null_fd)
|
||||
execute_cmd(['rpmbuild', '-bs', '%s.spec' % name,
|
||||
'--define', '_topdir %s' % td,
|
||||
'--define', '_sourcedir %s' % sources_dir],
|
||||
cwd=td, stdout=null_fd)
|
||||
null_fd.close()
|
||||
sdir = os.path.join(td, "SRPMS")
|
||||
srpm_paths = glob.glob("%s/*.src.rpm" % sdir)
|
||||
|
||||
Reference in New Issue
Block a user