diff options
author | Norbert Preining <preining@logic.at> | 2007-06-16 17:00:43 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2007-06-16 17:00:43 +0000 |
commit | b8f64474ccbd68cee3978368997d95a440964cea (patch) | |
tree | 8ae654527f6ac1b9ca421298548f2f7abe216ebe | |
parent | 5ae97b6febf90a6bb15d60c3b234385a87e909b2 (diff) |
remove new-infra dir
git-svn-id: svn://tug.org/texlive/trunk@4446 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | new-infra/Shell-API.txt | 37 | ||||
-rw-r--r-- | new-infra/TeXLiveInfra.sh | 264 | ||||
-rw-r--r-- | new-infra/create-package-list.pl | 23 | ||||
-rw-r--r-- | new-infra/create-tldb.pl | 33 | ||||
-rw-r--r-- | new-infra/create-tlp.pl | 23 | ||||
-rw-r--r-- | new-infra/create_tlp_simple.pl | 30 | ||||
-rw-r--r-- | new-infra/tlp2tldb.pl | 82 | ||||
-rw-r--r-- | new-infra/tlsrc2tlp.pl | 114 | ||||
-rw-r--r-- | new-infra/updater.pl | 80 |
9 files changed, 0 insertions, 686 deletions
diff --git a/new-infra/Shell-API.txt b/new-infra/Shell-API.txt deleted file mode 100644 index b4bae1b6448..00000000000 --- a/new-infra/Shell-API.txt +++ /dev/null @@ -1,37 +0,0 @@ -API for Shell interface for new infra -===================================== - -bash will be used, POSIX maybe later - - -Module TLP ----------- - -Read/Write functions (with argument set, without arg read) - - tlp_get_{name,category,revision,shortdesc,longdesc,catalogue} $tlpfile - gets the respective field of the TLP - tlp_get_{src,doc,run}files $tlpfile - gets the list of {src,doc,run}files - tlp_get_{src,doc,run}size $tlpfile - gets the of the respective group of files - tlp_get_available_archs $tlpfile - returns the list of archs present in $tlpfile for binfiles - tlp_get_binfiles $tlpfle $arch - gets the list of binfiles for $arch - tlp_get_binsize $tlpfile $arch - gets the size of binfiles for $arch - tlp_get_{depends,executes} $tlpfile - returns a list depends/executes - - -Module TLDB ------------ - all function under TLP can be used with a tldb_ prefix: - tldb_tlp_get_{name,category,revision,...} $tldbfile "packagename" - gets the respective field of the TLP - - tldb_list_installed_packages $tldbfile - - what else do we need? - diff --git a/new-infra/TeXLiveInfra.sh b/new-infra/TeXLiveInfra.sh deleted file mode 100644 index e4a6500dd64..00000000000 --- a/new-infra/TeXLiveInfra.sh +++ /dev/null @@ -1,264 +0,0 @@ -# -# TeXLiveInfra.sh -# shell library for the access to TLDB and TLP -# -# Copyright 2007 Norbert Preining -# -# This file is licensed under the GNU General Public Licence version 2 -# or any later version -# - -die() { - echo $* - exit 1 -} - -test_tlp() { - tlpfile="$1" - if [ ! -r "$tlpfile" ] ; then - die "tlp file not readable: $tlpfile" - fi -} - -# we read the whole tlp again and again -# if we could use some multi-line grepping this could be speed up -# but I guess we would need perl regexp grepping -# BETTER: use an awk program for this, but I am not able to write -# such an awk program. And do we have it available everywhere? -_tlp_get_multi() { - entry="$1" - tlpfile="$2" - arch="$3" - test_tlp "$tlpfile" - ( SAVEDIFS=$IFS ; IFS= ; cat "$tlpfile" | __tlp_get_multi "$entry" "$arch" ) -} -__tlp_get_multi() { - entry="$1" - arch="$2" - if [ "$arch" = "" ] ; then - pat="$entry*" - else - pat="$entry*arch=$arch*" - fi - reading_multi=0 - while read line ; do - case "$line" in - $pat) - reading_multi=1 - ;; - \ *) - if [ $reading_multi = 1 ] ; then - ( IFS=$SAVEDIFS ; echo $line ) - fi - ;; - *) - if [ $reading_multi = 1 ] ; then - # we already have read the interesting part, return now - return - fi - ;; - esac - done -} - -_tlp_get_multi_simple() { - entry="$1" - tlpfile="$2" - test_tlp "$tlpfile" - grep "^$entry" "$tlpfile" | sed -e "s@^$entry[ \t]*@@" -} - -_tlp_get_simple() { - entry="$1" - tlpfile="$2" - field="$3" - prefix="$4" - test_tlp "$tlpfile" - cat "$tlpfile" | __tlp_get_simple $entry $field $prefix -} - -__tlp_get_simple() { - entry="$1" - field="$2" - prefix="$3" - if [ "$field" = "" ] ; then - grep -m 1 "^$entry " | sed -e "s@^$entry[ \t]*@@" | sed -e "s@^$prefix@@" - else - grep -m 1 "^$entry " | awk "{print\$${field}}" | sed -e "s@^$prefix@@" - fi -} - -tlp_get_name() -{ - _tlp_get_simple name "$1" -} -tlp_get_revision() -{ - _tlp_get_simple revision "$1" -} -tlp_get_category () -{ - _tlp_get_simple category "$1" -} -tlp_get_shortdesc () -{ - _tlp_get_simple shortdesc "$1" -} -tlp_get_catalogue () -{ - _tlp_get_simple catalogue "$1" -} -tlp_get_longdesc () -{ - _tlp_get_multi longdesc "$1" -} -tlp_get_depends () -{ - _tlp_get_multi_simple depend "$1" -} -tlp_get_executes () -{ - _tlp_get_multi_simple execute "$1" -} -tlp_get_srcfiles () -{ - _tlp_get_multi srcfiles "$1" -} -tlp_get_docfiles () { - _tlp_get_multi docfiles "$1" -} -tlp_get_runfiles () { - _tlp_get_multi runfiles "$1" -} -tlp_get_srcsize () { - _tlp_get_simple srcfiles "$1" 2 "size=" -} -tlp_get_docsize () -{ - _tlp_get_simple docfiles "$1" 2 "size=" -} -tlp_get_runsize () -{ - _tlp_get_simple runfiles "$1" 2 "size=" -} - -tlp_get_binsize () -{ - tlpfile="$1" - arch="$2" - _tlp_get_simple "binfiles[ \t]*arch=$arch" "$1" 3 "size=" -} -tlp_get_binfiles () -{ - _tlp_get_multi binfile "$1" "$2" -} - -tlp_get_available_arch () -{ - test_tlp "$tlpfile" - grep 'binfiles[ \t]*arch=' "$tlpfile" | awk '{print$2}' | sed -e 's/arch=//' -} - -test_tldb() { - tldbfile="$1" - if [ ! -r "$tldbfile" ] ; then - die "tldb file not readable: $tldbfile" - fi -} - -_tldb_tlp_get_multi() -{ - tldb="$1" - tlp="$2" - entry="$3" - arch="$4" - test_tldb "$tldb" - foundpackage=0 - ( SAVEDIFS=$IFS ; IFS= ; while read line ; do - case "$line" in - name\ $tlp*) - foundpackage=1 - __tlp_get_multi $entry $arch - ;; - *) - if [ $foundpackage = 1 ] ; then - return - fi - ;; - esac - done ) <$tldb -} -_tldb_tlp_get_simple() -{ - tldb="$1" - tlp="$2" - entry="$3" - field="$4" - prefix="$5" - test_tldb "$tldb" - foundpackage=0 - ( SAVEDIFS=$IFS ; IFS= ; while read line ; do - case "$line" in - name\ $tlp*) - foundpackage=1 - __tlp_get_simple $entry $field $prefix - ;; - *) - if [ $foundpackage = 1 ] ; then - return - fi - ;; - esac - done ) <$tldb -} - - -tldb_tlp_get_revision() -{ - _tldb_tlp_get_simple "$1" "$2" revision "$3" "$4" -} -tldb_tlp_get_category () -{ - _tldb_tlp_get_simple "$1" "$2" category "$3" "$4" -} -tldb_tlp_get_shortdesc () -{ - _tldb_tlp_get_simple "$1" "$2" shortdesc "$3" "$4" -} -tldb_tlp_get_catalogue () -{ - _tldb_tlp_get_simple "$1" "$2" catalogue "$3" "$4" -} -tldb_tlp_get_longdesc () -{ - _tldb_tlp_get_multi "$1" "$2" longdesc "$3" -} -tldb_tlp_get_srcfiles () -{ - _tldb_tlp_get_multi "$1" "$2" srcfiles "$3" -} -tldb_tlp_get_docfiles () { - _tldb_tlp_get_multi "$1" "$2" docfiles "$3" -} -tldb_tlp_get_runfiles () { - _tldb_tlp_get_multi "$1" "$2" runfiles "$3" -} -tldb_tlp_get_binfiles () -{ - _tldb_tlp_get_multi "$1" "$2" binfile "$3" -} - -tldb_get_installed_packages () -{ - tldb="$1" - test_tldb "$tldb" - grep ^name "$tldb" | awk '{print$2}' -} - - -### Local Variables: -### perl-indent-level: 4 -### tab-width: 4 -### indent-tabs-mode: t -### End: -# vim:set tabstop=4: # diff --git a/new-infra/create-package-list.pl b/new-infra/create-package-list.pl deleted file mode 100644 index 1f2b4906b39..00000000000 --- a/new-infra/create-package-list.pl +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env perl -w -# -# create-package-list.pl -# Create thepackage list of the current installation -# Copyright 2007 Norbert Preining -# -# This file is licensed under the GNU General Public Licence version 2 -# or any later version - -use strict; - -use TLDB; -use Data::Dumper; - -my $TLRoot = "."; -my $tldblocation = "$TLRoot/local.tldb"; - -my $tldb = TLDB->new; -$tldb->from_file($tldblocation); - -$tldb->generate_packagelist; - - diff --git a/new-infra/create-tldb.pl b/new-infra/create-tldb.pl deleted file mode 100644 index 0a068e835bb..00000000000 --- a/new-infra/create-tldb.pl +++ /dev/null @@ -1,33 +0,0 @@ -use TLSRC; -use TLP; -use TLDB; -use TLTREE; -# create tltree from everything under new-infra -my $tltree = TLTREE->new( 'svnroot' => "/src/TeX/texlive-svn/new-infra"); -# init it from svn status -v -$tltree->init_from_svn; - -# create an empty TLDB; -my $tldb = TLDB->new; - -# create tlps for all tlsrc/*.tlsrc -foreach my $f (<tlsrc/*.tlsrc>) { - my $tlsrc = new TLSRC; - # read the specification from a the .tlsrc file - $tlsrc->from_file($f); - # create the tlp, for this we need the $tltree - my $tlp = $tlsrc->make_tlp($tltree); - # add the $tlp to the TLDB - $tldb->add_tlp($tlp); - # in addition, write it out to a file - my $name = $tlp->name; - open(FOO,">tlp/$name.tlp"); - $tlp->writeout(\*FOO); - close(FOO); -} - -# finish by writing out the TLDB -open(TMP,">test.tldb"); -$tldb->writeout(\*TMP); -close(TMP); - diff --git a/new-infra/create-tlp.pl b/new-infra/create-tlp.pl deleted file mode 100644 index 673fba5f568..00000000000 --- a/new-infra/create-tlp.pl +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env perl -w - -use strict; - -use TLSRC; -use TLP; -use TLTREE; -use Data::Dumper; - -my $tltree = TLTREE->new( 'svnroot' => "/src/TeX/texlive-svn/new-infra" ); -$tltree->init_from_svn; - -foreach my $f (@ARGV) { - my $tlsrc = new TLSRC; - $tlsrc->from_file($f); - my $tlp = $tlsrc->make_tlp($tltree); - my $name = $tlp->name; - open(FOO,">tlp/$name.tlp"); - $tlp->writeout(\*FOO); - close(FOO); -} - - diff --git a/new-infra/create_tlp_simple.pl b/new-infra/create_tlp_simple.pl deleted file mode 100644 index e8911e190ae..00000000000 --- a/new-infra/create_tlp_simple.pl +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env perl -w - -use strict; -use lib '../new-infra'; - -use TLSRC; -use TLP; -use TLTREE; -use Data::Dumper; - -#our $opt_debug=1; - -my $tltree = TLTREE->new( 'svnroot' => "/src/TeX/texlive-svn/Master" ); -print "Initializing tltree start: ", `date`; -$tltree->init_from_statusfile("/src/TeX/texlive-svn/Master/svn.status"); -print "Initializing tltree stop: ", `date`; - -foreach my $f (@ARGV) { - my $tlsrc = new TLSRC; - $tlsrc->from_file($f); - print "WORKING ON $f\n"; - my $tlp = $tlsrc->make_tlp($tltree); - my $name = $tlp->name; - open(FOO,">tlp/$name.tlp"); - $tlp->writeout_simple(\*FOO); - close(FOO); -} - - -print "End of operation: ", `date`; diff --git a/new-infra/tlp2tldb.pl b/new-infra/tlp2tldb.pl deleted file mode 100644 index 0d70aff7423..00000000000 --- a/new-infra/tlp2tldb.pl +++ /dev/null @@ -1,82 +0,0 @@ -#!/usr/bin/env perl -w -# -# tlp2tldb.pl -# convert a set of tlp files (given as arguments) into a tldb -# Copyright 2007 Norbert Preining -# -# This file is licensed under the GNU General Public Licence version 2 -# or any later version -# - -BEGIN { - ($mydir = $0) =~ s,/[^/]*$,,; - unshift (@INC, $mydir); -} - -use strict; - -use TLP; -use TLDB; -use Getopt::Long; -use Pod::Usage; -use File::Path; - -our $opt_debug = 0; -my $man = 0; -my $help = 0; - -GetOptions("debug!", 'help|?' => \$help, man => \$man) or pod2usage(2); - -pod2usage(1) if $help; -pod2usage(-exitstatus => 0, -verbose => 2) if $man; - -my $tldb = TLDB->new; -foreach my $f (@ARGV) { - my $tlp = new TLP; - $tlp->from_file($f); - $tldb->add_tlp($tlp); -} -$tldb->writeout; - - -__END__ - -=head1 NAME - -tlp2tldb - Converting tlp files into a tldb file - -=head1 SYNOPSIS - -tlp2tldb [options] [tlsrcfiles ...] - - Options: - -help brief help message - -man full documentation - -debug get debug messages from TL* modules - - -=head1 OPTIONS - -=over 8 - -=item B<-help> - -Print a brief help message and exits. - -=item B<-man> - -Prints the manual page and exits. - -=item B<-debug> - -Give debug messages from the TeX Live modules - -=back - -=head1 DESCRIPTION - -B<tlp2tldb> converts TeX Live Package (tlp) files into TeX Live Database -(tldb). - -=cut - diff --git a/new-infra/tlsrc2tlp.pl b/new-infra/tlsrc2tlp.pl deleted file mode 100644 index 2c888af4e68..00000000000 --- a/new-infra/tlsrc2tlp.pl +++ /dev/null @@ -1,114 +0,0 @@ -#!/usr/bin/env perl -w -# -# tlsrc2tlp.pl -# convert a set of tlsrc files (given as arguments) into tlp -# Copyright 2007 Norbert Preining -# -# This file is licensed under the GNU General Public Licence version 2 -# or any later version -# - -BEGIN { - ($mydir = $0) =~ s,/[^/]*$,,; - unshift (@INC, $mydir); -} - -use strict; - -use TLSRC; -use TLP; -use TLTREE; -use Getopt::Long; -use Pod::Usage; -use File::Path; - - -my $opt_master = "/src/TeX/texlive-svn/Master"; -my $opt_outputdir = "./tlp"; -our $opt_debug = 0; -my $man = 0; -my $help = 0; - -GetOptions("debug!", # debug mode - "master=s" => \$opt_master, # location of the tree - "outputdir=s" => \$opt_outputdir, - 'help|?' => \$help, man => \$man - ) or pod2usage(2); - -pod2usage(1) if $help; -pod2usage(-exitstatus => 0, -verbose => 2) if $man; - -if (! -d "$opt_master") { - die "Master $opt_master does not exists!"; -} - -if (! -d "$opt_outputdir") { - mkpath("$opt_outputdir") or die "Cannot mkdir $opt_outputdir!"; -} - -my $tltree = TLTREE->new( 'svnroot' => "$opt_master" ); -$tltree->init_from_svn; - -foreach my $f (@ARGV) { - my $tlsrc = new TLSRC; - $tlsrc->from_file($f); - my $tlp = $tlsrc->make_tlp($tltree); - my $name = $tlp->name; - open(FOO,">$opt_outputdir/$name.tlp") or die "Cannot create $opt_outputdir/$name.tlp!"; - $tlp->writeout(\*FOO); - close(FOO); -} - - -__END__ - -=head1 NAME - -tlsrc2tlp - Converting tlsrc files into tlp files - -=head1 SYNOPSIS - -tlsrc2tlp [options] [tlsrcfiles ...] - - Options: - -help brief help message - -man full documentation - -master=s set Master of TeX Live tree - -outputdir=s specify the directory where tlp files are created - -debug get debug messages from TL* modules - -=head1 OPTIONS - -=over 8 - -=item B<-help> - -Print a brief help message and exits. - -=item B<-man> - -Prints the manual page and exits. - -=item B<-master> - -The location given by B<-master> must point to a valid svn repository -of TeX Live Master direcory. Defaults to /src/TeX/texlive-svn/Master - -=item B<-outputdir> - -Specifies the location where tlp files are created. Defaults to ./tlp - -=item B<-debug> - -Give debug messages from the TeX Live modules - -=back - -=head1 DESCRIPTION - -B<tlsrc2tlp> converts TeX Live Source (tlsrc) files into TeX Live Package -files (tlp). - -=cut - - diff --git a/new-infra/updater.pl b/new-infra/updater.pl deleted file mode 100644 index 1f161ec619b..00000000000 --- a/new-infra/updater.pl +++ /dev/null @@ -1,80 +0,0 @@ -#!/usr/bin/env perl -w -# -# updater.pl -# test implementation of an update program -# Copyright 2007 Norbert Preining -# -# This file is licensed under the GNU General Public Licence version 2 -# or any later version - -use strict; - -use TLP; -use TLDB; - -my $TEXLIVEROOT = "."; -my $tldblocation = "$TEXLIVEROOT/local.tldb"; - -# setting the location at new time also initializes the tldb! -my $tldb = TLDB->new ( location => $tldblocation ); - -# read package/revision list from stdin -# format: package revision -# later on this should be read from the tug.org server to get the -# information which packages/revisions are available on the net. - -my %netavailable; -while (<>) { - chomp; - next if m/^\s*#/; - if (m/^(\w+)\s+(\d+)$/) { - $netavailable{$1} = $2; - } else { - die "Wrong format of package list: $_!"; - } -} - -foreach (keys %netavailable) { - my $localrev = $tldb->package_revision($_); - if ($localrev) { - # the package is installed - if ($localrev < $netavailable{$_}) { - update_one_package($_,$localrev,$netavailable{$_}); - } - } -} - - -sub update_one_package { - my ($pkgname,$localrev,$netrev) = @_; - print "update local/$localrev -> net/$netrev\n"; - return 1; - # ideas on implementation - # - make temporary directory - # - cd there - # - get package to be updated - # - unpack it there - # - check the included tlp/$package.tlp for NOT satisfied dependencies - my $newtlp = TLP->new; - $newtlp->from_file("tlp/$pkgname.tlp"); - my @deps = $newtlp->depends; - # - if there are unsatisfied deps - # . for each unsatisfied dep do - # update_one_package (in the same dir should work) - # - collect all actions to be carried out from the tlps - # - cp -a * TEXLIVEROOT (this installs all updated packages) - # - update mktexlsr - # - call actions - # - update tldb - $tldb->add_tlp($newtlp); - $tldb->save; - # - remove temporary directory -} - - -### Local Variables: -### perl-indent-level: 4 -### tab-width: 4 -### indent-tabs-mode: t -### End: -# vim:set tabstop=4: # |