diff options
author | Joshua Lock <josh@linux.intel.com> | 2010-07-07 14:59:02 +0100 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-07-24 00:46:57 +0100 |
commit | 8760cde94aca80a920cb50230d61c187d3cfeee4 (patch) | |
tree | 208300c2be553d55b36ebc6e5f644d3b19cb429a /meta/classes/package_rpm.bbclass | |
parent | 60fa21d157823b9c6ffd4a066d3afdd2f0224d17 (diff) | |
download | poky-8760cde94aca80a920cb50230d61c187d3cfeee4.tar.gz |
rpm: switch to using RPM 5
Switch to RPM5 as our rpm provider of choice and update the recipe to the latest
stable release.
Signed-off-by: Joshua Lock <josh@linux.intel.com>
Modify the package_rpm.bbclass to understand the macro and command line changes
present in rpm5.
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Diffstat (limited to 'meta/classes/package_rpm.bbclass')
-rw-r--r-- | meta/classes/package_rpm.bbclass | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass index 4fdab34f67..b829d0d068 100644 --- a/meta/classes/package_rpm.bbclass +++ b/meta/classes/package_rpm.bbclass | |||
@@ -2,14 +2,14 @@ inherit package | |||
2 | 2 | ||
3 | #IMAGE_PKGTYPE ?= "rpm" | 3 | #IMAGE_PKGTYPE ?= "rpm" |
4 | 4 | ||
5 | RPMBUILD="rpmbuild --short-circuit ${RPMOPTS}" | ||
6 | IMAGE_PKGTYPE ?= "rpm" | 5 | IMAGE_PKGTYPE ?= "rpm" |
7 | 6 | ||
8 | RPMBUILDPATH="${WORKDIR}/rpm" | 7 | RPMBUILDPATH="${WORKDIR}/rpm" |
9 | 8 | ||
10 | RPMOPTS="--rcfile=${WORKDIR}/rpmrc" | 9 | RPMOPTS="" |
11 | RPMOPTS="--rcfile=${WORKDIR}/rpmrc --target ${TARGET_SYS}" | 10 | RPMBUILDOPTS="--target ${TARGET_SYS} --define '_topdir ${RPMBUILDPATH}' --buildroot ${ROOT}" |
12 | RPM="rpm ${RPMOPTS}" | 11 | RPM="${BUILD_ARCH}-${BUILD_OS}-rpm ${RPMOPTS}" |
12 | RPMBUILD="${BUILD_ARCH}-${BUILD_OS}-rpmbuild --short-circuit ${RPMBUILDOPTS}" | ||
13 | 13 | ||
14 | python write_specfile() { | 14 | python write_specfile() { |
15 | version = bb.data.getVar('PV', d, 1) | 15 | version = bb.data.getVar('PV', d, 1) |
@@ -21,7 +21,6 @@ python write_specfile() { | |||
21 | "RPMPV": "Version", | 21 | "RPMPV": "Version", |
22 | "PR": "Release", | 22 | "PR": "Release", |
23 | "DESCRIPTION": "%description", | 23 | "DESCRIPTION": "%description", |
24 | "ROOT": "BuildRoot", | ||
25 | "LICENSE": "License", | 24 | "LICENSE": "License", |
26 | "SECTION": "Group", | 25 | "SECTION": "Group", |
27 | "pkg_postinst": "%post", | 26 | "pkg_postinst": "%post", |
@@ -91,7 +90,9 @@ python write_specfile() { | |||
91 | bb.data.setVar(varname, " ".join(newdeps), d) | 90 | bb.data.setVar(varname, " ".join(newdeps), d) |
92 | 91 | ||
93 | fix_dep_versions('RDEPENDS') | 92 | fix_dep_versions('RDEPENDS') |
94 | fix_dep_versions('RRECOMMENDS') | 93 | |
94 | # Recommends is not supported by rpm at this time | ||
95 | # fix_dep_versions('RRECOMMENDS') | ||
95 | 96 | ||
96 | bb.build.exec_func("mapping_rename_hook", d) | 97 | bb.build.exec_func("mapping_rename_hook", d) |
97 | 98 | ||
@@ -105,7 +106,7 @@ python write_specfile() { | |||
105 | fd.write("%s: %s\n" % (outstring, dep)) | 106 | fd.write("%s: %s\n" % (outstring, dep)) |
106 | 107 | ||
107 | write_dep_field('RDEPENDS', 'Requires') | 108 | write_dep_field('RDEPENDS', 'Requires') |
108 | write_dep_field('RRECOMMENDS', 'Recommends') | 109 | # write_dep_field('RRECOMMENDS', 'Recommends') |
109 | 110 | ||
110 | fd.write("Summary\t: .\n") | 111 | fd.write("Summary\t: .\n") |
111 | 112 | ||
@@ -139,14 +140,10 @@ python write_specfile() { | |||
139 | bb.movefile(rpm, outrpm) | 140 | bb.movefile(rpm, outrpm) |
140 | } | 141 | } |
141 | 142 | ||
142 | |||
143 | rpm_prep() { | 143 | rpm_prep() { |
144 | if [ ! -e ${WORKDIR}/rpmrc ]; then | 144 | if [ ! -e ${WORKDIR}/rpmrc ]; then |
145 | mkdir -p ${RPMBUILDPATH}/{SPECS,RPMS/{i386,i586,i686,noarch,ppc,mips,mipsel,arm},SRPMS,SOURCES,BUILD} | 145 | mkdir -p ${RPMBUILDPATH}/{SPECS,RPMS,SRPMS,SOURCES,BUILD} |
146 | echo 'macrofiles:${STAGING_DIR_NATIVE}/usr/lib/rpm/macros:${WORKDIR}/macros' > ${WORKDIR}/rpmrc | 146 | fi |
147 | echo '%_topdir ${RPMBUILDPATH}' > ${WORKDIR}/macros | ||
148 | echo '%_repackage_dir ${WORKDIR}' >> ${WORKDIR}/macros | ||
149 | fi | ||
150 | } | 147 | } |
151 | 148 | ||
152 | python do_package_rpm () { | 149 | python do_package_rpm () { |