diff options
author | Ross Burton <ross.burton@intel.com> | 2018-01-25 17:06:24 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-01-29 08:49:50 +0000 |
commit | ffa0eb5fdc47c91d8a18d2c3a7a19e578ac284c9 (patch) | |
tree | edc7bd0b5a377fdbdc48e16ee40835455acb3081 /meta/classes | |
parent | add548491a46d7452f2d2f9b5924f672c8a18f1d (diff) | |
download | poky-ffa0eb5fdc47c91d8a18d2c3a7a19e578ac284c9.tar.gz |
archiver: don't require that images are built using RPM to build SRPMs
The requirement for images being built using RPM is too strict to have access to
the RPM functions, simply checking that package_rpm is in PACKAGE_CLASSES is
sufficient.
Also fail if SRPMs are requested but package_rpm isn't enabled, instead of
silently not doing what we were asked.
(From OE-Core rev: cdae5c41e4f67a8757efc5ce1ef11d730edc3af1)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/archiver.bbclass | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass index ec80ad47a4..0a9c5c1640 100644 --- a/meta/classes/archiver.bbclass +++ b/meta/classes/archiver.bbclass | |||
@@ -114,10 +114,9 @@ python () { | |||
114 | if ar_recipe == "1": | 114 | if ar_recipe == "1": |
115 | d.appendVarFlag('do_deploy_archives', 'depends', ' %s:do_ar_recipe' % pn) | 115 | d.appendVarFlag('do_deploy_archives', 'depends', ' %s:do_ar_recipe' % pn) |
116 | 116 | ||
117 | # Output the srpm package | 117 | # Output the SRPM package |
118 | ar_srpm = d.getVarFlag('ARCHIVER_MODE', 'srpm') | 118 | if d.getVarFlag('ARCHIVER_MODE', 'srpm') == "1" and d.getVar('PACKAGES'): |
119 | if ar_srpm == "1": | 119 | if "package_rpm" in d.getVar('PACKAGE_CLASSES'): |
120 | if d.getVar('PACKAGES') != '' and d.getVar('IMAGE_PKGTYPE') == 'rpm': | ||
121 | d.appendVarFlag('do_deploy_archives', 'depends', ' %s:do_package_write_rpm' % pn) | 120 | d.appendVarFlag('do_deploy_archives', 'depends', ' %s:do_package_write_rpm' % pn) |
122 | if ar_dumpdata == "1": | 121 | if ar_dumpdata == "1": |
123 | d.appendVarFlag('do_package_write_rpm', 'depends', ' %s:do_dumpdata' % pn) | 122 | d.appendVarFlag('do_package_write_rpm', 'depends', ' %s:do_dumpdata' % pn) |
@@ -129,6 +128,8 @@ python () { | |||
129 | d.appendVarFlag('do_package_write_rpm', 'depends', ' %s:do_ar_patched' % pn) | 128 | d.appendVarFlag('do_package_write_rpm', 'depends', ' %s:do_ar_patched' % pn) |
130 | elif ar_src == "configured": | 129 | elif ar_src == "configured": |
131 | d.appendVarFlag('do_package_write_rpm', 'depends', ' %s:do_ar_configured' % pn) | 130 | d.appendVarFlag('do_package_write_rpm', 'depends', ' %s:do_ar_configured' % pn) |
131 | else: | ||
132 | bb.fatal("ARCHIVER_MODE[srpm] needs package_rpm in PACKAGE_CLASSES") | ||
132 | } | 133 | } |
133 | 134 | ||
134 | # Take all the sources for a recipe and puts them in WORKDIR/archiver-work/. | 135 | # Take all the sources for a recipe and puts them in WORKDIR/archiver-work/. |