kergoth / bb

Subcommand-based bitbake tools
MIT License
39 stars 12 forks source link

"bb whatdepends" seems to get confused if it involves "virtual/update-alternatives" #15

Closed rpjday closed 8 years ago

rpjday commented 11 years ago

First, a non-recursive invocation:

$ bb whatdepends ncurses core-image-minimal
Parsing recipes..done.
virtual/update-alternatives
util-linux
attr
$

which seems to suggest there are three things that depend on ncurses: v/u-a (for brevity), util-linux and attr. But a recursive invocation is confusing, since it shows ncurses indented below v/u-a, and bzip2 coming out of nowhere and being displayed at the same level as ncurses:

$ bb whatdepends -r ncurses core-image-minimal
Parsing recipes..done.
virtual/update-alternatives
  ncurses
    util-linux
      mtd-utils
        u-boot-denx
      e2fsprogs
    attr
      acl
  bzip2
    pcre
      slang
        libnewt
          virtual/update-alternatives
            shadow
            module-init-tools
            kmod
              pciutils
$

It's as if ncurses depends on v/u-a and vice versa, which forces more output than you'd expect.

kergoth commented 8 years ago

This has been fixed with the recent updates. bb-whatdepends now handles both build time and run time deps, avoids showing the target under itself, and shows duplicates, but avoids recursing into the duplicates.

Current output showing only build dependencies:

$ bb whatdepends -B ncurses core-image-minimal
Parsing recipes..done.
Preparing task data...done
readline
util-linux
dpkg
bash
slang
attr

$ bb whatdepends -r -B ncurses core-image-minimal
Parsing recipes..done.
Preparing task data...done
readline
  systemd
    dbus
  gawk
util-linux
  systemd..
  e2fsprogs
dpkg
bash
slang
  libnewt
    chkconfig
attr
  acl
    systemd..
  libcap
    systemd..