Add module list flag support when building modules
This commit is contained in:
parent
87ba4dd181
commit
09d0b26aea
@ -29,6 +29,8 @@ my ($force_theme, $url, $upstream, $debdepends, $debrecommends,
|
|||||||
$no_prefix, $force_usermin, $release, $allow_overwrite, $final_mod,
|
$no_prefix, $force_usermin, $release, $allow_overwrite, $final_mod,
|
||||||
$dsc_file, $dir, $ver, @exclude);
|
$dsc_file, $dir, $ver, @exclude);
|
||||||
|
|
||||||
|
my $mod_list = 'full';
|
||||||
|
|
||||||
while(@ARGV) {
|
while(@ARGV) {
|
||||||
my $a = shift(@ARGV);
|
my $a = shift(@ARGV);
|
||||||
if ($a eq "--deb-depends") {
|
if ($a eq "--deb-depends") {
|
||||||
@ -79,6 +81,9 @@ while(@ARGV) {
|
|||||||
elsif ($a eq "--exclude") {
|
elsif ($a eq "--exclude") {
|
||||||
push(@exclude, shift(@ARGV));
|
push(@exclude, shift(@ARGV));
|
||||||
}
|
}
|
||||||
|
elsif ($a eq "--mod-list") {
|
||||||
|
$mod_list = shift(@ARGV);
|
||||||
|
}
|
||||||
elsif ($a =~ /^\-\-/) {
|
elsif ($a =~ /^\-\-/) {
|
||||||
print STDERR "Unknown option $a\n";
|
print STDERR "Unknown option $a\n";
|
||||||
exit(1);
|
exit(1);
|
||||||
@ -113,6 +118,7 @@ if (!$dir) {
|
|||||||
print " [--dsc-file file.dsc]\n";
|
print " [--dsc-file file.dsc]\n";
|
||||||
print " [--force-theme]\n";
|
print " [--force-theme]\n";
|
||||||
print " [--exclude file-or-dir]\n";
|
print " [--exclude file-or-dir]\n";
|
||||||
|
print " [--mod-list full|core|minimal]\n";
|
||||||
print RESET, "\n";
|
print RESET, "\n";
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
@ -246,7 +252,7 @@ if ($debdepends && exists($minfo{'depends'})) {
|
|||||||
my $curr_dir = $0;
|
my $curr_dir = $0;
|
||||||
($curr_dir) = $curr_dir =~ /^(.+)\/[^\/]+$/;
|
($curr_dir) = $curr_dir =~ /^(.+)\/[^\/]+$/;
|
||||||
$curr_dir = "." if ($curr_dir !~ /^\//);
|
$curr_dir = "." if ($curr_dir !~ /^\//);
|
||||||
my $mod_def_file = "$curr_dir/mod_full_list.txt";
|
my $mod_def_file = "$curr_dir/mod_${mod_list}_list.txt";
|
||||||
next if (! -r $mod_def_file);
|
next if (! -r $mod_def_file);
|
||||||
open(my $fh, '<', $mod_def_file) ||
|
open(my $fh, '<', $mod_def_file) ||
|
||||||
die "Error opening \"$mod_def_file\" : $!\n";
|
die "Error opening \"$mod_def_file\" : $!\n";
|
||||||
|
@ -36,6 +36,8 @@ my ($force_theme, $rpmdepends, $rpmrecommends, $no_prefix, $set_prefix, $vendor,
|
|||||||
$url, $force_usermin, $final_mod, $sign, $keyname,
|
$url, $force_usermin, $final_mod, $sign, $keyname,
|
||||||
$epoch, $dir, $ver, @exclude);
|
$epoch, $dir, $ver, @exclude);
|
||||||
|
|
||||||
|
my $mod_list = 'full';
|
||||||
|
|
||||||
# Parse command-line args
|
# Parse command-line args
|
||||||
while(@ARGV) {
|
while(@ARGV) {
|
||||||
# XXX Untainting isn't needed when running as non-root?
|
# XXX Untainting isn't needed when running as non-root?
|
||||||
@ -97,6 +99,9 @@ while(@ARGV) {
|
|||||||
elsif ($a eq "--exclude") {
|
elsif ($a eq "--exclude") {
|
||||||
push(@exclude, shift(@ARGV));
|
push(@exclude, shift(@ARGV));
|
||||||
}
|
}
|
||||||
|
elsif ($a eq "--mod-list") {
|
||||||
|
$mod_list = shift(@ARGV);
|
||||||
|
}
|
||||||
elsif ($a =~ /^\-\-/) {
|
elsif ($a =~ /^\-\-/) {
|
||||||
print STDERR "Unknown option $a\n";
|
print STDERR "Unknown option $a\n";
|
||||||
exit(1);
|
exit(1);
|
||||||
@ -134,6 +139,7 @@ if (!$dir) {
|
|||||||
print " [--sign]\n";
|
print " [--sign]\n";
|
||||||
print " [--key keyname]\n";
|
print " [--key keyname]\n";
|
||||||
print " [--exclude file]\n";
|
print " [--exclude file]\n";
|
||||||
|
print " [--mod-list full|core|minimal]\n";
|
||||||
print RESET, "\n";
|
print RESET, "\n";
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
@ -267,7 +273,7 @@ if ($rpmdepends && defined($minfo{'depends'})) {
|
|||||||
my $curr_dir = $0;
|
my $curr_dir = $0;
|
||||||
($curr_dir) = $curr_dir =~ /^(.+)\/[^\/]+$/;
|
($curr_dir) = $curr_dir =~ /^(.+)\/[^\/]+$/;
|
||||||
$curr_dir = "." if ($curr_dir !~ /^\//);
|
$curr_dir = "." if ($curr_dir !~ /^\//);
|
||||||
my $mod_def_file = "$curr_dir/mod_full_list.txt";
|
my $mod_def_file = "$curr_dir/mod_${mod_list}_list.txt";
|
||||||
next if (! -r $mod_def_file);
|
next if (! -r $mod_def_file);
|
||||||
open(my $fh, '<', $mod_def_file) ||
|
open(my $fh, '<', $mod_def_file) ||
|
||||||
die "Error opening \"$mod_def_file\" : $!\n";
|
die "Error opening \"$mod_def_file\" : $!\n";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user