mirror of
https://git.yoctoproject.org/poky
synced 2026-04-27 03:32:12 +02:00
package_rpm.bbclass: Add RPMSPEC_PREAMBLE
Add a way to add arbitrary text to the top of a spec file. This can be useful for adding specific tags to the produced binaries for tracking purposes. (From OE-Core rev: c01a92408d267bcc5365bf8495035f6021a49ced) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
77edb006bb
commit
71ed507f88
@@ -817,6 +817,12 @@ python write_specfile () {
|
||||
except OSError:
|
||||
raise bb.build.FuncFailed("unable to open spec file for writing.")
|
||||
|
||||
# RPMSPEC_PREAMBLE is a way to add arbitrary text to the top
|
||||
# of the generated spec file
|
||||
external_preamble = d.getVar("RPMSPEC_PREAMBLE", True)
|
||||
if external_preamble:
|
||||
specfile.write(external_preamble + "\n")
|
||||
|
||||
for line in spec_preamble_top:
|
||||
specfile.write(line + "\n")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user