Commit 204e207d authored by Josué Ortega's avatar Josué Ortega

Add skiplist and endlist CLI options

parent 8e755897
debtree (1.1.0) UNRELEASED; urgency=medium
* Upload to unstable.
* Add skiplist and endlist command line options. Thanks to
Matthias Beyer <mail@beyermatthias.de> for the patch.
-- Josue Ortega <josue@debian.org> Mon, 08 Jul 2019 19:20:14 -0600
debtree (1.0.11) experimental; urgency=medium
* New maintainer (Closes: #925003).
......
......@@ -58,6 +58,8 @@ my $show_all = 0;
my $do_rotate = 0;
my $do_condense = 0;
my $ARCH="";
my $endlist="";
my $skiplist="";
my $download_size=0;
my $total_size=0;
......@@ -93,6 +95,8 @@ GetOptions(
'rotate|r' => \$do_rotate,
'condense' => \$do_condense,
'arch=s' => \$ARCH,
'endlist=s' => \$endlist,
'skiplist=s' => \$skiplist,
'quiet|q' => \$quiet,
'verbose|v+' => \$verbose,
) or usage;
......@@ -1156,24 +1160,40 @@ sub process_package {
# - "end" packages are displayed and marked as such, but we don't recurse
# to determine their dependencies
if (! $show_all) {
my $file;
for $file ("$HOME/.debtree/skiplist", "/etc/debtree/skiplist") {
if (-r $file) {
info(3, "Using list of 'skip' packages from $file");
if (! $no_skip) {
import_list($file, "skip");
} else {
# Change skip packages to end packages
import_list($file, "end");
if (-r $skiplist) {
info(3, "Using list of 'skip' packages from $skiplist");
if (! $no_skip){
import_list($skiplist, "skip");
} else {
# Change skip packages to end packages
import_list($skiplist, "end");
}
} else {
my $file;
for $file ("$HOME/.debtree/skiplist", "/etc/debtree/skiplist") {
if (-r $file) {
info(3, "Using list of 'skip' packages from $file");
if (! $no_skip) {
import_list($file, "skip");
} else {
# Change skip packages to end packages
import_list($file, "end");
}
last;
}
last;
}
}
for $file ("$HOME/.debtree/endlist", "/etc/debtree/endlist") {
if (-r $file) {
info(3, "Using list of 'end' packages from $file");
import_list($file, "end");
last;
if (-r $endlist) {
info(3, "Using list of 'end' packages from $endlist");
import_list($endlist, "end");
} else {
my $file;
for $file ("$HOME/.debtree/endlist", "/etc/debtree/endlist") {
if (-r $file) {
info(3, "Using list of 'end' packages from $file");
import_list($file, "end");
last;
}
}
}
}
......
......@@ -210,6 +210,14 @@ This means that dependencies that by default are not included in graphs, will
now be shown, but their dependencies will not. See also the section CONFIGURATION
below.
.IP "\fB\-\-skiplist\fP=\fIfile\fP"
File with the list of custom \fIskip packages\fP. This overrides global skiplist configuration.
See also the section CONFIGURATION.
.IP "\fB\-\-endlist\fP=\fIfile\fP"
File with the list of custom \fIend packages\fP. This overrides global endlist configuration.
See also the section CONFIGURATION
.IP "\fB\-\-show\-all\fP"
Display the full dependency tree.
......@@ -270,7 +278,8 @@ just too big or complex.
If a list is present under the HOME directory of the user, that file will be used
instead of the default file in /etc/debtree/.
.PP
See also the options \-\-no\-skip, \-\-show\-all and \-\-max\-depth.
See also the options \-\-no\-skip, \-\-show\-all and \-\-max\-depth, \-\-skiplist,
\-\-endlist.
.SH EXAMPLES
Below are some basic usage examples for \fBdebtree\fP.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment