summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2012-05-09 09:15:46 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-05-24 08:51:37 +0100
commit73538f548c796a31f8e2404a5f006fcae7e56df0 (patch)
tree0a71711c137808e2d5bf808eb504bf221187d3f5 /meta
parent66b0eceecab670e5530b60599867ea0c828457bd (diff)
downloadpoky-73538f548c796a31f8e2404a5f006fcae7e56df0.tar.gz
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 #2440] (From OE-Core rev: 5149630746626c6d416f26ab9dd1c7213fcd8c50) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-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 2da7a8b85c..daa9db421e 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -158,28 +158,24 @@ rpm_common_comand () {
158rpm_update_pkg () { 158rpm_update_pkg () {
159 159
160 manifest=$1 160 manifest=$1
161 btmanifest=$manifest.bt 161 btmanifest=$manifest.bt.manifest
162 pre_btmanifest=${T}/${btmanifest##/*/}
162 local target_rootfs="${INSTALL_ROOTFS_RPM}" 163 local target_rootfs="${INSTALL_ROOTFS_RPM}"
163 164
164 # Save the rpm's build time for incremental image generation, and the file 165 # Save the rpm's build time for incremental image generation, and the file
165 # would be moved to ${T} 166 # would be moved to ${T}
166 rm -f $btmanifest
167 for i in `cat $manifest`; do 167 for i in `cat $manifest`; do
168 # Use "rpm" rather than "${RPM}" here, since we don't need the 168 # Use "rpm" rather than "${RPM}" here, since we don't need the
169 # '--dbpath' option 169 # '--dbpath' option
170 echo "$i `rpm -qp --qf '%{BUILDTIME}\n' $i`" >> $btmanifest 170 echo "$i `rpm -qp --qf '%{BUILDTIME}\n' $i`"
171 done 171 done | sort -u > $btmanifest
172 172
173 # Only install the different pkgs if incremental image generation is set 173 # Only install the different pkgs if incremental image generation is set
174 if [ "${INC_RPM_IMAGE_GEN}" = "1" -a -f ${T}/total_solution_bt.manifest -a \ 174 if [ "${INC_RPM_IMAGE_GEN}" = "1" -a -f "$pre_btmanifest" -a \
175 "${IMAGE_PKGTYPE}" = "rpm" ]; then 175 "${IMAGE_PKGTYPE}" = "rpm" ]; then
176 cur_list="$btmanifest" 176 comm -1 -3 $btmanifest $pre_btmanifest | sed 's#.*/\(.*\)\.rpm .*#\1#' > \
177 pre_list="${T}/total_solution_bt.manifest"
178 sort -u $cur_list -o $cur_list
179 sort -u $pre_list -o $pre_list
180 comm -1 -3 $cur_list $pre_list | sed 's#.*/\(.*\)\.rpm .*#\1#' > \
181 ${target_rootfs}/install/remove.manifest 177 ${target_rootfs}/install/remove.manifest
182 comm -2 -3 $cur_list $pre_list | awk '{print $1}' > \ 178 comm -2 -3 $btmanifest $pre_btmanifest | awk '{print $1}' > \
183 ${target_rootfs}/install/incremental.manifest 179 ${target_rootfs}/install/incremental.manifest
184 180
185 # Attempt to remove unwanted pkgs, the scripts(pre, post, etc.) has not 181 # Attempt to remove unwanted pkgs, the scripts(pre, post, etc.) has not
@@ -462,7 +458,7 @@ EOF
462 # probably a feature. The only way to convince rpm to actually run the preinstall scripts 458 # probably a feature. The only way to convince rpm to actually run the preinstall scripts
463 # for base-passwd and shadow first before installing packages that depend on these packages 459 # for base-passwd and shadow first before installing packages that depend on these packages
464 # is to do two image installs, installing one set of packages, then the other. 460 # is to do two image installs, installing one set of packages, then the other.
465 if [ "${INC_RPM_IMAGE_GEN}" = "1" -a -f ${T}/total_solution_bt.manifest ]; then 461 if [ "${INC_RPM_IMAGE_GEN}" = "1" -a -f "$pre_btmanifest" ]; then
466 echo "Skipping pre install due to exisitng image" 462 echo "Skipping pre install due to exisitng image"
467 else 463 else
468 echo "# Initial Install manifest" > ${target_rootfs}/install/initial_install.manifest 464 echo "# Initial Install manifest" > ${target_rootfs}/install/initial_install.manifest