From: Peter Korsgaard <peter@korsgaard.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 1/5] support/scripts/graph-depends: remove global code and most global variables
Date: Sun, 01 Apr 2018 19:59:13 +0200 [thread overview]
Message-ID: <87d0zireoe.fsf@dell.be.48ers.dk> (raw)
In-Reply-To: <20180331163543.6278-2-thomas.petazzoni@bootlin.com> (Thomas Petazzoni's message of "Sat, 31 Mar 2018 18:35:39 +0200")
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@bootlin.com> writes:
> The graph-depends script had no main() function, and the main code was
> actually spread between the function definitions, which was a real
> mess.
> This commit moves the global code into a main() function, which allows
> to more easily follow the flow of the script. The argument parsing
> code is moved into a parse_args() function.
> Most of the global variables are removed, and are instead passed as
> argument when appropriate. This has the side-effect that the
> print_pkg_deps() function takes a lot of argument, but this is
> considered better than tons of global variables.
> The global variables that are removed are: max_depth, transitive,
> mode, root_colour, target_colour, host_colour, outfile, dict_deps,
> dict_version, stop_list, exclude_list, arrow_dir.
> The root_colour/target_colour/host_colour variables are entirely
> removed, and instead a single colours array is passed, and it's the
> function using the colors that actually uses the different entries in
> the array.
> The way the print_attrs() function determines if we're display the
> root node is not is changed. Instead of relying on the package name
> and the mode (which requires passing the root package name, and the
> mode), it relies on the depth: when the depth is 0, we're at the root
> node.
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Committed, thanks.
--
Bye, Peter Korsgaard
next prev parent reply other threads:[~2018-04-01 17:59 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-31 16:35 [Buildroot] [PATCH v2 0/5] Recursive show-depends and show-rdepends Thomas Petazzoni
2018-03-31 16:35 ` [Buildroot] [PATCH v2 1/5] support/scripts/graph-depends: remove global code and most global variables Thomas Petazzoni
2018-04-01 17:59 ` Peter Korsgaard [this message]
2018-03-31 16:35 ` [Buildroot] [PATCH v2 2/5] support/scripts/graph-depends: use colors instead of colours Thomas Petazzoni
2018-03-31 21:22 ` Yann E. MORIN
2018-04-01 17:59 ` Peter Korsgaard
2018-03-31 16:35 ` [Buildroot] [PATCH v2 3/5] support/scripts/graph-depends: add --quiet option Thomas Petazzoni
2018-03-31 21:27 ` Yann E. MORIN
2018-03-31 16:35 ` [Buildroot] [PATCH v2 4/5] support/scripts/graph-depends: add --flat-list option Thomas Petazzoni
2018-04-01 20:21 ` Peter Korsgaard
2018-03-31 16:35 ` [Buildroot] [PATCH v2 5/5] package/pkg-generic: add <pkg>-show-recursive-(r)depends targets Thomas Petazzoni
2018-04-01 20:21 ` Peter Korsgaard
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=87d0zireoe.fsf@dell.be.48ers.dk \
--to=peter@korsgaard.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox