diff options
Diffstat (limited to 'meta/classes/package_rpm.bbclass')
-rw-r--r-- | meta/classes/package_rpm.bbclass | 20 |
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 () { | |||
158 | rpm_update_pkg () { | 158 | rpm_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 |