package-metadata.pl 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646
  1. #!/usr/bin/env perl
  2. use FindBin;
  3. use lib "$FindBin::Bin";
  4. use strict;
  5. use metadata;
  6. use Getopt::Long;
  7. my %board;
  8. sub version_to_num($) {
  9. my $str = shift;
  10. my $num = 0;
  11. if (defined($str) && $str =~ /^\d+(?:\.\d+)+$/)
  12. {
  13. my @n = (split(/\./, $str), 0, 0, 0, 0);
  14. $num = ($n[0] << 24) | ($n[1] << 16) | ($n[2] << 8) | $n[3];
  15. }
  16. return $num;
  17. }
  18. sub version_filter_list(@) {
  19. my $cmpver = version_to_num(shift @_);
  20. my @items;
  21. foreach my $item (@_)
  22. {
  23. if ($item =~ s/@(lt|le|gt|ge|eq|ne)(\d+(?:\.\d+)+)\b//)
  24. {
  25. my $op = $1;
  26. my $symver = version_to_num($2);
  27. if ($symver > 0 && $cmpver > 0)
  28. {
  29. next unless (($op eq 'lt' && $cmpver < $symver) ||
  30. ($op eq 'le' && $cmpver <= $symver) ||
  31. ($op eq 'gt' && $cmpver > $symver) ||
  32. ($op eq 'ge' && $cmpver >= $symver) ||
  33. ($op eq 'eq' && $cmpver == $symver) ||
  34. ($op eq 'ne' && $cmpver != $symver));
  35. }
  36. }
  37. push @items, $item;
  38. }
  39. return @items;
  40. }
  41. sub gen_kconfig_overrides() {
  42. my %config;
  43. my %kconfig;
  44. my $package;
  45. my $pkginfo = shift @ARGV;
  46. my $cfgfile = shift @ARGV;
  47. my $patchver = shift @ARGV;
  48. # parameter 2: build system config
  49. open FILE, "<$cfgfile" or return;
  50. while (<FILE>) {
  51. /^(CONFIG_.+?)=(.+)$/ and $config{$1} = 1;
  52. }
  53. close FILE;
  54. # parameter 1: package metadata
  55. open FILE, "<$pkginfo" or return;
  56. while (<FILE>) {
  57. /^Package:\s*(.+?)\s*$/ and $package = $1;
  58. /^Kernel-Config:\s*(.+?)\s*$/ and do {
  59. my @config = split /\s+/, $1;
  60. foreach my $config (version_filter_list($patchver, @config)) {
  61. my $val = 'm';
  62. my $override;
  63. if ($config =~ /^(.+?)=(.+)$/) {
  64. $config = $1;
  65. $override = 1;
  66. $val = $2;
  67. }
  68. if ($config{"CONFIG_PACKAGE_$package"} and ($config ne 'n')) {
  69. next if $kconfig{$config} eq 'y';
  70. $kconfig{$config} = $val;
  71. } elsif (!$override) {
  72. $kconfig{$config} or $kconfig{$config} = 'n';
  73. }
  74. }
  75. };
  76. };
  77. close FILE;
  78. foreach my $kconfig (sort keys %kconfig) {
  79. if ($kconfig{$kconfig} eq 'n') {
  80. print "# $kconfig is not set\n";
  81. } else {
  82. print "$kconfig=$kconfig{$kconfig}\n";
  83. }
  84. }
  85. }
  86. my %dep_check;
  87. sub __find_package_dep($$) {
  88. my $pkg = shift;
  89. my $name = shift;
  90. my $deps = ($pkg->{vdepends} or $pkg->{depends});
  91. return 0 unless defined $deps;
  92. foreach my $dep (@{$deps}) {
  93. next if $dep_check{$dep};
  94. $dep_check{$dep} = 1;
  95. return 1 if $dep eq $name;
  96. return 1 if ($package{$dep} and (__find_package_dep($package{$dep},$name) == 1));
  97. }
  98. return 0;
  99. }
  100. # wrapper to avoid infinite recursion
  101. sub find_package_dep($$) {
  102. my $pkg = shift;
  103. my $name = shift;
  104. %dep_check = ();
  105. return __find_package_dep($pkg, $name);
  106. }
  107. sub package_depends($$) {
  108. my $a = shift;
  109. my $b = shift;
  110. my $ret;
  111. return 0 if ($a->{submenu} ne $b->{submenu});
  112. if (find_package_dep($a, $b->{name}) == 1) {
  113. $ret = 1;
  114. } elsif (find_package_dep($b, $a->{name}) == 1) {
  115. $ret = -1;
  116. } else {
  117. return 0;
  118. }
  119. return $ret;
  120. }
  121. sub mconf_depends {
  122. my $pkgname = shift;
  123. my $depends = shift;
  124. my $only_dep = shift;
  125. my $res;
  126. my $dep = shift;
  127. my $seen = shift;
  128. my $parent_condition = shift;
  129. $dep or $dep = {};
  130. $seen or $seen = {};
  131. my @t_depends;
  132. $depends or return;
  133. my @depends = @$depends;
  134. foreach my $depend (@depends) {
  135. my $m = "depends on";
  136. my $flags = "";
  137. $depend =~ s/^([@\+]+)// and $flags = $1;
  138. my $vdep;
  139. my $condition = $parent_condition;
  140. next if $condition eq $depend;
  141. next if $seen->{"$parent_condition:$depend"};
  142. next if $seen->{":$depend"};
  143. $seen->{"$parent_condition:$depend"} = 1;
  144. if ($depend =~ /^(.+):(.+)$/) {
  145. if ($1 ne "PACKAGE_$pkgname") {
  146. if ($condition) {
  147. $condition = "$condition && $1";
  148. } else {
  149. $condition = $1;
  150. }
  151. }
  152. $depend = $2;
  153. }
  154. next if $package{$depend} and $package{$depend}->{buildonly};
  155. if ($flags =~ /\+/) {
  156. if ($vdep = $package{$depend}->{vdepends}) {
  157. my @vdeps = @$vdep;
  158. $depend = shift @vdeps;
  159. if (@vdeps > 1) {
  160. $condition = '!('.join("||", map { "PACKAGE_".$_ } @vdeps).')';
  161. } elsif (@vdeps > 0) {
  162. $condition = '!PACKAGE_'.$vdeps[0];
  163. }
  164. }
  165. # Menuconfig will not treat 'select FOO' as a real dependency
  166. # thus if FOO depends on other config options, these dependencies
  167. # will not be checked. To fix this, we simply emit all of FOO's
  168. # depends here as well.
  169. $package{$depend} and push @t_depends, [ $package{$depend}->{depends}, $condition ];
  170. $m = "select";
  171. next if $only_dep;
  172. } else {
  173. if ($vdep = $package{$depend}->{vdepends}) {
  174. $depend = join("||", map { "PACKAGE_".$_ } @$vdep);
  175. }
  176. }
  177. $flags =~ /@/ or $depend = "PACKAGE_$depend";
  178. if ($condition) {
  179. if ($m =~ /select/) {
  180. next if $depend eq $condition;
  181. $depend = "$depend if $condition";
  182. } else {
  183. $depend = "!($condition) || $depend" unless $dep->{$condition} eq 'select';
  184. }
  185. }
  186. $dep->{$depend} =~ /select/ or $dep->{$depend} = $m;
  187. }
  188. foreach my $tdep (@t_depends) {
  189. mconf_depends($pkgname, $tdep->[0], 1, $dep, $seen, $tdep->[1]);
  190. }
  191. foreach my $depend (keys %$dep) {
  192. my $m = $dep->{$depend};
  193. $res .= "\t\t$m $depend\n";
  194. }
  195. return $res;
  196. }
  197. sub mconf_conflicts {
  198. my $pkgname = shift;
  199. my $depends = shift;
  200. my $res = "";
  201. foreach my $depend (@$depends) {
  202. next unless $package{$depend};
  203. $res .= "\t\tdepends on m || (PACKAGE_$depend != y)\n";
  204. }
  205. return $res;
  206. }
  207. sub print_package_config_category($) {
  208. my $cat = shift;
  209. my %menus;
  210. my %menu_dep;
  211. return unless $category{$cat};
  212. print "menu \"$cat\"\n\n";
  213. my %spkg = %{$category{$cat}};
  214. foreach my $spkg (sort {uc($a) cmp uc($b)} keys %spkg) {
  215. foreach my $pkg (@{$spkg{$spkg}}) {
  216. next if $pkg->{buildonly};
  217. my $menu = $pkg->{submenu};
  218. if ($menu) {
  219. $menu_dep{$menu} or $menu_dep{$menu} = $pkg->{submenudep};
  220. } else {
  221. $menu = 'undef';
  222. }
  223. $menus{$menu} or $menus{$menu} = [];
  224. push @{$menus{$menu}}, $pkg;
  225. }
  226. }
  227. my @menus = sort {
  228. ($a eq 'undef' ? 1 : 0) or
  229. ($b eq 'undef' ? -1 : 0) or
  230. ($a cmp $b)
  231. } keys %menus;
  232. foreach my $menu (@menus) {
  233. my @pkgs = sort {
  234. package_depends($a, $b) or
  235. ($a->{name} cmp $b->{name})
  236. } @{$menus{$menu}};
  237. if ($menu ne 'undef') {
  238. $menu_dep{$menu} and print "if $menu_dep{$menu}\n";
  239. print "menu \"$menu\"\n";
  240. }
  241. foreach my $pkg (@pkgs) {
  242. next if $pkg->{ignore};
  243. my $title = $pkg->{name};
  244. my $c = (72 - length($pkg->{name}) - length($pkg->{title}));
  245. if ($c > 0) {
  246. $title .= ("." x $c). " ". $pkg->{title};
  247. }
  248. $title = "\"$title\"";
  249. print "\t";
  250. $pkg->{menu} and print "menu";
  251. print "config PACKAGE_".$pkg->{name}."\n";
  252. $pkg->{hidden} and $title = "";
  253. print "\t\t".($pkg->{tristate} ? 'tristate' : 'bool')." $title\n";
  254. print "\t\tdefault y if DEFAULT_".$pkg->{name}."\n";
  255. unless ($pkg->{hidden}) {
  256. my @def = ("ALL");
  257. if (!exists($pkg->{repository})) {
  258. push @def, "ALL_NONSHARED";
  259. }
  260. if ($pkg->{name} =~ /^kmod-/) {
  261. push @def, "ALL_KMODS";
  262. }
  263. $pkg->{default} ||= "m if " . join("||", @def);
  264. }
  265. if ($pkg->{default}) {
  266. foreach my $default (split /\s*,\s*/, $pkg->{default}) {
  267. print "\t\tdefault $default\n";
  268. }
  269. }
  270. print mconf_depends($pkg->{name}, $pkg->{depends}, 0);
  271. print mconf_depends($pkg->{name}, $pkg->{mdepends}, 0);
  272. print mconf_conflicts($pkg->{name}, $pkg->{conflicts});
  273. print "\t\thelp\n";
  274. print $pkg->{description};
  275. print "\n";
  276. $pkg->{config} and print $pkg->{config}."\n";
  277. }
  278. if ($menu ne 'undef') {
  279. print "endmenu\n";
  280. $menu_dep{$menu} and print "endif\n";
  281. }
  282. }
  283. print "endmenu\n\n";
  284. undef $category{$cat};
  285. }
  286. sub print_package_features() {
  287. keys %features > 0 or return;
  288. print "menu \"Package features\"\n";
  289. foreach my $n (keys %features) {
  290. my @features = sort { $b->{priority} <=> $a->{priority} or $a->{title} cmp $b->{title} } @{$features{$n}};
  291. print <<EOF;
  292. choice
  293. prompt "$features[0]->{target_title}"
  294. default FEATURE_$features[0]->{name}
  295. EOF
  296. foreach my $feature (@features) {
  297. print <<EOF;
  298. config FEATURE_$feature->{name}
  299. bool "$feature->{title}"
  300. EOF
  301. $feature->{description} =~ /\w/ and do {
  302. print "\t\thelp\n".$feature->{description}."\n";
  303. };
  304. }
  305. print "endchoice\n"
  306. }
  307. print "endmenu\n\n";
  308. }
  309. sub print_package_overrides() {
  310. keys %overrides > 0 or return;
  311. print "\tconfig OVERRIDE_PKGS\n";
  312. print "\t\tstring\n";
  313. print "\t\tdefault \"".join(" ", keys %overrides)."\"\n\n";
  314. }
  315. sub gen_package_config() {
  316. parse_package_metadata($ARGV[0]) or exit 1;
  317. print "menuconfig IMAGEOPT\n\tbool \"Image configuration\"\n\tdefault n\n";
  318. foreach my $preconfig (keys %preconfig) {
  319. foreach my $cfg (keys %{$preconfig{$preconfig}}) {
  320. my $conf = $preconfig{$preconfig}->{$cfg}->{id};
  321. $conf =~ tr/\.-/__/;
  322. print <<EOF
  323. config UCI_PRECONFIG_$conf
  324. string "$preconfig{$preconfig}->{$cfg}->{label}" if IMAGEOPT
  325. depends on PACKAGE_$preconfig
  326. default "$preconfig{$preconfig}->{$cfg}->{default}"
  327. EOF
  328. }
  329. }
  330. print "source \"package/*/image-config.in\"\n";
  331. if (scalar glob "package/feeds/*/*/image-config.in") {
  332. print "source \"package/feeds/*/*/image-config.in\"\n";
  333. }
  334. print_package_features();
  335. print_package_config_category 'Base system';
  336. foreach my $cat (sort {uc($a) cmp uc($b)} keys %category) {
  337. print_package_config_category $cat;
  338. }
  339. print_package_overrides();
  340. }
  341. sub get_conditional_dep($$) {
  342. my $condition = shift;
  343. my $depstr = shift;
  344. if ($condition) {
  345. if ($condition =~ /^!(.+)/) {
  346. return "\$(if \$(CONFIG_$1),,$depstr)";
  347. } else {
  348. return "\$(if \$(CONFIG_$condition),$depstr)";
  349. }
  350. } else {
  351. return $depstr;
  352. }
  353. }
  354. sub gen_package_mk() {
  355. my %conf;
  356. my %dep;
  357. my %done;
  358. my $line;
  359. parse_package_metadata($ARGV[0]) or exit 1;
  360. foreach my $name (sort {uc($a) cmp uc($b)} keys %package) {
  361. my $config;
  362. my $pkg = $package{$name};
  363. my @srcdeps;
  364. next if defined $pkg->{vdepends};
  365. $config = "\$(CONFIG_PACKAGE_$name)";
  366. if ($config) {
  367. $pkg->{buildonly} and $config = "";
  368. print "package-$config += $pkg->{subdir}$pkg->{src}\n";
  369. if ($pkg->{variant}) {
  370. if (!defined($done{$pkg->{src}}) or $pkg->{variant_default}) {
  371. print "\$(curdir)/$pkg->{subdir}$pkg->{src}/default-variant := $pkg->{variant}\n";
  372. }
  373. print "\$(curdir)/$pkg->{subdir}$pkg->{src}/variants += \$(if $config,$pkg->{variant})\n"
  374. }
  375. $pkg->{prereq} and print "prereq-$config += $pkg->{subdir}$pkg->{src}\n";
  376. }
  377. next if $done{$pkg->{src}};
  378. $done{$pkg->{src}} = 1;
  379. if (@{$pkg->{buildtypes}} > 0) {
  380. print "buildtypes-$pkg->{subdir}$pkg->{src} = ".join(' ', @{$pkg->{buildtypes}})."\n";
  381. }
  382. foreach my $spkg (@{$srcpackage{$pkg->{src}}}) {
  383. foreach my $dep (@{$spkg->{depends}}, @{$spkg->{builddepends}}) {
  384. $dep =~ /@/ or do {
  385. $dep =~ s/\+//g;
  386. push @srcdeps, $dep;
  387. };
  388. }
  389. }
  390. foreach my $type (@{$pkg->{buildtypes}}) {
  391. my @extra_deps;
  392. my %deplines;
  393. next unless $pkg->{"builddepends/$type"};
  394. foreach my $dep (@{$pkg->{"builddepends/$type"}}) {
  395. my $suffix = "";
  396. my $condition;
  397. if ($dep =~ /^(.+):(.+)/) {
  398. $condition = $1;
  399. $dep = $2;
  400. }
  401. if ($dep =~ /^(.+)(\/.+)/) {
  402. $dep = $1;
  403. $suffix = $2;
  404. }
  405. my $idx = "";
  406. my $pkg_dep = $package{$dep};
  407. if (defined($pkg_dep) && defined($pkg_dep->{src})) {
  408. $idx = $pkg_dep->{subdir}.$pkg_dep->{src};
  409. } elsif (defined($srcpackage{$dep})) {
  410. $idx = $subdir{$dep}.$dep;
  411. } else {
  412. next;
  413. }
  414. my $depstr = "\$(curdir)/$idx$suffix/compile";
  415. my $depline = get_conditional_dep($condition, $depstr);
  416. if ($depline) {
  417. $deplines{$depline}++;
  418. }
  419. }
  420. my $depline = join(" ", sort keys %deplines);
  421. if ($depline) {
  422. $line .= "\$(curdir)/".$pkg->{subdir}."$pkg->{src}/$type/compile += $depline\n";
  423. }
  424. }
  425. my $hasdeps = 0;
  426. my %deplines;
  427. foreach my $deps (@srcdeps) {
  428. my $idx;
  429. my $condition;
  430. my $prefix = "";
  431. my $suffix = "";
  432. if ($deps =~ /^(.+):(.+)/) {
  433. $condition = $1;
  434. $deps = $2;
  435. }
  436. if ($deps =~ /^(.+)(\/.+)/) {
  437. $deps = $1;
  438. $suffix = $2;
  439. }
  440. my $pkg_dep = $package{$deps};
  441. my @deps;
  442. if ($pkg_dep->{vdepends}) {
  443. @deps = @{$pkg_dep->{vdepends}};
  444. } else {
  445. @deps = ($deps);
  446. }
  447. foreach my $dep (@deps) {
  448. $pkg_dep = $package{$deps};
  449. if (defined $pkg_dep->{src}) {
  450. ($pkg->{src} ne $pkg_dep->{src}.$suffix) and $idx = $pkg_dep->{subdir}.$pkg_dep->{src};
  451. } elsif (defined($srcpackage{$dep})) {
  452. $idx = $subdir{$dep}.$dep;
  453. }
  454. undef $idx if $idx eq 'base-files';
  455. if ($idx) {
  456. $idx .= $suffix;
  457. my $depline;
  458. next if $pkg->{src} eq $pkg_dep->{src}.$suffix;
  459. next if $dep{$condition.":".$pkg->{src}."->".$idx};
  460. next if $dep{$pkg->{src}."->($dep)".$idx} and $pkg_dep->{vdepends};
  461. my $depstr;
  462. if ($pkg_dep->{vdepends}) {
  463. $depstr = "\$(if \$(CONFIG_PACKAGE_$dep),\$(curdir)/$idx/compile)";
  464. $dep{$pkg->{src}."->($dep)".$idx} = 1;
  465. } else {
  466. $depstr = "\$(curdir)/$idx/compile";
  467. $dep{$pkg->{src}."->".$idx} = 1;
  468. }
  469. $depline = get_conditional_dep($condition, $depstr);
  470. if ($depline) {
  471. $deplines{$depline}++;
  472. }
  473. }
  474. }
  475. }
  476. my $depline = join(" ", sort keys %deplines);
  477. if ($depline) {
  478. $line .= "\$(curdir)/".$pkg->{subdir}."$pkg->{src}/compile += $depline\n";
  479. }
  480. }
  481. if ($line ne "") {
  482. print "\n$line";
  483. }
  484. foreach my $preconfig (keys %preconfig) {
  485. my $cmds;
  486. foreach my $cfg (keys %{$preconfig{$preconfig}}) {
  487. my $conf = $preconfig{$preconfig}->{$cfg}->{id};
  488. $conf =~ tr/\.-/__/;
  489. $cmds .= "\techo \"uci set '$preconfig{$preconfig}->{$cfg}->{id}=\$(subst \",,\$(CONFIG_UCI_PRECONFIG_$conf))'\"; \\\n";
  490. }
  491. next unless $cmds;
  492. print <<EOF
  493. ifndef DUMP_TARGET_DB
  494. \$(TARGET_DIR)/etc/uci-defaults/$preconfig: FORCE
  495. ( \\
  496. $cmds \\
  497. ) > \$@
  498. ifneq (\$(IMAGEOPT)\$(CONFIG_IMAGEOPT),)
  499. package/preconfig: \$(TARGET_DIR)/etc/uci-defaults/$preconfig
  500. endif
  501. endif
  502. EOF
  503. }
  504. }
  505. sub gen_package_source() {
  506. parse_package_metadata($ARGV[0]) or exit 1;
  507. foreach my $name (sort {uc($a) cmp uc($b)} keys %package) {
  508. my $pkg = $package{$name};
  509. if ($pkg->{name} && $pkg->{source}) {
  510. print "$pkg->{name}: ";
  511. print "$pkg->{source}\n";
  512. }
  513. }
  514. }
  515. sub gen_package_subdirs() {
  516. parse_package_metadata($ARGV[0]) or exit 1;
  517. foreach my $name (sort {uc($a) cmp uc($b)} keys %package) {
  518. my $pkg = $package{$name};
  519. if ($pkg->{name} && $pkg->{repository}) {
  520. print "Package/$name/subdir = $pkg->{repository}\n";
  521. }
  522. }
  523. }
  524. sub gen_package_license($) {
  525. my $level = shift;
  526. parse_package_metadata($ARGV[0]) or exit 1;
  527. foreach my $name (sort {uc($a) cmp uc($b)} keys %package) {
  528. my $pkg = $package{$name};
  529. if ($pkg->{name}) {
  530. if ($pkg->{license}) {
  531. print "$pkg->{name}: ";
  532. print "$pkg->{license}\n";
  533. if ($pkg->{licensefiles} && $level == 0) {
  534. print "\tFiles: $pkg->{licensefiles}\n";
  535. }
  536. } else {
  537. if ($level == 1) {
  538. print "$pkg->{name}: Missing license! ";
  539. print "Please fix $pkg->{makefile}\n";
  540. }
  541. }
  542. }
  543. }
  544. }
  545. sub gen_version_filtered_list() {
  546. foreach my $item (version_filter_list(@ARGV)) {
  547. print "$item\n";
  548. }
  549. }
  550. sub parse_command() {
  551. GetOptions("ignore=s", \@ignore);
  552. my $cmd = shift @ARGV;
  553. for ($cmd) {
  554. /^mk$/ and return gen_package_mk();
  555. /^config$/ and return gen_package_config();
  556. /^kconfig/ and return gen_kconfig_overrides();
  557. /^source$/ and return gen_package_source();
  558. /^subdirs$/ and return gen_package_subdirs();
  559. /^license$/ and return gen_package_license(0);
  560. /^licensefull$/ and return gen_package_license(1);
  561. /^version_filter$/ and return gen_version_filtered_list();
  562. }
  563. die <<EOF
  564. Available Commands:
  565. $0 mk [file] Package metadata in makefile format
  566. $0 config [file] Package metadata in Kconfig format
  567. $0 kconfig [file] [config] [patchver] Kernel config overrides
  568. $0 source [file] Package source file information
  569. $0 subdirs [file] Package subdir information in makefile format
  570. $0 license [file] Package license information
  571. $0 licensefull [file] Package license information (full list)
  572. $0 version_filter [patchver] [list...] Filter list of version tagged strings
  573. Options:
  574. --ignore <name> Ignore the source package <name>
  575. EOF
  576. }
  577. parse_command();