summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2025-01-15 04:24:52 +0000
committerNorbert Preining <preining@logic.at>2025-01-15 04:24:52 +0000
commit36e62a716f501622a69a804d10e08c34399ab17f (patch)
tree8141c2bab303b03b7317ebec1f83f0dd3f065a90 /Master/texmf-dist
parent5512edee7bd7da84597ac30bfbd5a3970a225792 (diff)
Implement tlmgr info --only-files
git-svn-id: svn://tug.org/texlive/trunk@73459 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rwxr-xr-xMaster/texmf-dist/scripts/texlive/tlmgr.pl98
1 files changed, 61 insertions, 37 deletions
diff --git a/Master/texmf-dist/scripts/texlive/tlmgr.pl b/Master/texmf-dist/scripts/texlive/tlmgr.pl
index 075954fba2b..f709823a208 100755
--- a/Master/texmf-dist/scripts/texlive/tlmgr.pl
+++ b/Master/texmf-dist/scripts/texlive/tlmgr.pl
@@ -213,6 +213,7 @@ my %action_specification = (
"list" => 1,
"only-installed" => 1,
"only-remote" => 1,
+ "only-files" => 1,
"json" => 1
},
"run-post" => 0,
@@ -4368,6 +4369,17 @@ sub show_one_package_detail {
}
}
}
+ if ($opts{"only-files"}) {
+ print "$pkg\n";
+ return show_one_package_detail3($tlpdb, $pkg, $tlp, $source_found, $installed, 1, @colls);
+ } else {
+ return show_one_package_detail2($tlpdb, $pkg, $tlp, $source_found, $installed, 0, @colls);
+ }
+}
+
+sub show_one_package_detail2 {
+ my ($tlpdb, $pkg, $tlp, $source_found, $installed, @colls) = @_;
+ my $ret = $F_OK;
# {
# require Data::Dumper;
# print Data::Dumper->Dump([\$tlp], [qw(tlp)]);
@@ -4464,48 +4476,55 @@ sub show_one_package_detail {
}
}
print "Included files, by type:\n";
- # if the package has a .ARCH dependency we also list the files for
- # those packages
- my @todo = $tlpdb->expand_dependencies("-only-arch", $tlpdb, ($pkg));
- for my $d (sort @todo) {
- my $foo = $tlpdb->get_package($d);
- if (!$foo) {
- tlwarn ("$prg: Should not happen, no dependent package $d\n");
- return($F_WARNING);
- }
- if ($d ne $pkg) {
- print "depending package $d:\n";
- }
- if ($foo->runfiles) {
- print "run files:\n";
- for my $f (sort $foo->runfiles) { print " $f\n"; }
- }
- if ($foo->srcfiles) {
- print "source files:\n";
- for my $f (sort $foo->srcfiles) { print " $f\n"; }
- }
- if ($foo->docfiles) {
- print "doc files:\n";
- for my $f (sort $foo->docfiles) {
- print " $f";
- my $dfd = $foo->docfiledata;
- if (defined($dfd->{$f})) {
- for my $k (keys %{$dfd->{$f}}) {
- print " $k=\"", $dfd->{$f}->{$k}, '"';
- }
+ $ret |= show_one_package_detail3($tlpdb, $pkg, $tlp, $source_found, $installed, 0, @colls);
+ }
+ print "\n";
+ return($ret);
+}
+
+sub show_one_package_detail3 {
+ my ($tlpdb, $pkg, $tlp, $source_found, $installed, $silent, @colls) = @_;
+ my $ret = $F_OK;
+ # if the package has a .ARCH dependency we also list the files for
+ # those packages
+ my @todo = $tlpdb->expand_dependencies("-only-arch", $tlpdb, ($pkg));
+ for my $d (sort @todo) {
+ my $foo = $tlpdb->get_package($d);
+ if (!$foo) {
+ tlwarn ("$prg: Should not happen, no dependent package $d\n");
+ return($F_WARNING);
+ }
+ if ($d ne $pkg && !$silent) {
+ print "depending package $d:\n";
+ }
+ if ($foo->runfiles) {
+ print "run files:\n" if (!$silent);
+ for my $f (sort $foo->runfiles) { print " $f\n"; }
+ }
+ if ($foo->srcfiles) {
+ print "source files:\n" if (!$silent);
+ for my $f (sort $foo->srcfiles) { print " $f\n"; }
+ }
+ if ($foo->docfiles) {
+ print "doc files:\n" if (!$silent);
+ for my $f (sort $foo->docfiles) {
+ print " $f";
+ my $dfd = $foo->docfiledata;
+ if (defined($dfd->{$f})) {
+ for my $k (keys %{$dfd->{$f}}) {
+ print " $k=\"", $dfd->{$f}->{$k}, '"';
}
- print "\n";
}
- }
- # in case we have them
- if ($foo->allbinfiles) {
- print "bin files (all platforms):\n";
- for my $f (sort $foo->allbinfiles) { print " $f\n"; }
+ print "\n";
}
}
+ # in case we have them
+ if ($foo->allbinfiles) {
+ print "bin files (all platforms):\n" if (!$silent);
+ for my $f (sort $foo->allbinfiles) { print " $f\n"; }
+ }
}
- print "\n";
- return($ret);
+ return $ret;
}
# PINNING
@@ -8818,6 +8837,11 @@ files is also shown, including those for platform-specific dependencies.
When given with schemes and collections, C<--list> outputs their
dependencies in a similar way.
+=item B<--only-files>
+
+If this option is given, only the files for a given package are listed,
+no further information.
+
=item B<--only-installed>
If this option is given, the installation source will not be used; only