[OE-core] [PATCH 1/1] python-smartpm-native: prefer same arch when install

Mark Hatle mark.hatle at windriver.com
Tue Oct 27 19:04:00 UTC 2015


On 10/27/15 1:45 PM, Burton, Ross wrote:
> 
> On 27 October 2015 at 14:05, Robert Yang <liezhi.yang at windriver.com
> <mailto:liezhi.yang at windriver.com>> wrote:
> 
>     We had made smart install multilib RDEPENDS correctly from
>     package_manager.py, but it couldn't handle RRECOMMANDS, this patch fix
>     the issue from python-smartpm-native, and make it work well.
> 
>     The logic is: when pkg_A rdepends/rrecommands pkg_B, then let pkg_B use
>     pkg_A's arch when possible.
> 
> 
> I added this patch and rebuilt core-image-sato, then ran buildhistory-diff:
> 
> Changes to images/intel_corei7_64/glibc/core-image-sato
> (installed-package-names.txt):
>   lib32-ncurses-terminfo-base was added
>   lib32-libjpeg9 was added
>   lib32-glibc-gconv-iso8859-1 was added
>   lib32-shared-mime-info was added
>   lib32-libxml2 was added
>   lib32-wpa-supplicant-cli was added
>   lib32-libgdk-pixbuf-2.0-loader-png was added
>   lib32-wpa-supplicant-passphrase was added
>   lib32-pango-module-basic-fc was added
>   lib32-bash was added
>   lib32-libgdk-pixbuf-2.0-loader-jpeg was added
>   lib32-libgdk-pixbuf-2.0-loader-gif was added
>   lib32-libgdk-pixbuf-2.0-loader-xpm was added
>   lib32-glibc-gconv was added
> 
> Some of those are good (gdk-pixbuf and pango), some bad (bash,
> wpa-supplicant-cli), some probably bugs in packages that should be allarch
> (termino, shared-mime-info).

bash, wpa-supplicant-cli is a good example of why this is an issue.  RPM luckily
says, well we've got two versions of bash, lets resolve this by following the
ELF resolution rule.  So while two packages may exist in the manifest, you won't
get any conflicts and space is likely not duplicated.

But you can't automatically say "give me any bash, but give me arch specific
versions of everything else".  The default in RPM is if I ask for 'bash', give
me any version of bash.. if I ask for 'bash.i586' I was -the- i586 version.

This is why the fix for this is either adjust the behavior (as Robert has done)
to suck in more dependencies and consider the ELF resolver to be adequate -- or
to add some kind of a hint to the recipe mechanisms that select dependencies
must be of the same arch type.  One we handle in the resolver, and one we could
handle when we generate the packages themselves.

I'm not sure there is an obvious solution, I prefer the later with a variant of
the former myself.  (Variant being if all things are equal we weight
dependencies to match the arch.. but if something is already in with that
provide we use it..)  Then the hint would cause the produced packages to be able
to say they need explicit versions of the plugins.

> I'm undecided what we do about this.  Fixing the dependency chains is good, but
> we're definitely pulling in more than expected.

I agree, I have a feeling what I wrote about is the right answer... but I don't
have any code to prove it.. and I'm not sure that we should be making that big
of a change right now.

Robert's patch SHOULD resolve the problem at the expense of a slightly larger
resolution manifest, which may be acceptable.

--Mark

> Ross
> 
> 




More information about the Openembedded-core mailing list