Skip to content

Commit

Permalink
updating installer data
Browse files Browse the repository at this point in the history
  • Loading branch information
norbusan committed Jan 15, 2025
1 parent fbc072e commit e007e61
Showing 1 changed file with 61 additions and 37 deletions.
98 changes: 61 additions & 37 deletions texmf-dist/scripts/texlive/tlmgr.pl
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ BEGIN
"list" => 1,
"only-installed" => 1,
"only-remote" => 1,
"only-files" => 1,
"json" => 1
},
"run-post" => 0,
Expand Down Expand Up @@ -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)]);
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -8818,6 +8837,11 @@ package version, as approximations only, due to timing skew of the
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
Expand Down

0 comments on commit e007e61

Please sign in to comment.