summaryrefslogtreecommitdiff
path: root/Master/tlpkg/TeXLive
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2008-10-12 18:16:23 +0000
committerNorbert Preining <preining@logic.at>2008-10-12 18:16:23 +0000
commitad44aa7a2cd39078ee03819ef4d3e0704aae6974 (patch)
tree6b8e039dda1e401859f4110106fcc4f5ac300a81 /Master/tlpkg/TeXLive
parenta573b21b465e9db427242c90c69a050b8366e82e (diff)
fix wrong remove behaviour
git-svn-id: svn://tug.org/texlive/trunk@10940 c570f23f-e606-0410-a88d-b1316a301751
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;
}
}
}