From: Mark Hatle <mark.hatle@windriver.com>
To: "Lu, Lianhao" <lianhao.lu@intel.com>
Cc: "poky@yoctoproject.org" <poky@yoctoproject.org>
Subject: Re: Why rpm install process is not working out of the pseudo context
Date: Wed, 26 Jan 2011 08:32:37 -0600 [thread overview]
Message-ID: <4D403085.6000708@windriver.com> (raw)
In-Reply-To: <C10D3FB0CD45994C8A51FEC1227CE22F20A83390A3@shsmsx502.ccr.corp.intel.com>
On 1/26/11 12:57 AM, Lu, Lianhao wrote:
> 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
The above two can be run without pseudo.
> 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
The above item DOES require pseudo. The --root tells RPM to chroot into a
specific directory before an install begins. chroot is a command that only root
(or pseudo) can execute. This is why pseudo content is required.
> 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
I'm surprised the first two fail. It's possible that something in the berkley
db setup (unique to RPMs usage) is also attempting to use chroot or a similar
root only command of some type.
> 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).
The second step should have the same __dbi_cdb as the first step.. If it doesn't
(or doesn't work) then it looks like you discovered a bug in the original
implementation.
I can look into this a big today. (Hopefully this complex mechanism of doing
dependency resolution can go away with Zypper.. but we're not yet there.)
--Mark
> Best Regards,
> -Lianhao Lu
> _______________________________________________
> poky mailing list
> poky@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/poky
prev parent reply other threads:[~2011-01-26 14:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D403085.6000708@windriver.com \
--to=mark.hatle@windriver.com \
--cc=lianhao.lu@intel.com \
--cc=poky@yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.