summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xMaster/texmf/scripts/texlive/tlmgr.pl2
-rw-r--r--Master/tlpkg/TeXLive/TLPDB.pm27
2 files changed, 14 insertions, 15 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl
index e7908de7d09..e9b0bcf27b1 100755
--- a/Master/texmf/scripts/texlive/tlmgr.pl
+++ b/Master/texmf/scripts/texlive/tlmgr.pl
@@ -480,11 +480,11 @@ sub action_remove {
$foo{'mktexlsr'} = 1;
} else {
merge_into(\%foo, &remove_package($pkg, $localtlpdb, $opt_force));
+ logpackage("remove: $pkg");
}
if (keys %foo) {
# removal was successful, so the return is at least 0x0001 mktexlsr
# remove dependencies, too
- logpackage("remove: $pkg");
merge_into(\%ret, \%foo);
$already_removed{$pkg} = 1;
}
diff --git a/Master/tlpkg/TeXLive/TLPDB.pm b/Master/tlpkg/TeXLive/TLPDB.pm
index d29d939ca6b..7e9f0a16dd6 100644
--- a/Master/tlpkg/TeXLive/TLPDB.pm
+++ b/Master/tlpkg/TeXLive/TLPDB.pm
@@ -137,22 +137,21 @@ Returns an array of package names depending on $pkg.
sub needed_by {
my ($self,$pkg) = @_;
my @ret;
- # we only check collections and schemes ...
- foreach my $p ($self->list_packages) {
+ for my $p ($self->list_packages) {
my $tlp = $self->get_package($p);
- if ($tlp->category =~ m/$MetaCategoriesRegexp/) {
- foreach my $d ($tlp->depends) {
- if ($d =~ m/^(.*)\.win32$/) {
- if (member("win32", $self->available_architectures)) {
- if ($d eq $pkg) {
- push @ret, $p;
- last;
- }
- }
- } else {
- if ($d eq $pkg) {
+ DEPENDS: for my $d ($tlp->depends) {
+ # exact match
+ if ($d eq $pkg) {
+ push @ret, $p;
+ last DEPENDS; # of the for loop on all depends
+ }
+ #
+ if ($d =~ m/^(.*)\.ARCH$/) {
+ my $parent = $1;
+ for my $a ($self->available_architectures) {
+ if ($pkg eq "$parent.$a") {
push @ret, $p;
- last;
+ last DEPENDS;
}
}
}