summaryrefslogtreecommitdiff
path: root/Master/tlpkg/bin/tl-update-containers
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2008-06-28 23:05:44 +0000
committerNorbert Preining <preining@logic.at>2008-06-28 23:05:44 +0000
commit916b4893ed39a39d316a32c96e5c6110b8e84e41 (patch)
treec2e94740939774092347db0b52aeb32471276757 /Master/tlpkg/bin/tl-update-containers
parent7555dd14aa0972fe77a9613d8f9dbd8f552dd5fd (diff)
restart feature of installer
git-svn-id: svn://tug.org/texlive/trunk@9078 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/bin/tl-update-containers')
-rwxr-xr-xMaster/tlpkg/bin/tl-update-containers35
1 files changed, 26 insertions, 9 deletions
diff --git a/Master/tlpkg/bin/tl-update-containers b/Master/tlpkg/bin/tl-update-containers
index 770fa5fbb3a..2b447b02018 100755
--- a/Master/tlpkg/bin/tl-update-containers
+++ b/Master/tlpkg/bin/tl-update-containers
@@ -68,10 +68,13 @@ sub main
my @removepacks = ();
my $opt_containerdir = "$opt_location/$TeXLive::TLConfig::NetArchive";
my %count;
+ my $nettlpdb;
if ($opt_recreate) {
@todopacks = $tlpdb->list_packages();
+ $nettlpdb = $tlpdb->copy;
+ $nettlpdb->root($opt_location);
} else {
- my $nettlpdb = TeXLive::TLPDB->new(root => $opt_location);
+ $nettlpdb = TeXLive::TLPDB->new(root => $opt_location);
if (!defined($nettlpdb)) {
die "Cannot init tlpdb from $opt_location ...";
}
@@ -148,20 +151,35 @@ sub main
my $objsrc = $obj->srcfiles_package;
$objcopy->clear_srcfiles;
if ($objsrc) {
- $objsrc->make_container($type, $Master, $opt_containerdir,
- "$pkg.source", $opt_relative);
+ my $s = $objsrc->make_container($type, $Master, $opt_containerdir,
+ "$pkg.source", $opt_relative);
+ if ($s > 0) {
+ # something was created
+ # important, we have to add it to the original $obj
+ $obj->srccontainersize($s);
+ }
}
}
if ($docsplit) {
my $objdoc = $obj->docfiles_package;
$objcopy->clear_docfiles;
if ($objdoc) {
- $objdoc->make_container($type, $Master, $opt_containerdir,
- "$pkg.doc", $opt_relative);
+ my $s = $objdoc->make_container($type, $Master, $opt_containerdir,
+ "$pkg.doc", $opt_relative);
+ if ($s > 0) {
+ # something was created
+ $obj->doccontainersize($s);
+ }
}
}
- $objcopy->make_container($type, $Master, $opt_containerdir,
- $pkg, $opt_relative);
+ my $s = $objcopy->make_container($type, $Master, $opt_containerdir,
+ $pkg, $opt_relative);
+ if ($s > 0) {
+ $obj->containersize($s);
+ }
+ # add the updated (or new) TLPOBJ to NET TLPDB
+ # that way the other container sizes are not destroyed
+ $nettlpdb->add_tlpobj($obj);
}
# next we remove those containers which have been gone!
@@ -181,8 +199,7 @@ sub main
# STRANGE: It seems that calling -recreate did somehow not safe the
# docfiles into the texlive.tlpdb, no idea why. So update should now
# do that
- $tlpdb->root($opt_location);
- $tlpdb->save;
+ $nettlpdb->save;
system("lzma --force -k -z $opt_location/tlpkg/texlive.tlpdb");
#
# do a last check that all the containers are actually present