diff options
author | Mark Hatle <mark.hatle@windriver.com> | 2011-12-22 19:01:36 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-12-24 10:05:45 +0000 |
commit | 71ed507f8821770eee28454aa45a7db303a21e88 (patch) | |
tree | 1bfc92b400333c18b7c5cec6e393e0123a2eb778 /meta/classes | |
parent | 77edb006bb3509c741775fad322a48ba8fea61df (diff) | |
download | poky-71ed507f8821770eee28454aa45a7db303a21e88.tar.gz |
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>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/package_rpm.bbclass | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass index 469526be7a..d03dc3f883 100644 --- a/meta/classes/package_rpm.bbclass +++ b/meta/classes/package_rpm.bbclass | |||
@@ -817,6 +817,12 @@ python write_specfile () { | |||
817 | except OSError: | 817 | except OSError: |
818 | raise bb.build.FuncFailed("unable to open spec file for writing.") | 818 | raise bb.build.FuncFailed("unable to open spec file for writing.") |
819 | 819 | ||
820 | # RPMSPEC_PREAMBLE is a way to add arbitrary text to the top | ||
821 | # of the generated spec file | ||
822 | external_preamble = d.getVar("RPMSPEC_PREAMBLE", True) | ||
823 | if external_preamble: | ||
824 | specfile.write(external_preamble + "\n") | ||
825 | |||
820 | for line in spec_preamble_top: | 826 | for line in spec_preamble_top: |
821 | specfile.write(line + "\n") | 827 | specfile.write(line + "\n") |
822 | 828 | ||