Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/1] package_rpm.bbclass: fix incremental rpm generation
@ 2012-06-21  2:29 Robert Yang
  2012-06-21  2:30 ` [PATCH 1/1] " Robert Yang
  2012-06-22 18:20 ` [PATCH 0/1] " Saul Wold
  0 siblings, 2 replies; 3+ messages in thread
From: Robert Yang @ 2012-06-21  2:29 UTC (permalink / raw)
  To: openembedded-core; +Cc: Zhenfeng.Zhao

The following changes since commit e0a70547069fe7e8a2d6bdaffc985fb172d46c31:

  perl: Allow perl to cross build and native build in a directory named "t" (2012-06-18 17:33:04 +0100)

are available in the git repository at:
  git://git.pokylinux.org/poky-contrib robert/rpm_inc
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/rpm_inc

Robert Yang (1):
  package_rpm.bbclass: fix incremental rpm generation

 meta/classes/package_rpm.bbclass |   16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)




^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/1] package_rpm.bbclass: fix incremental rpm generation
  2012-06-21  2:29 [PATCH 0/1] package_rpm.bbclass: fix incremental rpm generation Robert Yang
@ 2012-06-21  2:30 ` Robert Yang
  2012-06-22 18:20 ` [PATCH 0/1] " Saul Wold
  1 sibling, 0 replies; 3+ messages in thread
From: Robert Yang @ 2012-06-21  2:30 UTC (permalink / raw)
  To: openembedded-core; +Cc: Zhenfeng.Zhao

Fixes:
* Remove the "echo '# Remove manifest padding....' > remove.manifest,
  The remove.manifest would be used via "rpm -e `remove.manifest`",
  there would be error since there is no pkg called: Remove, manifest or
  padding

* The incremental.manifest can't be null when used by rpm, so check it
  before use.

* The rpm needs:
	--root "${target_rootfs}/install"
  when use:
	-D "_dbpath ${target_rootfs}/install"
  Otherwise it would use the ${target_rootfs} as the root, and use the
  ${target_rootfs}/var/lib/rpm as the dbpath, this is OK in a fresh
  installation, but there would be errors when increment rpm generation.

