summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2012-11-13 20:56:36 +0800
committerScott Garman <scott.a.garman@intel.com>2012-11-29 18:35:30 -0800
commit1f5113ae91ed639cf06fcbb9431b460d7a06bbbc (patch)
treef03986472b67f74f82f0b0643a2ae77c15e54948
parent1a6f61d9493bdbade256dc6c19bbffe75a2684a4 (diff)
downloadopenembedded-core-1f5113ae91ed639cf06fcbb9431b460d7a06bbbc.tar.gz
openembedded-core-1f5113ae91ed639cf06fcbb9431b460d7a06bbbc.tar.bz2
openembedded-core-1f5113ae91ed639cf06fcbb9431b460d7a06bbbc.zip
package_rpm.bbclass: Fix incremental rpm image generation
Fix the incremental rpm image generation, it didn't work since the code has been changed. The btmanifest should have a ".manifest" suffix, so that it can be moved to ${T} by rootfs_rpm.bbclass: mv ${IMAGE_ROOTFS}/install/*.manifest ${T}/ Note: The locale pkgs would always be re-installed. [YOCTO #2690] (From OE-Core rev: 5149630746626c6d416f26ab9dd1c7213fcd8c50) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/package_rpm.bbclass20
1 files changed, 8 insertions, 12 deletions
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index ffe3b312ff..e2bec2d444 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -168,28 +168,24 @@ rpm_common_comand () {
rpm_update_pkg () {
manifest=$1
- btmanifest=$manifest.bt
+ btmanifest=$manifest.bt.manifest
+ pre_btmanifest=${T}/${btmanifest##/*/}
local target_rootfs="${INSTALL_ROOTFS_RPM}"
# Save the rpm's build time for incremental image generation, and the file
# would be moved to ${T}
- rm -f $btmanifest
for i in `cat $manifest`; do
# Use "rpm" rather than "${RPM}" here, since we don't need the
# '--dbpath' option
- echo "$i `rpm -qp --qf '%{BUILDTIME}\n' $i`" >> $btmanifest
- done
+ echo "$i `rpm -qp --qf '%{BUILDTIME}\n' $i`"
+ done | sort -u > $btmanifest
# Only install the different pkgs if incremental image generation is set
- if [ "${INC_RPM_IMAGE_GEN}" = "1" -a -f ${T}/total_solution_bt.manifest -a \
+ if [ "${INC_RPM_IMAGE_GEN}" = "1" -a -f "$pre_btmanifest" -a \
"${IMAGE_PKGTYPE}" = "rpm" ]; then
- cur_list="$btmanifest"
- pre_list="${T}/total_solution_bt.manifest"
- sort -u $cur_list -o $cur_list
- sort -u $pre_list -o $pre_list
- comm -1 -3 $cur_list $pre_list | sed 's#.*/\(.*\)\.rpm .*#\1#' > \
+ comm -1 -3 $btmanifest $pre_btmanifest | sed 's#.*/\(.*\)\.rpm .*#\1#' > \
${target_rootfs}/install/remove.manifest
- comm -2 -3 $cur_list $pre_list | awk '{print $1}' > \
+ comm -2 -3 $btmanifest $pre_btmanifest | awk '{print $1}' > \
${target_rootfs}/install/incremental.manifest
# Attempt to remove unwanted pkgs, the scripts(pre, post, etc.) has not
@@ -472,7 +468,7 @@ EOF
# probably a feature. The only way to convince rpm to actually run the preinstall scripts
# for base-passwd and shadow first before installing packages that depend on these packages
# is to do two image installs, installing one set of packages, then the other.
- if [ "${INC_RPM_IMAGE_GEN}" = "1" -a -f ${T}/total_solution_bt.manifest ]; then
+ if [ "${INC_RPM_IMAGE_GEN}" = "1" -a -f "$pre_btmanifest" ]; then
echo "Skipping pre install due to exisitng image"
else
echo "# Initial Install manifest" > ${target_rootfs}/install/initial_install.manifest