summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
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 ffe3b312ff..e2bec2d444 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -168,28 +168,24 @@ rpm_common_comand () {
168rpm_update_pkg () { 168rpm_update_pkg () {
169 169
170 manifest=$1 170 manifest=$1
171 btmanifest=$manifest.bt 171 btmanifest=$manifest.bt.manifest
172 pre_btmanifest=${T}/${btmanifest##/*/}
172 local target_rootfs="${INSTALL_ROOTFS_RPM}" 173 local target_rootfs="${INSTALL_ROOTFS_RPM}"
173 174
174 # Save the rpm's build time for incremental image generation, and the file 175 # Save the rpm's build time for incremental image generation, and the file
175 # would be moved to ${T} 176 # would be moved to ${T}
176 rm -f $btmanifest
177 for i in `cat $manifest`; do 177 for i in `cat $manifest`; do
178 # Use "rpm" rather than "${RPM}" here, since we don't need the 178 # Use "rpm" rather than "${RPM}" here, since we don't need the
179 # '--dbpath' option 179 # '--dbpath' option
180 echo "$i `rpm -qp --qf '%{BUILDTIME}\n' $i`" >> $btmanifest 180 echo "$i `rpm -qp --qf '%{BUILDTIME}\n' $i`"
181 done 181 done | sort -u > $btmanifest
182 182
183 # Only install the different pkgs if incremental image generation is set 183 # Only install the different pkgs if incremental image generation is set
184 if [ "${INC_RPM_IMAGE_GEN}" = "1" -a -f ${T}/total_solution_bt.manifest -a \ 184 if [ "${INC_RPM_IMAGE_GEN}" = "1" -a -f "$pre_btmanifest" -a \
185 "${IMAGE_PKGTYPE}" = "rpm" ]; then 185 "${IMAGE_PKGTYPE}" = "rpm" ]; then
186 cur_list="$btmanifest" 186 comm -1 -3 $btmanifest $pre_btmanifest | sed 's#.*/\(.*\)\.rpm .*#\1#' > \
187 pre_list="${T}/total_solution_bt.manifest"
188 sort -u $cur_list -o $cur_list
189 sort -u $pre_list -o $pre_list
190 comm -1 -3 $cur_list $pre_list | sed 's#.*/\(.*\)\.rpm .*#\1#' > \
191 ${target_rootfs}/install/remove.manifest 187 ${target_rootfs}/install/remove.manifest
192 comm -2 -3 $cur_list $pre_list | awk '{print $1}' > \ 188 comm -2 -3 $btmanifest $pre_btmanifest | awk '{print $1}' > \
193 ${target_rootfs}/install/incremental.manifest 189 ${target_rootfs}/install/incremental.manifest
194 190
195 # Attempt to remove unwanted pkgs, the scripts(pre, post, etc.) has not 191 # Attempt to remove unwanted pkgs, the scripts(pre, post, etc.) has not
@@ -472,7 +468,7 @@ EOF
472 # probably a feature. The only way to convince rpm to actually run the preinstall scripts 468 # probably a feature. The only way to convince rpm to actually run the preinstall scripts
473 # for base-passwd and shadow first before installing packages that depend on these packages 469 # for base-passwd and shadow first before installing packages that depend on these packages
474 # is to do two image installs, installing one set of packages, then the other. 470 # is to do two image installs, installing one set of packages, then the other.
475 if [ "${INC_RPM_IMAGE_GEN}" = "1" -a -f ${T}/total_solution_bt.manifest ]; then 471 if [ "${INC_RPM_IMAGE_GEN}" = "1" -a -f "$pre_btmanifest" ]; then
476 echo "Skipping pre install due to exisitng image" 472 echo "Skipping pre install due to exisitng image"
477 else 473 else
478 echo "# Initial Install manifest" > ${target_rootfs}/install/initial_install.manifest 474 echo "# Initial Install manifest" > ${target_rootfs}/install/initial_install.manifest