From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCHv5 2/2] pkg-generic: improve incorrectly used package detection
Date: Tue, 29 Dec 2015 19:06:00 +0100 [thread overview]
Message-ID: <20151229180600.GC3445@free.fr> (raw)
In-Reply-To: <1444382106-16019-3-git-send-email-thomas.petazzoni@free-electrons.com>
Thomas, All,
On 2015-10-09 11:15 +0200, Thomas Petazzoni spake thusly:
> The package infrastructure now detects when a target package is being
> built even if its corresponding Config.in option is not enabled, and
> aborts with an error. However, it does not indicate *which* package is
> improperly depending on the current package without selecting it at
> the kconfig level.
>
> So, in this commit, in addition to displaying an error, we try to help
> the user by saying which packages could be the culprit. To achieve
> this, we register the reverse dependencies of each package in a
> variable called <pkg>_DEPENDENT_OF, and display this variable for the
> problematic package when the error is detected. Many thanks to Yann
> E. Morin for the idea and implementation!
>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
> package/pkg-generic.mk | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
> index a831199..1266a47 100644
> --- a/package/pkg-generic.mk
> +++ b/package/pkg-generic.mk
> @@ -150,6 +150,8 @@ ifeq ($(MAKECMDGOALS),)
> @if test "$($(PKG)_TYPE)" = "target" -a -z "$($($(PKG)_KCONFIG_VAR))" ; then \
> echo "ERROR: A package must have added $($(PKG)_NAME) to its _DEPENDENCIES line but" ; \
> echo "forgot to add the corresponding select / depends on $($(PKG)_KCONFIG_VAR)." ; \
> + echo "Potential culprits:" ; \
> + for p in $($(PKG)_DEPENDENT_OF) ; do echo " - $$p" ; done ; \
This does only work for first-level culprits.
For example, I added;
BUSYBOX_DEPENDENCIES += exim
And I get:
>>> berkeleydb 5.3.28 Patching libtool
ERROR: A package must have added berkeleydb to its _DEPENDENCIES line but
forgot to add the corresponding select / depends on BR2_PACKAGE_BERKELEYDB.
Potential culprits:
make[1]: *** [.../berkeleydb-5.3.28/.stamp_configured] Error 1
make: *** [_all] Error 2
That's because the real culprit is not directly the cause of the
berkeleydb dependency; the depenency chain is two-or-more levels deep.
So, NAK on this patch (even though that was my idea originally, IIRC).
I'll (later!) to find a solution...
Regards,
Yann E. MORIN.
> exit 1 ; \
> fi
> endif
> @@ -777,6 +779,12 @@ endif # ifneq ($$(call qstrip,$$($(2)_SOURCE)),)
> # configuration
> ifeq ($$($$($(2)_KCONFIG_VAR)),y)
>
> +# Store reverse build-dependency information: we add the name of the
> +# current package to the <pkg>_DEPENDENT_OF variable of all packages
> +# the current package depends on.
> +$$(eval $$(foreach d,$$($(2)_FINAL_ALL_DEPENDENCIES),\
> + $$(call UPPERCASE,$$(d))_DEPENDENT_OF += $(1)$$(sep)))
> +
> # Ensure the calling package is the declared provider for all the virtual
> # packages it claims to be an implementation of.
> ifneq ($$($(2)_PROVIDES),)
> --
> 2.6.1
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
prev parent reply other threads:[~2015-12-29 18:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-09 9:15 [Buildroot] [PATCHv5 0/2] Detect incorrect dependencies Thomas Petazzoni
2015-10-09 9:15 ` [Buildroot] [PATCHv5 1/2] pkg-generic: detect incorrectly used package Thomas Petazzoni
2015-12-29 18:19 ` Yann E. MORIN
2015-12-29 18:36 ` Thomas Petazzoni
2015-10-09 9:15 ` [Buildroot] [PATCHv5 2/2] pkg-generic: improve incorrectly used package detection Thomas Petazzoni
2015-12-29 18:06 ` Yann E. MORIN [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=20151229180600.GC3445@free.fr \
--to=yann.morin.1998@free.fr \
--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