summaryrefslogtreecommitdiff
path: root/meta/classes/package_rpm.bbclass
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2011-02-15 22:20:49 -0600
committerSaul Wold <sgw@linux.intel.com>2011-02-16 07:34:51 -0800
commitca649ef8253cbf69062322b5bdee4123ee4c4eca (patch)
treee6006e59ece4109391ddd09ad683bc28821cce5d /meta/classes/package_rpm.bbclass
parent0e4aa13e9eef50533d8385b7fa638f33d4248e78 (diff)
downloadopenembedded-core-ca649ef8253cbf69062322b5bdee4123ee4c4eca.tar.gz
openembedded-core-ca649ef8253cbf69062322b5bdee4123ee4c4eca.tar.bz2
openembedded-core-ca649ef8253cbf69062322b5bdee4123ee4c4eca.tar.xz
openembedded-core-ca649ef8253cbf69062322b5bdee4123ee4c4eca.zip
rpm: Add the ability to use the platform file during install
Add a new rpm macro, rpmrc_platform_path to specify an alternative platform file. This is required to allow the dep resolver to identify compatible packages. Also workaround a minor problem with the --showrc command in RPM. A bug has been reported upstream on this. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Diffstat (limited to 'meta/classes/package_rpm.bbclass')
-rw-r--r--meta/classes/package_rpm.bbclass15
1 files changed, 10 insertions, 5 deletions
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index cc262dc83..215be8d60 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -219,7 +219,8 @@ package_install_internal_rpm () {
# Generate an install solution by doing a --justdb install, then recreate it with
# an actual package install!
- ${RPM} -D "_rpmds_sysinfo_path ${target_rootfs}/etc/rpm/sysinfo" \
+ ${RPM} --predefine "_rpmds_sysinfo_path ${target_rootfs}/etc/rpm/sysinfo" \
+ --predefine "_rpmrc_platform_path ${target_rootfs}/etc/rpm/platform" \
-D "_dbpath ${target_rootfs}/install" -D "`cat ${confbase}.macro`" \
-D "__dbi_txn create nofsync" \
-U --justdb --noscripts --notriggers --noparentdirs --nolinktos --ignoresize \
@@ -235,7 +236,8 @@ package_install_internal_rpm () {
exit 1
fi
echo "Attempting $pkg_name..." >> "${WORKDIR}/temp/log.do_${task}_attemptonly.${PID}"
- ${RPM} -D "_rpmds_sysinfo_path ${target_rootfs}/etc/rpm/sysinfo" \
+ ${RPM} --predefine "_rpmds_sysinfo_path ${target_rootfs}/etc/rpm/sysinfo" \
+ --predefine "_rpmrc_platform_path ${target_rootfs}/etc/rpm/platform" \
-D "_dbpath ${target_rootfs}/install" -D "`cat ${confbase}.macro`" \
-D "__dbi_txn create nofsync private" \
-U --justdb --noscripts --notriggers --noparentdirs --nolinktos --ignoresize \
@@ -254,7 +256,8 @@ package_install_internal_rpm () {
cat /dev/null > ${target_rootfs}/install/recommend.list
while [ $loop -eq 1 ]; do
# Dump the full set of recommends...
- ${RPM} -D "_rpmds_sysinfo_path ${target_rootfs}/etc/rpm/sysinfo" \
+ ${RPM} --predefine "_rpmds_sysinfo_path ${target_rootfs}/etc/rpm/sysinfo" \
+ --predefine "_rpmrc_platform_path ${target_rootfs}/etc/rpm/platform" \
-D "_dbpath ${IMAGE_ROOTFS}/install" -D "`cat ${confbase}.macro`" \
-D "__dbi_txn create nofsync private" \
-qa --qf "[%{RECOMMENDS}\n]" | sort -u > ${target_rootfs}/install/recommend
@@ -273,7 +276,8 @@ package_install_internal_rpm () {
continue
fi
echo "Attempting $pkg_name..." >> "${WORKDIR}/temp/log.do_{task}_recommend.${PID}"
- ${RPM} -D "_rpmds_sysinfo_path ${target_rootfs}/etc/rpm/sysinfo" \
+ ${RPM} --predefine "_rpmds_sysinfo_path ${target_rootfs}/etc/rpm/sysinfo" \
+ --predefine "_rpmrc_platform_path ${target_rootfs}/etc/rpm/platform" \
-D "_dbpath ${target_rootfs}/install" -D "`cat ${confbase}.macro`" \
-D "__dbi_txn create nofsync private" \
-U --justdb --noscripts --notriggers --noparentdirs --nolinktos --ignoresize \
@@ -293,7 +297,8 @@ package_install_internal_rpm () {
# Attempt install
${RPM} --root ${target_rootfs} \
- -D "_rpmds_sysinfo_path ${target_rootfs}/etc/rpm/sysinfo" \
+ --predefine "_rpmds_sysinfo_path ${target_rootfs}/etc/rpm/sysinfo" \
+ --predefine "_rpmrc_platform_path ${target_rootfs}/etc/rpm/platform" \
-D "_dbpath ${rpmlibdir}" \
--noscripts --notriggers --noparentdirs --nolinktos \
-D "__dbi_txn create nofsync private" \