1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-09 17:39:31 +00:00

package_rpm.bbclass: Fix an issue where complementary installs fail

Also ensure that we always cleanup the temporary install manifest files,
some of them will cause problems if they exist in multiple install
attempts.

Finally verify that the lists remain uniquely sorted otherwise the
complementary install may install the same files numerous times,
triggering a failure.

(From OE-Core rev: 4f2a290cbcc6c21afbb2a6e6148efdef4d135b41)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Mark Hatle
2012-10-05 11:21:51 -07:00
committed by Richard Purdie
parent 99dabeb2e9
commit fdabda6345
+9 -5
View File
@@ -324,11 +324,15 @@ package_install_internal_rpm () {
rm -f $m rm -f $m
fi fi
done done
sort -u ${target_rootfs}/install/original_solution.manifest -o ${target_rootfs}/install/original_solution.manifest.new
mv ${target_rootfs}/install/original_solution.manifest.new ${target_rootfs}/install/original_solution.manifest
fi fi
# Setup manifest of packages to install... # Setup manifest of packages to install...
mkdir -p ${target_rootfs}/install mkdir -p ${target_rootfs}/install
rm -f ${target_rootfs}/install/install.manifest rm -f ${target_rootfs}/install/install.manifest
rm -f ${target_rootfs}/install/install_multilib.manifest
rm -f ${target_rootfs}/install/install_attemptonly.manifest
# Uclibc builds don't provide this stuff... # Uclibc builds don't provide this stuff...
if [ x${TARGET_OS} = "xlinux" ] || [ x${TARGET_OS} = "xlinux-gnueabi" ] ; then if [ x${TARGET_OS} = "xlinux" ] || [ x${TARGET_OS} = "xlinux-gnueabi" ] ; then
@@ -428,7 +432,7 @@ package_install_internal_rpm () {
fi fi
# Now that we have a solution, pull out a list of what to install... # Now that we have a solution, pull out a list of what to install...
echo "Manifest: ${target_rootfs}/install/install.manifest" echo "Manifest: ${target_rootfs}/install/install_solution.manifest"
${RPM} -D "_dbpath ${target_rootfs}/install" -qa --qf "%{packageorigin}\n" \ ${RPM} -D "_dbpath ${target_rootfs}/install" -qa --qf "%{packageorigin}\n" \
--root "${target_rootfs}/install" \ --root "${target_rootfs}/install" \
-D "__dbi_txn create nofsync private" \ -D "__dbi_txn create nofsync private" \
@@ -459,8 +463,8 @@ package_install_internal_rpm () {
fi fi
cat ${target_rootfs}/install/install_solution.manifest > ${target_rootfs}/install/total_solution.manifest cat ${target_rootfs}/install/install_solution.manifest \
cat ${target_rootfs}/install/install_multilib_solution.manifest >> ${target_rootfs}/install/total_solution.manifest ${target_rootfs}/install/install_multilib_solution.manifest | sort -u > ${target_rootfs}/install/total_solution.manifest
# Construct install scriptlet wrapper # Construct install scriptlet wrapper
cat << EOF > ${WORKDIR}/scriptlet_wrapper cat << EOF > ${WORKDIR}/scriptlet_wrapper
@@ -521,8 +525,8 @@ EOF
if [ "${INSTALL_COMPLEMENTARY_RPM}" = "1" ] ; then if [ "${INSTALL_COMPLEMENTARY_RPM}" = "1" ] ; then
# Only install packages not already installed (dependency calculation will # Only install packages not already installed (dependency calculation will
# almost certainly have added some that have been) # almost certainly have added some that have been)
sort ${target_rootfs}/install/original_solution.manifest > ${target_rootfs}/install/original_solution_sorted.manifest sort -u ${target_rootfs}/install/original_solution.manifest > ${target_rootfs}/install/original_solution_sorted.manifest
sort ${target_rootfs}/install/total_solution.manifest > ${target_rootfs}/install/total_solution_sorted.manifest sort -u ${target_rootfs}/install/total_solution.manifest > ${target_rootfs}/install/total_solution_sorted.manifest
comm -2 -3 ${target_rootfs}/install/total_solution_sorted.manifest \ comm -2 -3 ${target_rootfs}/install/total_solution_sorted.manifest \
${target_rootfs}/install/original_solution_sorted.manifest > \ ${target_rootfs}/install/original_solution_sorted.manifest > \
${target_rootfs}/install/diff.manifest ${target_rootfs}/install/diff.manifest