diff options
author | Norbert Preining <preining@logic.at> | 2007-10-18 14:19:51 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2007-10-18 14:19:51 +0000 |
commit | 383376384e8be7e270474ce287fea73559c81d0a (patch) | |
tree | e6164f4775a5321c182363a777f271c2a9b572ab /Master/tlpkg/TeXLive | |
parent | d41ee107aabd6ac4e2aff55782060931622f48a4 (diff) |
remove the Category at the beginning of a depend line
adapt modules
update texlive tlpdb, including the info from the catalogue
git-svn-id: svn://tug.org/texlive/trunk@5228 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/TeXLive')
-rw-r--r-- | Master/tlpkg/TeXLive/TLConfig.pm | 2 | ||||
-rw-r--r-- | Master/tlpkg/TeXLive/TLPDB.pm | 24 | ||||
-rw-r--r-- | Master/tlpkg/TeXLive/TLPOBJ.pm | 19 | ||||
-rw-r--r-- | Master/tlpkg/TeXLive/TeXCatalogue.pm | 10 |
4 files changed, 40 insertions, 15 deletions
diff --git a/Master/tlpkg/TeXLive/TLConfig.pm b/Master/tlpkg/TeXLive/TLConfig.pm index 8edac0d3517..b858798fca6 100644 --- a/Master/tlpkg/TeXLive/TLConfig.pm +++ b/Master/tlpkg/TeXLive/TLConfig.pm @@ -14,6 +14,7 @@ BEGIN { @MetaCategories @NormalCategories @Categories + $MetaCategoriesRegexp $CategoriesRegexp $DefaultCategory ); @@ -21,6 +22,7 @@ BEGIN { # Meta Categories do not ship files, but call only for other packages our @MetaCategories = qw/Collection Scheme/; +our $MetaCategoriesRegexp = '(Collection|Scheme)'; # Normal Categories contain actial files and do not depend on other things. our @NormalCategories = qw/Package TLCore Documentation/; diff --git a/Master/tlpkg/TeXLive/TLPDB.pm b/Master/tlpkg/TeXLive/TLPDB.pm index e90124f57f0..10e377ec05e 100644 --- a/Master/tlpkg/TeXLive/TLPDB.pm +++ b/Master/tlpkg/TeXLive/TLPDB.pm @@ -242,7 +242,6 @@ installers. This function will probably go away. sub generate_listfiles { my ($self,$destdir) = @_; - die "NEEDS TO BE REWRITTEN USING TLConfig!!!\n"; if (not(defined($destdir))) { $destdir = TeXLive::TLPDB->listdir; } @@ -275,13 +274,15 @@ sub _generate_listfile { &mkpath("$destdir") if (! -d "$destdir"); my (@lop, @lot); foreach my $d ($tlp->depends) { - die "NEED TO BE ADJUSTED\n"; - if ($d =~ m/^(Package|Documentation|TLCore)\/(.*)$/) { - push @lop, $2; - } elsif ($d =~ m/^Collection\/(.*)$/) { - push @lot, $1; + my $subtlp = $self->get_package($d); + if (defined($subtlp)) { + if ($subtlp->is_meta_package) { + push @lot, $d; + } else { + push @lop, $d; + } } else { - warn "strange depends line: $d\n"; + warn "Strange: $tlp->name depends on $d, but this package does not exists!\n"; } } open(TMP, ">$destdir/$listname") or die "Cannot open $destdir/$listname!"; @@ -322,8 +323,13 @@ sub _generate_listfile { foreach my $c (@lot) { my $coll = $self->get_package($c); foreach my $d ($coll->depends) { - if ($d =~ m/^(Package|Documentation|TLCore)\/(.*)$/) { - TeXLive::TLUtils::push_uniq(\@collpkg,$2); + my $subtlp = $self->get_package($d); + if (defined($subtlp)) { + if (!($subtlp->is_meta_package)) { + TeXLive::TLUtils::push_uniq(\@collpkg,$d); + } + } else { + warn "Strange: $coll->name depends on $d, but this does not exists!\n"; } } } diff --git a/Master/tlpkg/TeXLive/TLPOBJ.pm b/Master/tlpkg/TeXLive/TLPOBJ.pm index e3cde9b0acf..b8e81eaf11a 100644 --- a/Master/tlpkg/TeXLive/TLPOBJ.pm +++ b/Master/tlpkg/TeXLive/TLPOBJ.pm @@ -6,7 +6,7 @@ package TeXLive::TLPOBJ; -use TeXLive::TLConfig qw($DefaultCategory $CategoriesRegexp); +use TeXLive::TLConfig qw($DefaultCategory $CategoriesRegexp $MetaCategoriesRegexp); use TeXLive::TLUtils; use File::Path; use Cwd; @@ -86,7 +86,7 @@ sub from_fh { ($lastcmd eq "depend") ) { $line =~ s/^ /${lastcmd}continued /; } else { - die("Continuation of $lastcmd not allowed, please fix tlpobj!\n"); + die("Continuation of $lastcmd not allowed, please fix tlpobj: line = $line!\n"); } } if ($line =~ /^name\s*([-\w]+)$/) { @@ -536,6 +536,14 @@ sub update_from_catalogue { } } +sub is_meta_package { + my $self = shift; + if ($self->category =~ /^$MetaCategoriesRegexp$/) { + return 1; + } + return 0; +} + # Helpers. # @@ -936,6 +944,11 @@ If arguments are given, they are assumed to be architecture names, and it returns the above plus the sum of sizes of C<binsize> for those architectures. +=item C<is_meta_package> + +Returns true if the package is a meta package as defined in TLConfig +(Currently Collection and Scheme). + =item C<{add,remove}_{src,run,doc}files(@files)> adds or removes files to the respective list of files. @@ -956,7 +969,7 @@ returns a list of all files of all types. =head1 SEE ALSO -The modules L<TeXLive::TLUtils>, L<TeXLive::TLPSRC>, +The modules L<TeXLive::TLConfig>, L<TeXLive::TLUtils>, L<TeXLive::TLPSRC>, L<TeXLive::TLPDB>, L<TeXLive::TLTREE>, L<TeXLive::TeXCatalogue>. =head1 AUTHORS AND COPYRIGHT diff --git a/Master/tlpkg/TeXLive/TeXCatalogue.pm b/Master/tlpkg/TeXLive/TeXCatalogue.pm index 4819dd46b5d..4fc64058d88 100644 --- a/Master/tlpkg/TeXLive/TeXCatalogue.pm +++ b/Master/tlpkg/TeXLive/TeXCatalogue.pm @@ -51,13 +51,17 @@ sub initialize { $self->{'entry'}{'date'} = $parser->findvalue('/entry/@datestamp'); $self->{'entry'}{'modder'} = $parser->findvalue('/entry/@modifier'); $self->{'name'} = $parser->findvalue("/entry/name"); - $self->{'caption'} = $parser->findvalue("/entry/caption"); + $self->{'caption'} = beautify($parser->findvalue("/entry/caption")); $self->{'description'} = beautify($parser->findvalue("/entry/description")); $self->{'license'} = $parser->findvalue('/entry/license/@type'); $self->{'version'} = $parser->findvalue('/entry/version/@number'); $self->{'ctan'} = $parser->findvalue('/entry/ctan/@path'); - $self->{'texlive'} = $parser->findvalue('/entry/texlive/@location'); - $self->{'miktex'} = $parser->findvalue('/entry/miktex/@location'); + if ($parser->findvalue('/entry/texlive/@location') ne "") { + $self->{'texlive'} = $parser->findvalue('/entry/texlive/@location'); + } + if ($parser->findvalue('/entry/miktex/@location') ne "") { + $self->{'miktex'} = $parser->findvalue('/entry/miktex/@location'); + } # parse the documentation entries my $docset = $parser->find('/entry/documentation'); foreach my $node ($docset->get_nodelist) { |