elsif ($option eq 'p' or $option eq 'package') {
push @{$options{DOPACKAGES}}, $value;
}
+ elsif ($option eq 's' or $option eq 'same-arch') {
+ push @{$options{DOPACKAGES}}, GetPackages('same');
+ $options{DOSAME}=1;
+ }
else {
error("bad option $option - should never happen!\n");
}
"p=s" => \&AddPackage,
"package=s" => \&AddPackage,
+ "s" => \&AddPackage,
+ "same-arch" => \&AddPackage,
+
"N=s" => \&ExcludePackage,
"no-package=s" => \&ExcludePackage,
"d" => \$options{D_FLAG},
"remove-d" => \$options{D_FLAG},
+ "dirs-only" => \$options{D_FLAG},
"r" => \$options{R_FLAG},
"no-restart-on-upgrade" => \$options{R_FLAG},
"no-act" => \$options{NO_ACT},
"init-script=s" => \$options{INIT_SCRIPT},
+
+ "sourcedir=s" => \$options{SOURCEDIR},
+
+ "destdir=s" => \$options{DESTDIR},
);
if (!$ret) {
# want us to act on them all. Note we have to do this before excluding
# packages out, below.
if (! defined $options{DOPACKAGES} || ! @{$options{DOPACKAGES}}) {
- if ($options{DOINDEP} || $options{DOARCH}) {
+ if ($options{DOINDEP} || $options{DOARCH} || $options{DOSAME}) {
# User specified that all arch (in)dep package be
# built, and there are none of that type.
error("I have no package to build");
}
@{$options{DOPACKAGES}}=@package_list;
+ # Generate EXCLUDE_FIND.
+ $options{EXCLUDE_FIND}='';
+ foreach (@{$options{EXCLUDE}}) {
+ $options{EXCLUDE_FIND}.="-regex .*".quotemeta($_).".* -or ";
+ }
+ $options{EXCLUDE_FIND}=~s/ -or $//;
+
# If there are no packages to act on now, it's an error.
if (! defined $options{DOPACKAGES} || ! @{$options{DOPACKAGES}}) {
error("I have no package to build");