summaryrefslogtreecommitdiff
path: root/Master/tlpkg/TeXLive
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/TeXLive')
-rw-r--r--Master/tlpkg/TeXLive/TLPDB.pm27
1 files changed, 13 insertions, 14 deletions
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;
}
}
}