From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [V2 1/2] scancpan: handle recommended dependencies as optional packages
Date: Sat, 5 Mar 2016 16:41:58 +0100 [thread overview]
Message-ID: <20160305164158.5e7eca18@free-electrons.com> (raw)
In-Reply-To: <1453409093-22012-1-git-send-email-francois.perrad@gadz.org>
Dear Francois Perrad,
Sorry for the slow answer.
On Thu, 21 Jan 2016 21:44:52 +0100, Francois Perrad wrote:
> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
As usual, this patch would highly benefit from a more detailed commit
log. I've already asked you this hundreds of times: whenever a patch is
not just a simple version bump, it *MUST* have a commit log.
> - next if !$recommend && ${$dep}{relationship} ne q{requires};
> my $distname = $mcpan->module( $modname )->{distribution};
> if (${$dep}{phase} eq q{runtime}) {
> - $runtime{$distname} = 1;
> + if (${$dep}{relationship} eq q{requires}) {
> + $runtime{$distname} = 1;
> + }
> + else {
> + $optional{$distname} = 1 if $recommend;
> + }
So, if I understand well, if -recommend was passed you used to handle
"recommend" dependencies expressed on CPAN as "generate the Buildroot
packages for them, but don't create any dependency on them".
And now, the idea is that if you pass -recommend, in additional to
generating the Buildroot packages, it would also add some code in the
Buildroot package to optionally depend on them. Is this correct ?
Unfortunately, it doesn't seem to work for me. I've tested with this
patch applied, and then:
./output/host/usr/bin/perl ./support/scripts/scancpan -recommend IO-Stream
According to
https://metacpan.org/source/POWERMAN/IO-Stream-v2.0.2/META.yml,
IO-Stream has a "recommends" on Data::Alias. I can indeed see scancpan
creating the perl-data-alias package, but perl-io-stream doesn't
contain any optional dependency on it. Am I doing something wrong? Is
there something missing in your script. Here is the generated
perl-io-stream.mk:
PERL_IO_STREAM_VERSION = v2.0.2
PERL_IO_STREAM_SOURCE = IO-Stream-$(PERL_IO_STREAM_VERSION).tar.gz
PERL_IO_STREAM_SITE = $(BR2_CPAN_MIRROR)/authors/id/P/PO/POWERMAN
PERL_IO_STREAM_DEPENDENCIES = host-perl-module-build-tiny perl-anyevent perl-ev
PERL_IO_STREAM_LICENSE = MIT
PERL_IO_STREAM_LICENSE_FILES = LICENSE
$(eval $(perl-package))
> @@ -683,6 +693,15 @@ while (my ($distname, $dist) = each %dist) {
> say {$fh} qq{${brname}_LICENSE = ${license}} if $license && $license ne q{unknown};
> say {$fh} qq{${brname}_LICENSE_FILES = ${license_files}} if $license_files;
> say {$fh} qq{};
> + foreach (sort @{$deps_optional{$distname}}) {
> + next if grep { $_ eq $distname; } @{$deps_runtime{$_}}; # avoid cyclic dependencies
> + my $opt_brname = brname( $_ );
> + my $opt_fsname = fsname( $_ );
> + say {$fh} qq{ifeq (\$(BR2_PACKAGE_PERL_${opt_brname}),y)};
> + say {$fh} qq{${brname}_DEPENDENCIES += ${opt_fsname}};
> + say {$fh} qq{endif};
> + say {$fh} qq{};
So in Perl, dependencies are not runtime dependencies, but really build
time dependencies ?
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
next prev parent reply other threads:[~2016-03-05 15:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-21 20:44 [Buildroot] [V2 1/2] scancpan: handle recommended dependencies as optional packages Francois Perrad
2016-01-21 20:44 ` [Buildroot] [V2 2/2] scancpan: use recommend & test flags only at first level Francois Perrad
2016-03-05 15:42 ` Thomas Petazzoni
2016-03-12 18:00 ` François Perrad
2016-03-05 15:41 ` Thomas Petazzoni [this message]
2016-03-12 17:58 ` [Buildroot] [V2 1/2] scancpan: handle recommended dependencies as optional packages François Perrad
2016-03-12 21:26 ` Thomas Petazzoni
2016-03-12 17:58 ` François Perrad
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=20160305164158.5e7eca18@free-electrons.com \
--to=thomas.petazzoni@free-electrons.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