All of lore.kernel.org
 help / color / mirror / Atom feed
* Why rpm install process is not working out of the pseudo context
@ 2011-01-26  6:57 Lu, Lianhao
  2011-01-26 14:32 ` Mark Hatle
  0 siblings, 1 reply; 2+ messages in thread
From: Lu, Lianhao @ 2011-01-26  6:57 UTC (permalink / raw)
  To: poky@yoctoproject.org

Hi guys,

Does anyone know why the RPM install process should be all executed in the pseudo context? Thank you!

I found that the rpm install process is not working when I manually enter the rpm command in the terminal (without pseudo).

The install process for rpm is:
1. generate db from solved db
        ${RPM} -D "_rpmds_sysinfo_path ${SDK_OUTPUT}/${SDKTARGETSYSROOT}/etc/rpm/sysinfo" \
                -D "_dbpath ${SDK_OUTPUT}/${SDKTARGETSYSROOT}/install" -D "`cat ${RPMCONF_TARGET_BASE}.macro`" \
                -D "__dbi_cdb create mp_mmapsize=128Mb mp_size=1Mb nofsync" \
                -U --justdb --noscripts --notriggers --noparentdirs --nolinktos --ignoresize \
                ${SDK_OUTPUT}/${SDKTARGETSYSROOT}/install/install.manifest

2. pull out a list of what to install
	${RPM} -D "_dbpath ${SDK_OUTPUT}/${SDKTARGETSYSROOT}/install" -qa --yaml \
                | grep -i 'Packageorigin' | cut -d : -f 2 > ${SDK_OUTPUT}/${SDKTARGETSYSROOT}/install/install_solution.manifest

3. actual install
	${RPM} --root ${SDK_OUTPUT}/${SDKTARGETSYSROOT} \
                -D "_rpmds_sysinfo_path ${SDK_OUTPUT}/${SDKTARGETSYSROOT}/etc/rpm/sysinfo" \
                -D "_dbpath ${rpmlibdir}" \
                --noscripts --notriggers --noparentdirs --nolinktos \
                -D "__dbi_cdb create mp_mmapsize=128Mb mp_size=1Mb nofsync private" \
                -Uhv ${SDK_OUTPUT}/${SDKTARGETSYSROOT}/install/install_solution.manifest

If we put all the 3 steps under pseudo context, it works fine. But if all the 3 steps are out of pseudo context, the step 2) would fail complaining about:
rpmdb: configured environment flags incompatible with existing environment
error: cannot open Package(0) index using db3 - Invalid argument (22)
error: cannot open Package database in /home/lulianhao/poky-build/meta-toolchain/tmp/work/mips-poky-linux/meta-toolchain-sdk-1.0-r1/sdk/image//opt/poky/0.9+snapshot/sysroots/mips-poky-linux/install

If I add -D "__dbi_cdb create mp_mmapsize=128Mb mp_size=1Mb nofsync" options to step 2), it would succeed. But in step 3), nothing actually gets installed though the rpm doesn't report any error in step 3).

Best Regards,
-Lianhao Lu


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

end of thread, other threads:[~2011-01-26 14:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-26  6:57 Why rpm install process is not working out of the pseudo context Lu, Lianhao
2011-01-26 14:32 ` Mark Hatle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.