From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 3/3 v3] support/graph-depends: use the new make-based dependency tree
Date: Mon, 25 Mar 2019 19:36:08 +0100 [thread overview]
Message-ID: <20190325193608.7f3472f1@windsurf> (raw)
In-Reply-To: <e26ba891857584eb10bbfbe76ec45be8eb2551b8.1553288807.git.yann.morin.1998@free.fr>
On Fri, 22 Mar 2019 22:07:07 +0100
"Yann E. MORIN" <yann.morin.1998@free.fr> wrote:
> Now that we can get the whole dependency tree from make, use it to
> speed up things considerably.
>
> So far, we had three functions to get the dependencies information:
> get_depends(), get_rdepends(), and, somehow unrelated, get_version().
>
> Because of the way %-show-{,r}depends works, getting the dependency tree
> was expensive, the three functions all took a set of packages for which
> to get the dependencies, in an attempt to limit the time it took to get
> that tree, but we still had to call these functions iteratively, until
> they returned no new dependency. This was pretty costly.
>
> Now, getting the tree is much, much less costly, and we can get the
> whole tree as cheaply as we previously got only the first-level
> dependencies.
>
> Furthermore, we can now also get the version information at the same
> time, and that also brings in whether the package is virtual or not,
> target or host.
>
> So, we drop all three helper functions, and replace them with a single
> one that returns all that information in one go: full dependency trees
> (direct and reverse), per-package type, and per-package version.
>
> Note: since commit 2d29fd96a (pkg-virtual: remove VERSION/SOURCE),
> virtual packages are no longer reported as having a 'virtual' version,
> so have since been displayed as regular packages in the graphs. Although
> noone complained, this patch incidentally restores the initial
> behaviour, and virtual packages are now correctly displayed as such
> again.
>
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com>
>
> ---
> Changes v2 -> v3:
> - use defaultdict() (Thomas P.)
> - also return the rdeps while at it
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
prev parent reply other threads:[~2019-03-25 18:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-22 21:07 [Buildroot] [PATCH 0/3 v3] support/graphs: speedup graph-depends (branch yem/graphs-from-make-2) Yann E. MORIN
2019-03-22 21:07 ` [Buildroot] [PATCH 1/3 v3] package/pkg-generic: mark some rule PHONY Yann E. MORIN
2019-03-25 18:27 ` Thomas Petazzoni
2019-03-22 21:07 ` [Buildroot] [PATCH 2/3 v3] support/graph-depends: don't eliminate mandatory deps for reverse graphs Yann E. MORIN
2019-03-25 18:36 ` Thomas Petazzoni
2019-03-22 21:07 ` [Buildroot] [PATCH 3/3 v3] support/graph-depends: use the new make-based dependency tree Yann E. MORIN
2019-03-25 18:36 ` Thomas Petazzoni [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=20190325193608.7f3472f1@windsurf \
--to=thomas.petazzoni@bootlin.com \
--cc=buildroot@busybox.net \
/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.