From: Laurentiu Palcu <laurentiu.palcu@intel.com>
To: "Zhang, Jessica" <jessica.zhang@intel.com>
Cc: "openembedded-core@lists.openembedded.org"
<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 1/4] adt-installer: fix package installation issue
Date: Tue, 18 Sep 2012 21:54:21 +0300 [thread overview]
Message-ID: <5058C35D.8070407@intel.com> (raw)
In-Reply-To: <C6510F6D410BB64A8C15398EDC6B847C46AF3562@ORSMSX101.amr.corp.intel.com>
On 09/18/2012 08:34 PM, Zhang, Jessica wrote:
> Hi Laurentiu,
>
> Why this is only an issue for installation to a directory other than the default e.g. /opt/poky ?
Because of the internal opkg logic. Opkg keeps an internal database of
all packages installed and the files that each package provides. By
default all packages were built to install to /opt/poky/1.2+snapshot (I
took this path as an example). When we provide an offline root directory
(with -o option), let's assume it's /opt/poky/1.2+snapshot, all packages
will be installed to /opt/poky/1.2+snapshot/opt/poky/1.2+snapshot.
However, opkg will detect that the offline root matches the beginning of
the files paths and will record the files without the first part: that
is /opt/poky/1.2+snapshot/file instead of
/opt/poky/1.2+snapshot/opt/poky/1.2+snapshot/file.
When another package is installed, opkg will look into its database and
will try to see if the file to be installed in
/opt/poky/1.2+snapshot/opt/poky/1.2+snapshot will overwrite any files in
/opt/poky/1.2+snapshot. The answer is, of course, NO (since the paths
are different) and the installation will go on.
On the other hand, if we choose another offline directory(different from
the default one), let's say /my/test, the files in it's internal
database will contain the entire paths: that is
/my/test/opt/poky/1.2+snapshot.
When another package is installed to the same /my/test directory, opkg
will now look into its database and see if the files to be installed in
/my/test/opt/poky/1.2+snapshot overwrites any files in the same path.
Since paths are now the same, installing two packages providing the same
files will, of course, be detected and installation stopped.
I hope this answers your question,
Laurentiu
>
> Thanks,
> Jessica
>
> -----Original Message-----
> From: openembedded-core-bounces@lists.openembedded.org [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of Laurentiu Palcu
> Sent: Tuesday, September 18, 2012 2:22 AM
> To: openembedded-core@lists.openembedded.org
> Subject: [OE-core] [PATCH 1/4] adt-installer: fix package installation issue
>
> When the cross canadian toolchains are installed, for different architectures, they might contain common files. This leads to installation failures since the opkg, by default, does not overwrite files. This issue happens, for example, for binutils packages (that contain the same locale files) or gdb (which installs some syscalls xml files). The locale files could be removed from the binutils cross-canadian package but we cannot do the same for the syscalls GDB files which are used by GDB to display user friendly names for the syscall numbers. Hence, the best solution is to force opkg to overwrite these files.
>
> [YOCTO #3109]
>
> Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
> ---
> .../adt-installer/scripts/adt_installer_internal | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal b/meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal
> index 78ea6d0..f113aa4 100755
> --- a/meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal
> +++ b/meta/recipes-devtools/installer/adt-installer/scripts/adt_installe
> +++ r_internal
> @@ -112,7 +112,7 @@ check_result
>
> #install below must sdk-host packages
> OPKG_INSTALL_CMD="$OPKG_CMD "
> -OPKG_INSTALL_NATIVE_CMD="$OPKG_INSTALL_CMD -f $OPKG_CONFIG_FILE -o $NATIVE_INSTALL_DIR install"
> +OPKG_INSTALL_NATIVE_CMD="$OPKG_INSTALL_CMD --force-overwrite -f $OPKG_CONFIG_FILE -o $NATIVE_INSTALL_DIR install"
>
> BASE_HOSTSDK_PKGNAMES="pseudo opkg pkgconfig libtool autoconf automake"
> for pkg in $BASE_HOSTSDK_PKGNAMES; do
> --
> 1.7.9.5
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>
next prev parent reply other threads:[~2012-09-18 19:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-18 9:21 [PATCH 0/4] SDK and adt_installer fixes Laurentiu Palcu
2012-09-18 9:21 ` [PATCH 1/4] adt-installer: fix package installation issue Laurentiu Palcu
2012-09-18 17:34 ` Zhang, Jessica
2012-09-18 18:54 ` Laurentiu Palcu [this message]
2012-09-18 9:21 ` [PATCH 2/4] SDK: fix installation into symlinked directories Laurentiu Palcu
2012-09-18 9:21 ` [PATCH 3/4] adt-installer: ensure directory exists before copying/removing Laurentiu Palcu
2012-09-18 9:21 ` [PATCH 4/4] SDK: remove references to Poky distro from tarball installer Laurentiu Palcu
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=5058C35D.8070407@intel.com \
--to=laurentiu.palcu@intel.com \
--cc=jessica.zhang@intel.com \
--cc=openembedded-core@lists.openembedded.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.