Bug 2289

Summary: Packages providing "ALTERNATIVES" do not have provides specified
Product: [Build System, Metadata & Runtime] Meta-yocto Reporter: Mark Hatle <mark.hatle>
Component: meta-yoctoAssignee: Mark Hatle <mark.hatle>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: ftonello, poky.bs.watcher, poky.watcher, richard.purdie, sgw, song.liu
Version: 1.2   
Target Milestone: 1.3   
Hardware: x86   
OS: Multiple   
Whiteboard: (P1)
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Mark Hatle 2012-04-12 20:34:12 UTC
Packages that use the update-alternatives.bbclass -- or -- use update alternatives themselves are not properly setting RPROVIDES or file level provide data.

This is causing a dependency on /usr/bin/env to not be satisfied, which coreutils provides /usr/bin/env via the update alternatives methods.

buybox's "package_do_filedeps_append" may be a reasonable model for implementing this in the updates-alternatives.bbclass.

We also should grep for discrete usages of update-alternatives in post install scripts and fix those recipes as well.
Comment 1 Mark Hatle 2012-04-12 20:49:31 UTC
Basic investigation time:

Only RPM packaging backends currently look at file based dependencies.  Inside of the package_rpm.bbclass, it is already adding ALTERNATIVE_LINK and ALTERNATIVE_LINKS to the package provides.  This should enable anything using the class to work properly.

Only packages that manage alternatives without the help of the class should be failing.

(Post 1.2, we should do this differently, so when we roll up the file level dependencies it'll work for all packaging back ends)
Comment 2 Mark Hatle 2012-04-12 20:54:47 UTC
Grepping the meta directory I find the following items likely have a dependency problem:

openssh
hdparm
iputils
grep
net-tools
shadow
findutils
gzip
module-init-tools
coreutils
psplash
kdb
console-tools
sysvinit
lrzsz
Comment 3 Mark Hatle 2012-04-17 22:53:27 UTC
FYI -- the following packages are broken in some way with the update-alternatives:

coreutils
grep
openssh
hdparm
iputils
net-tools (has a potentially dead symlink to hostname)
shadow
findutils
gzip
module-init-tools
kbd
console-tools
sysvinit
lrzsz
cpio
dropbear
ncurses

binutils
psmisc
psplash
sysklogd
tar
util-linux
Comment 4 Mark Hatle 2012-05-08 15:27:56 UTC
Update alternatives work is partially done.  Estimate includes additional testing and remaining work.
Comment 5 Mark Hatle 2012-06-05 15:19:53 UTC
Refactoring of the update-alternatives system checked into OE-core: 309117d26de6a87b16406a44a0cefcbaaf7b5d7a