Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Trent Piepho <tpiepho@impinj.com>
To: buildroot@busybox.net
Subject: [Buildroot] [RFC 1/2] busybox: avoid conflict with other packages
Date: Fri, 29 Dec 2017 21:50:17 +0000	[thread overview]
Message-ID: <1514584216.26695.149.camel@impinj.com> (raw)
In-Reply-To: <20171229201806.GR3176@scaer>

On Fri, 2017-12-29 at 21:18 +0100, Yann E. MORIN wrote:
> On 2017-12-29 19:54 +0000, Trent Piepho spake thusly:
> > On Fri, 2017-12-29 at 10:38 +0100, Yann E. MORIN wrote:
> > > 
> > > I prefer the second option, because it concentrates the dependency chain
> > > in a single package, and it becomes very easy to write:
> > > 
> > >     BUSYBOX_DEPENDENCIES = \
> > >         $(if $(BR2_PACKAGE_COREUTILS),coreutils) \
> > >         $(if $(BR2_PACKAGE_UTIL_LINUX),util-linux) \
> > >     [...]
> > 
> > Could one have a package variable specifically for install
> > dependencies, like:
> 
> I think you already suggested so on IRC a while back, right?

Yes LTIB did this.  LTIB was fancier about automatically taking into
account changes in configuration to minimize rebuilding (disks were
slower then!) and this helped.  I don't think it's important w.r.t.
what buildroot could do here.

Buildroot is different software of course and I don't think LTIB is
important w.r.t. what buildroot could do here. Rather, consider that at
one time buildroot could not build packages in parallel and now it
will.  Just because something does not appear useful now does not mean
it never will be.

> If we were to add support for install dependencies, we would want to
> treat them as the other dependencies and not do magical thigns like list
> all of them and defer to the infra to sort out those that are enabeld.
> 
> In fact, that would go contrary to what we currently do for the existing
> dependencies: if a package lists a dependency but it is not enabled, we
> explicitly fail.

But it seems like this the exact opposite of what is being done?!  If
one uses:
BUSYBOX_DEPENDENCIES += $(if $(BR2_PACKAGE_COREUTILS),coreutils)

Then make busybox-show-depends does NOT list coreutils, because I have
not enabled coreutils.  Same with graph-depends, coreutils-show-
rdepends, and so on.

But if one does:
BUSYBOX_INSTALL_DEPENDENCIES += coreutils

Then it's possible to choose another policy.  One could make show-
depends only show the dependency if coreutils is enabled, just like
now, but add a show-all-install-depends target that lists all possible
dependencies, whether enabled or not.  Maybe someone will want
that?graph-depends could use a different color for the lines.

But if the distinction is not made, then all these possibilities go
away.

It's not that complex either, one line in pkg-generic before setting
FINAL_DEPENDENCIES

$(2)_DEPENDENCIES += $$(foreach p,$$($(2)_INSTALL_DEPENDENCIES),$$(if $$(BR2_PACKAGE_$$(call UPPERCASE,$$(p))),$$(p)))

  reply	other threads:[~2017-12-29 21:50 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-13 13:01 [Buildroot] [RFC 0/2] Handle conflicting files with Busybox Thomas Petazzoni
2017-12-13 13:01 ` [Buildroot] [RFC 1/2] busybox: avoid conflict with other packages Thomas Petazzoni
2017-12-13 14:43   ` Baruch Siach
2017-12-14  5:18     ` Thomas Petazzoni
2017-12-14  6:58       ` Baruch Siach
2017-12-14  7:17         ` Thomas Petazzoni
2017-12-28 16:23         ` Yann E. MORIN
2017-12-28 22:56           ` Yann E. MORIN
2017-12-29  5:59             ` Baruch Siach
2017-12-29  9:38               ` Yann E. MORIN
2017-12-29  9:42                 ` Thomas Petazzoni
2017-12-29  9:52                   ` Yann E. MORIN
2017-12-29  9:55                     ` Thomas Petazzoni
2018-01-04 15:20                       ` Yann E. MORIN
2018-01-04 15:29                         ` Thomas Petazzoni
2018-01-04 15:39                           ` Yann E. MORIN
2017-12-29 19:54                 ` Trent Piepho
2017-12-29 20:18                   ` Yann E. MORIN
2017-12-29 21:50                     ` Trent Piepho [this message]
2017-12-13 13:01 ` [Buildroot] [RFC 2/2] packages: drop no longer needed busybox dependencies Thomas Petazzoni
2017-12-28 17:00 ` [Buildroot] [RFC 0/2] Handle conflicting files with Busybox Yann E. MORIN
2017-12-28 17:04   ` Thomas Petazzoni
2017-12-28 17:20     ` Yann E. MORIN
     [not found]       ` <CANQCQpZ-qO6v+K4kdqmAEdk2+Dk1Yca1fBqyNwfAjau=50cY7A@mail.gmail.com>
     [not found]         ` <CANQCQpYmpCKopmh_5yYV74kOyezJSCLxp6T1mUiqnocHLZV92A@mail.gmail.com>
2017-12-28 17:36           ` Matthew Weber
2017-12-28 18:01       ` Baruch Siach
2017-12-28 19:11         ` Yann E. MORIN

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=1514584216.26695.149.camel@impinj.com \
    --to=tpiepho@impinj.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