* [Buildroot] [PATCH] script/scancpan: add -host & -hostonly options
@ 2014-03-29 15:17 Francois Perrad
2014-03-29 15:46 ` Thomas Petazzoni
0 siblings, 1 reply; 2+ messages in thread
From: Francois Perrad @ 2014-03-29 15:17 UTC (permalink / raw)
To: buildroot
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
support/scripts/scancpan | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/support/scripts/scancpan b/support/scripts/scancpan
index 8d26795..2008356 100755
--- a/support/scripts/scancpan
+++ b/support/scripts/scancpan
@@ -482,11 +482,13 @@ use File::Basename;
use Module::CoreList;
use MetaCPAN::API::Tiny;
-my ($help, $man, $quiet, $force, $recommend);
+my ($help, $man, $quiet, $force, $recommend, $host, $hostonly);
GetOptions( 'help|?' => \$help,
'man' => \$man,
'quiet|q' => \$quiet,
'force|f' => \$force,
+ 'host' => \$host,
+ 'hostonly' => \$hostonly,
'recommend' => \$recommend
) or pod2usage(-exitval => 1);
pod2usage(-exitval => 0) if $help;
@@ -547,8 +549,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, !$hostonly, $host || $hostonly );
}
say scalar keys %dist, q{ packages fetched.} unless $quiet;
@@ -660,6 +662,8 @@ supports/scripts/scancpan [options] [distname ...]
-man
-quiet
-force
+ -host
+ -hostonly
-recommend
=head1 OPTIONS
@@ -682,6 +686,14 @@ Executes without output
Forces the overwriting of existing files.
+=item B<-host>
+
+Generates package for the target and host variants (the default is for target only).
+
+=item B<-hostonly>
+
+Generates package only for the host variant (the default is for target only).
+
=item B<-recommend>
Adds I<recommended> dependencies.
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Buildroot] [PATCH] script/scancpan: add -host & -hostonly options
2014-03-29 15:17 [Buildroot] [PATCH] script/scancpan: add -host & -hostonly options Francois Perrad
@ 2014-03-29 15:46 ` Thomas Petazzoni
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2014-03-29 15:46 UTC (permalink / raw)
To: buildroot
Dear Francois Perrad,
On Sat, 29 Mar 2014 16:17:04 +0100, Francois Perrad wrote:
> +=item B<-host>
> +
> +Generates package for the target and host variants (the default is for target only).
> +
> +=item B<-hostonly>
> +
> +Generates package only for the host variant (the default is for target only).
The naming of the options look really weird, IMO. If you use -host, I
would assume that only the host variant is generated. What about:
* default behavior: target only (i.e same as -target below)
* -target: enable target package
* -notarget: disable target package
* -host: enable host package
* -nohost: disable host package
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-03-29 15:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-29 15:17 [Buildroot] [PATCH] script/scancpan: add -host & -hostonly options Francois Perrad
2014-03-29 15:46 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox