* [Buildroot] [v2] script/scancpan: add -host & -target options
@ 2014-04-04 17:10 Francois Perrad
2014-04-04 21:31 ` Thomas Petazzoni
0 siblings, 1 reply; 2+ messages in thread
From: Francois Perrad @ 2014-04-04 17:10 UTC (permalink / raw)
To: buildroot
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
support/scripts/scancpan | 24 ++++++++++++++++++------
1 file changed, 18 insertions(+), 6 deletions(-)
diff --git a/support/scripts/scancpan b/support/scripts/scancpan
index 8d26795..dc62b47 100755
--- a/support/scripts/scancpan
+++ b/support/scripts/scancpan
@@ -482,11 +482,14 @@ use File::Basename;
use Module::CoreList;
use MetaCPAN::API::Tiny;
-my ($help, $man, $quiet, $force, $recommend);
+my ($help, $man, $quiet, $force, $recommend, $host);
+my $target = 1;
GetOptions( 'help|?' => \$help,
'man' => \$man,
'quiet|q' => \$quiet,
'force|f' => \$force,
+ 'host!' => \$host,
+ 'target!' => \$target,
'recommend' => \$recommend
) or pod2usage(-exitval => 1);
pod2usage(-exitval => 0) if $help;
@@ -547,8 +550,8 @@ sub fetch {
}
foreach my $distname (@ARGV) {
- # Command-line's distributions are needed for target, not host
- fetch( $distname, 1, 0 );
+ # Command-line's distributions
+ fetch( $distname, !!$target, !!$host );
}
say scalar keys %dist, q{ packages fetched.} unless $quiet;
@@ -660,6 +663,8 @@ supports/scripts/scancpan [options] [distname ...]
-man
-quiet
-force
+ -target/-notarget
+ -host/-nohost
-recommend
=head1 OPTIONS
@@ -682,6 +687,14 @@ Executes without output
Forces the overwriting of existing files.
+=item B<-target/-notarget>
+
+Switches package generation for the target variant (the default is C<-target>).
+
+=item B<-host/-nohost>
+
+Switches package generation for the host variant (the default is C<-nohost>).
+
=item B<-recommend>
Adds I<recommended> dependencies.
@@ -695,9 +708,8 @@ Perl/CPAN distributions required by the specified distnames. The
dependencies and metadata are fetched from https://metacpan.org/.
After running this script, it is necessary to check the generated files.
-You have to manually enable the host- version if you need it. You have to
-manually add the license files (PERL_FOO_LICENSE_FILES variable). For
-distributions that link against a target library, you have to add the
+You have to manually add the license files (PERL_FOO_LICENSE_FILES variable).
+For distributions that link against a target library, you have to add the
buildroot package name for that library to the DEPENDENCIES variable.
See the Buildroot documentation for details on the usage of the Perl
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Buildroot] [v2] script/scancpan: add -host & -target options
2014-04-04 17:10 [Buildroot] [v2] script/scancpan: add -host & -target options Francois Perrad
@ 2014-04-04 21:31 ` Thomas Petazzoni
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2014-04-04 21:31 UTC (permalink / raw)
To: buildroot
Dear Francois Perrad,
On Fri, 4 Apr 2014 19:10:33 +0200, Francois Perrad wrote:
>
> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
> ---
> support/scripts/scancpan | 24 ++++++++++++++++++------
> 1 file changed, 18 insertions(+), 6 deletions(-)
To be honest, I hesitated to apply this patch. There is again not
commit log, even though the change is far from being trivial.
So I've applied it, but I really, really, really would like to see more
verbose commit messages in the future.
Thanks a lot!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-04-04 21:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-04 17:10 [Buildroot] [v2] script/scancpan: add -host & -target options Francois Perrad
2014-04-04 21:31 ` Thomas Petazzoni
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.