From 916b4893ed39a39d316a32c96e5c6110b8e84e41 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Sat, 28 Jun 2008 23:05:44 +0000 Subject: restart feature of installer git-svn-id: svn://tug.org/texlive/trunk@9078 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/bin/tl-update-containers | 35 ++++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) (limited to 'Master/tlpkg/bin/tl-update-containers') 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 -- cgit v1.2.3