summaryrefslogtreecommitdiff
path: root/Master
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
parenta573b21b465e9db427242c90c69a050b8366e82e (diff)
fix wrong remove behaviour
git-svn-id: svn://tug.org/texlive/trunk@10940 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-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;
}
}
}