[YOCTO #2617]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 meta/classes/package_rpm.bbclass |   16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index d5406c2..5559a46 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -182,14 +182,15 @@ rpm_update_pkg () {
         # been run by now, so don't have to run them(preun, postun, etc.) when
         # erase the pkg
         if [ -s ${target_rootfs}/install/remove.manifest ]; then
-            echo "# Remove manifest padding...." >> ${target_rootfs}/install/remove.manifest
             rpm_common_comand --noscripts --nodeps \
                 -e `cat ${target_rootfs}/install/remove.manifest`
         fi
 
         # Attempt to install the incremental pkgs
-        rpm_common_comand --nodeps --replacefiles --replacepkgs \
-            -Uvh ${target_rootfs}/install/incremental.manifest
+        if [ -s ${target_rootfs}/install/incremental.manifest ]; then
+            rpm_common_comand --nodeps --replacefiles --replacepkgs \
+               -Uvh ${target_rootfs}/install/incremental.manifest
+        fi
     else
         # Attempt to install
         rpm_common_comand --replacepkgs -Uhv $manifest
@@ -314,6 +315,7 @@ package_install_internal_rpm () {
 		echo "# Install manifest padding" >> ${target_rootfs}/install/install.manifest
 		${RPM} --predefine "_rpmds_sysinfo_path ${target_rootfs}/etc/rpm/sysinfo" \
 			--predefine "_rpmrc_platform_path ${target_rootfs}/etc/rpm/platform" \
+			--root "${target_rootfs}/install" \
 			-D "_dbpath ${target_rootfs}/install" -D "`cat ${confbase}-base_archs.macro`" \
 			-D "__dbi_txn create nofsync" \
 			-U --justdb --noscripts --notriggers --noparentdirs --nolinktos --ignoresize \
@@ -343,6 +345,7 @@ package_install_internal_rpm () {
 			echo "Attempting $pkg_name..." >> "${WORKDIR}/temp/log.do_${task}_attemptonly.${PID}"
 			${RPM} --predefine "_rpmds_sysinfo_path ${target_rootfs}/etc/rpm/sysinfo" \
 				--predefine "_rpmrc_platform_path ${target_rootfs}/etc/rpm/platform" \
+				--root "${target_rootfs}/install" \
 				-D "_dbpath ${target_rootfs}/install" -D "`cat ${confbase}.macro`" \
 				-D "__dbi_txn create nofsync private" \
 				-U --justdb --noscripts --notriggers --noparentdirs --nolinktos --ignoresize \
@@ -363,6 +366,7 @@ package_install_internal_rpm () {
 		# Dump the full set of recommends...
 		${RPM} --predefine "_rpmds_sysinfo_path ${target_rootfs}/etc/rpm/sysinfo" \
 			--predefine "_rpmrc_platform_path ${target_rootfs}/etc/rpm/platform" \
+			--root "${target_rootfs}/install" \
 			-D "_dbpath ${target_rootfs}/install" -D "`cat ${confbase}.macro`" \
 			-D "__dbi_txn create nofsync private" \
 			-qa --qf "[%{RECOMMENDS}\n]" | sort -u > ${target_rootfs}/install/recommend
@@ -392,6 +396,7 @@ package_install_internal_rpm () {
 			echo "Attempting $pkg_name..." >> "${WORKDIR}/temp/log.do_{task}_recommend.${PID}"
 			${RPM} --predefine "_rpmds_sysinfo_path ${target_rootfs}/etc/rpm/sysinfo" \
 				--predefine "_rpmrc_platform_path ${target_rootfs}/etc/rpm/platform" \
+				--root "${target_rootfs}/install" \
 				-D "_dbpath ${target_rootfs}/install" -D "`cat ${confbase}.macro`" \
 				-D "__dbi_txn create nofsync private" \
 				-U --justdb --noscripts --notriggers --noparentdirs --nolinktos --ignoresize \
@@ -406,6 +411,7 @@ package_install_internal_rpm () {
 	# Now that we have a solution, pull out a list of what to install...
 	echo "Manifest: ${target_rootfs}/install/install.manifest"
 	${RPM} -D "_dbpath ${target_rootfs}/install" -qa --qf "%{packageorigin}\n" \
+		--root "${target_rootfs}/install" \
 		-D "__dbi_txn create nofsync private" \
 		> ${target_rootfs}/install/install_solution.manifest
 
@@ -419,6 +425,7 @@ package_install_internal_rpm () {
 		# an actual package install!
 		${RPM} --predefine "_rpmds_sysinfo_path ${target_rootfs}/etc/rpm/sysinfo" \
 			--predefine "_rpmrc_platform_path ${target_rootfs}/etc/rpm/platform" \
+			--root "${target_rootfs}/install" \
 			-D "_dbpath ${target_rootfs}/install" -D "`cat ${confbase}-ml_archs.macro`" \
 			-D "__dbi_txn create nofsync" \
 			-U --justdb --noscripts --notriggers --noparentdirs --nolinktos --ignoresize \
@@ -427,6 +434,7 @@ package_install_internal_rpm () {
 		# Now that we have a solution, pull out a list of what to install...
 		echo "Manifest: ${target_rootfs}/install/install_multilib.manifest"
 		${RPM} -D "_dbpath ${target_rootfs}/install" -qa --qf "%{packageorigin}\n" \
+			--root "${target_rootfs}/install" \
 			-D "__dbi_txn create nofsync private" \
 			> ${target_rootfs}/install/install_multilib_solution.manifest
 
@@ -513,6 +521,7 @@ EOF
 
 			${RPM} --predefine "_rpmds_sysinfo_path ${target_rootfs}/etc/rpm/sysinfo" \
 				--predefine "_rpmrc_platform_path ${target_rootfs}/etc/rpm/platform" \
+				--root "${target_rootfs}/install" \
 				-D "_dbpath ${target_rootfs}/initial" -D "`cat ${confbase}.macro`" \
 				-D "__dbi_txn create nofsync" \
 				-U --justdb --noscripts --notriggers --noparentdirs --nolinktos --ignoresize \
@@ -520,6 +529,7 @@ EOF
 
 			${RPM} -D "_dbpath ${target_rootfs}/initial" -qa --qf "%{packageorigin}\n" \
 				-D "__dbi_txn create nofsync private" \
+				--root "${target_rootfs}/install" \
 				> ${target_rootfs}/install/initial_solution.manifest
 
 			rpm_update_pkg ${target_rootfs}/install/initial_solution.manifest
-- 
1.7.1




^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 0/1] package_rpm.bbclass: fix incremental rpm generation
  2012-06-21  2:29 [PATCH 0/1] package_rpm.bbclass: fix incremental rpm generation Robert Yang
  2012-06-21  2:30 ` [PATCH 1/1] " Robert Yang
@ 2012-06-22 18:20 ` Saul Wold
  1 sibling, 0 replies; 3+ messages in thread
From: Saul Wold @ 2012-06-22 18:20 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer; +Cc: Zhenfeng.Zhao

On 06/20/2012 07:29 PM, Robert Yang wrote:
> The following changes since commit e0a70547069fe7e8a2d6bdaffc985fb172d46c31:
>
>    perl: Allow perl to cross build and native build in a directory named "t" (2012-06-18 17:33:04 +0100)
>
> are available in the git repository at:
>    git://git.pokylinux.org/poky-contrib robert/rpm_inc
>    http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/rpm_inc
>
> Robert Yang (1):
>    package_rpm.bbclass: fix incremental rpm generation
>
>   meta/classes/package_rpm.bbclass |   16 +++++++++++++---
>   1 files changed, 13 insertions(+), 3 deletions(-)
>
>
Merged into OE-Core

Thanks
	Sau!


> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-06-22 18:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-21  2:29 [PATCH 0/1] package_rpm.bbclass: fix incremental rpm generation Robert Yang
2012-06-21  2:30 ` [PATCH 1/1] " Robert Yang
2012-06-22 18:20 ` [PATCH 0/1] " Saul Wold

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox