summaryrefslogtreecommitdiff
path: root/Master/tlpkg/bin
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2008-04-17 07:10:38 +0000
committerNorbert Preining <preining@logic.at>2008-04-17 07:10:38 +0000
commit4138cce94dafad3e60fc79ca2452ebc3dc98ab7f (patch)
tree985673cd59e9611b82f3e25d57369d4d28eabc74 /Master/tlpkg/bin
parent6814ab14be67c0030628aa4c274bb2c26c144440 (diff)
remove any trace of texlive.pkgver
git-svn-id: svn://tug.org/texlive/trunk@7462 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/bin')
-rwxr-xr-xMaster/tlpkg/bin/check-file-coverage2
-rwxr-xr-xMaster/tlpkg/bin/tl-update-containers34
-rwxr-xr-xMaster/tlpkg/bin/tlpdb2container7
-rwxr-xr-xMaster/tlpkg/bin/tlpdb2pkgver83
4 files changed, 16 insertions, 110 deletions
diff --git a/Master/tlpkg/bin/check-file-coverage b/Master/tlpkg/bin/check-file-coverage
index c3f606851ba..75026b9e064 100755
--- a/Master/tlpkg/bin/check-file-coverage
+++ b/Master/tlpkg/bin/check-file-coverage
@@ -35,7 +35,7 @@ my @IgnorePatterns = qw!
tlpkg/tlpsrc/
tlpkg/bin
tlpkg/lib/ tlpkg/tests/ tlpkg/etc/
- tlpkg/texlive.pkgver tlpkg/texlive.tlpdb
+ tlpkg/texlive.tlpdb
!;
chomp (my $opt_master = `cd $::mydir/../.. && pwd`);
diff --git a/Master/tlpkg/bin/tl-update-containers b/Master/tlpkg/bin/tl-update-containers
index f886c226f89..99bf1c30f43 100755
--- a/Master/tlpkg/bin/tl-update-containers
+++ b/Master/tlpkg/bin/tl-update-containers
@@ -25,12 +25,12 @@ use File::Path;
our $mydir;
my $opt_debug = 0;
-my $opt_containerdir = "./tlpkg";
+my $opt_location = ".";
my $opt_relative = 0;
my $help = 0;
GetOptions(
- "containerdir=s" => \$opt_containerdir,
+ "location=s" => \$opt_location,
"debug!" => \$opt_debug,
"help|?" => \$help) or pod2usage(1);
@@ -65,24 +65,21 @@ sub main
tllog($::LOG_DEBUG, "format=$type srcsplit=$srcsplit docsplit=$docsplit\n");
- # read in the old texlive.pkgver and save the revisions.
- # If it's not present, we'll update everything, i.e., populating a
- # directory for the first time.
+ my $nettlpdb = TeXLive::TLPDB->new(root => $opt_location);
+ if (!defined($nettlpdb)) {
+ die "Cannot init tlpdb from $opt_location ...";
+ }
my %archiverevs;
- local *TMP;
- if (open(TMP, "<$opt_containerdir/texlive.pkgver")) {
- while (<TMP>) {
- my ($pkg,$rev) = split;
- $archiverevs{$pkg} = $rev;
- }
- close(TMP);
+ foreach my $pkg ($nettlpdb->list_packages()) {
+ $archiverevs{$pkg} = $nettlpdb->get_package($pkg)->revision();
}
# collect packages to be updated.
my %count;
$count{"new"} = $count{"removed"} = $count{"updated"} = $count{"unchanged"}
= 0;
-
+
+ my $opt_containerdir = "$opt_location/$TeXLive::TLConfig::NetArchive";
my @todopacks = ();
for my $pkg (@packs) {
next if ($pkg eq "00texlive.config");
@@ -115,7 +112,7 @@ sub main
} else {
die "This shouldn't happen! The revision of $pkg in texlive.tlpdb"
. "($newrev) is OLDER than the one in"
- . "$opt_containerdir/texlive.pkgver ($oldrev), goodbye";
+ . "$opt_location/tlpkg/texlive.tlpdb ($oldrev), goodbye";
}
}
@@ -146,16 +143,15 @@ sub main
if (@todopacks) {
# we updated something
- print "$0: updating $opt_containerdir/texlive.pkgver ...\n";
- my $PKGVER = ">$opt_containerdir/texlive.pkgver";
- open (TMP, $PKGVER) || die "open($PKGVER) failed: $!";
- $tlpdb->generate_packagelist (\*TMP);
- close (TMP) || warn "close($PKGVER) failed: $!";
print "$0: $count{new} new, $count{removed} removed, "
. "$count{updated} updated, $count{unchanged} unchanged.\n";
+ # Finally we copy the source tlpdb over to the destination tlpdb
+ $tlpdb->root($opt_location);
+ $tlpdb->save;
} else {
print "$0: nothing to be done.\n";
}
+
}
diff --git a/Master/tlpkg/bin/tlpdb2container b/Master/tlpkg/bin/tlpdb2container
index d346da7690e..a612b8bfe6b 100755
--- a/Master/tlpkg/bin/tlpdb2container
+++ b/Master/tlpkg/bin/tlpdb2container
@@ -102,13 +102,6 @@ sub main
$obj->make_container($type,$Master,$opt_outputdir,$pkg,$opt_relative);
$src_count++;
}
- # if $opt_all then we also add a texlive.pkgver file in the output dir!
- if ($opt_all) {
- warn "$0: wrote $src_count containers to $opt_outputdir.\n";
- open(TMP,">$opt_outputdir/texlive.pkgver") or die "Cannot create $opt_outputdir/texlive.pkgver";
- $tlpdb->generate_packagelist(\*TMP);
- close(TMP);
- }
}
diff --git a/Master/tlpkg/bin/tlpdb2pkgver b/Master/tlpkg/bin/tlpdb2pkgver
deleted file mode 100755
index b52ad9097d4..00000000000
--- a/Master/tlpkg/bin/tlpdb2pkgver
+++ /dev/null
@@ -1,83 +0,0 @@
-#!/usr/bin/env perl
-# $Id$
-# Find the minimal package list (tlpver) of the current installation.
-# Copyright 2007, 2008 Norbert Preining
-#
-# This file is licensed under the GNU General Public License version 2
-# or any later version.
-
-BEGIN {
- $^W = 1;
- ($mydir = $0) =~ s,/[^/]*$,,;
- unshift (@INC, "$mydir/..");
-}
-
-use strict;
-
-use TeXLive::TLPDB;
-use TeXLive::TLUtils qw(dirname tllog);
-use Getopt::Long;
-use Pod::Usage;
-
-my $opt_debug = 0;
-my $help = 0;
-
-GetOptions("debug!", 'help|?' => \$help ) or pod2usage(1);
-
-pod2usage(-exitstatus => 0, -verbose => 2) if $help;
-
-if ($opt_debug) {
- $::LOGLEVELFILE = $::LOG_DDDEBUG;
- $::LOGLEVELTERMINAL = $::LOG_DDDEBUG;
-}
-
-die "$0: missing tlpdb argument; try --help if you need it.\n" if ($#ARGV<0);
-
-die "cannot read tlpdb file $ARGV[0]." if (! -r "$ARGV[0]");
-# backwards compatibility
-my $root;
-if ($ARGV[0] =~ m,texlive.tlpdb$,) {
- $root = dirname(dirname($ARGV[0]));
-} else {
- $root = $ARGV[0];
-}
-
-my $tldb = new TeXLive::TLPDB ("root" => $root);
-
-$tldb->generate_packagelist;
-
-__END__
-
-=head1 NAME
-
-tlpdb2pkgver - generate a list of TeX Live packages with revisions
-
-=head1 SYNOPSIS
-
-tlpdb2pkgver [OPTION]... /path/to/root/of/installation/
-
-=head1 OPTIONS
-
-The standard options C<-help> and C<-debug> are accepted.
-See the tlpfiles documentation for details.
-
-=head1 DESCRIPTION
-
-B<tlpdb2pkgver> generates the short list of package names with revisions
-(C<tlpdb.pkgver>) from the TeX Live installation present at the location
-specified on the command line. Output is to stdout.
-
-=head1 AUTHORS AND COPYRIGHT
-
-This script and its documentation were written for the TeX Live
-distribution (L<http://tug.org/texlive>) and both are licensed under the
-GNU General Public License Version 2 or later.
-
-=cut
-
-### Local Variables:
-### perl-indent-level: 2
-### tab-width: 2
-### indent-tabs-mode: nil
-### End:
-# vim:set tabstop=2: #