summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/tlpkg/etc/dev.usermode-tlmgr.patch162
1 files changed, 144 insertions, 18 deletions
diff --git a/Master/tlpkg/etc/dev.usermode-tlmgr.patch b/Master/tlpkg/etc/dev.usermode-tlmgr.patch
index 3d3aa4f7519..35dc604c583 100644
--- a/Master/tlpkg/etc/dev.usermode-tlmgr.patch
+++ b/Master/tlpkg/etc/dev.usermode-tlmgr.patch
@@ -18,6 +18,32 @@ Index: tlpkg/TeXLive/TLConfig.pm
);
+Index: tlpkg/TeXLive/TLPOBJ.pm
+===================================================================
+--- tlpkg/TeXLive/TLPOBJ.pm (revision 14488)
++++ tlpkg/TeXLive/TLPOBJ.pm (working copy)
+@@ -448,6 +448,21 @@
+ sub cancel_reloc_prefix {
+ my $self = shift;
+ my @docfiles = $self->docfiles;
++ for (@docfiles) { s:^$RelocPrefix/::; }
++ $self->docfiles(@docfiles);
++ my @runfiles = $self->runfiles;
++ for (@runfiles) { s:^$RelocPrefix/::; }
++ $self->runfiles(@runfiles);
++ my @srcfiles = $self->srcfiles;
++ for (@srcfiles) { s:^$RelocPrefix/::; }
++ $self->srcfiles(@srcfiles);
++ # if there are bin files they have definitely NOT the
++ # texmf-dist prefix, so we cannot cancel it anyway
++}
++
++sub replace_reloc_prefix {
++ my $self = shift;
++ my @docfiles = $self->docfiles;
+ for (@docfiles) { s:^$RelocPrefix/:$RelocTree/:; }
+ $self->docfiles(@docfiles);
+ my @runfiles = $self->runfiles;
Index: tlpkg/TeXLive/TLMedia.pm
===================================================================
--- tlpkg/TeXLive/TLMedia.pm (revision 14488)
@@ -31,24 +57,35 @@ Index: tlpkg/TeXLive/TLMedia.pm
} elsif (-d "$location/$Archive") {
$media = 'CD';
} else {
-@@ -142,6 +144,7 @@
- my $opt_doc = $totlpdb->option("install_docfiles");
- my $real_opt_doc = $opt_doc;
- my $reloc = 1 if $tlpobj->relocated;
-+ $reloc = 0 if $totlpdb->setting("usertree");
- my $container;
- my @installfiles;
- my $location = $self->location;
-@@ -235,7 +238,7 @@
+@@ -235,8 +237,12 @@
}
# if a package is relocatable we have to cancel the reloc prefix
# before we save it to the local tlpdb
- if ($tlpobj->relocated) {
+- $tlpobj->cancel_reloc_prefix;
+ if ($reloc) {
- $tlpobj->cancel_reloc_prefix;
++ if ($totlpdb->setting("usertree")) {
++ $tlpobj->cancel_reloc_prefix;
++ } else {
++ $tlpobj->replace_reloc_prefix;
++ }
}
# we have to write out the tlpobj file since it is contained in the
-@@ -388,6 +391,7 @@
+ # archives (.tar.xz) but at DVD install time we don't have them
+@@ -305,7 +311,11 @@
+ } elsif ($what =~ m,\.tar(\.xz)?$,) {
+ my $type = defined($1) ? "xz" : "tar";
+
+- $target .= "/$TeXLive::TLConfig::RelocTree" if $reloc;
++ if ($reloc) {
++ if (!$totlpdb->setting("usertree")) {
++ $target .= "/$TeXLive::TLConfig::RelocTree" if $reloc;
++ }
++ }
+
+ # this is the case when we install from CD or the NET, or a backup
+ #
+@@ -388,6 +398,7 @@
my ($self, $pkg, $nopostinstall) = @_;
my $localtlpdb = $self->tlpdb;
my $tlp = $localtlpdb->get_package($pkg);
@@ -56,7 +93,7 @@ Index: tlpkg/TeXLive/TLMedia.pm
if (!defined($tlp)) {
tlwarn ("$pkg: package not present, cannot remove\n");
} else {
-@@ -413,9 +417,14 @@
+@@ -413,9 +424,12 @@
# in user mode we just remove the prefix, in normal mode we
# replace it with texmf-dist
# since we don't have user mode
@@ -64,14 +101,25 @@ Index: tlpkg/TeXLive/TLMedia.pm
if ($tlp->relocated) {
for (@files) {
- s:^$RelocPrefix/:$RelocTree/:;
-+ if ($usertree) {
-+ s:^$RelocPrefix/::;
-+ } else {
++ if (!$usertree) {
+ s:^$RelocPrefix/:$RelocTree/:;
+ }
}
}
#
+Index: tlpkg/TeXLive/TLUtils.pm
+===================================================================
+--- tlpkg/TeXLive/TLUtils.pm (revision 14488)
++++ tlpkg/TeXLive/TLUtils.pm (working copy)
+@@ -1187,7 +1187,7 @@
+ # if a package is relocatable we have to cancel the reloc prefix
+ # before we save it to the local tlpdb
+ if ($tlpobj->relocated) {
+- $tlpobj->cancel_reloc_prefix;
++ $tlpobj->replace_reloc_prefix;
+ }
+ $totlpdb->add_tlpobj($tlpobj);
+ # we have to write out the tlpobj file since it is contained in the
Index: texmf/scripts/texlive/tlmgr.pl
===================================================================
--- texmf/scripts/texlive/tlmgr.pl (revision 14493)
@@ -127,7 +175,69 @@ Index: texmf/scripts/texlive/tlmgr.pl
} elsif ($action =~ m/^remove$/i) {
action_remove();
} elsif ($action =~ /^paper$/) {
-@@ -1988,16 +2010,18 @@
+@@ -863,13 +885,14 @@
+ # include arbitrary package in the list of collections, but
+ # only collectons:
+ @colls = grep {m;^collection-;} @colls;
+- print "Package: ", $tlp->name, "\n";
+- print "Category: ", $tlp->category, "\n";
+- print "ShortDesc: ", $tlp->shortdesc, "\n" if ($tlp->shortdesc);
+- print "LongDesc: ", $tlp->longdesc, "\n" if ($tlp->longdesc);
+- print "Installed: ", ($installed ? "Yes" : "No"), "\n";
+- print "Revision: ", $tlp->revision, "\n" if ($installed);
+- print "Collection: ", @colls, "\n" if (@colls);
++ print "Package: ", $tlp->name, "\n";
++ print "Category: ", $tlp->category, "\n";
++ print "ShortDesc: ", $tlp->shortdesc, "\n" if ($tlp->shortdesc);
++ print "LongDesc: ", $tlp->longdesc, "\n" if ($tlp->longdesc);
++ print "Installed: ", ($installed ? "Yes" : "No"), "\n";
++ print "Revision: ", $tlp->revision, "\n" if ($installed);
++ print "Relocatable: ", ($tlp->relocated ? "Yes" : "No"), "\n";
++ print "Collection: ", @colls, "\n" if (@colls);
+ if ($opts{"list"}) {
+ if ($tlp->category eq "Collection" || $tlp->category eq "Scheme") {
+ # in the case of collections of schemes we list the deps
+@@ -1380,17 +1403,19 @@
+ }
+ }
+ if ($other_updates_asked_for && !$opts{"self"}) {
+- if (check_for_critical_updates($localtlpdb, $tlmediatlpdb)) {
+- if ($opts{"force"}) {
+- tlwarn("$0: Continuing due to --force.\n");
+- } elsif ($opts{"list"} || $opts{"self"}) {
+- # do not warn here
+- } else {
+- if ($::gui_mode) {
+- # return here and don't do any updates
+- return;
++ if (!$opts{"usermode"}) {
++ if (check_for_critical_updates($localtlpdb, $tlmediatlpdb)) {
++ if ($opts{"force"}) {
++ tlwarn("$0: Continuing due to --force.\n");
++ } elsif ($opts{"list"} || $opts{"self"}) {
++ # do not warn here
+ } else {
+- die "$0: Exiting, please read above warning.\n";
++ if ($::gui_mode) {
++ # return here and don't do any updates
++ return;
++ } else {
++ die "$0: Exiting, please read above warning.\n";
++ }
+ }
+ }
+ }
+@@ -1808,7 +1833,8 @@
+
+ if ($opts{"backup"} && !$opts{"dry-run"}) {
+ $tlp->make_container("xz", $root,
+- $opts{"backupdir"}, "${pkg}.r" . $tlp->revision);
++ $opts{"backupdir"}, "${pkg}.r" . $tlp->revision,
++ $tlp->relocated);
+ $unwind_package =
+ "$opts{'backupdir'}/${pkg}.r" . $tlp->revision . ".tar.xz";
+
+@@ -1988,16 +2014,18 @@
$opts{"no-depends"} = 1 if $opts{"no-depends-at-all"};
init_tlmedia();
@@ -155,7 +265,23 @@ Index: texmf/scripts/texlive/tlmgr.pl
}
}
}
-@@ -3119,6 +3143,34 @@
+@@ -2034,6 +2062,15 @@
+ }
+ }
+ foreach my $pkg (@inst_packs, @inst_colls, @inst_schemes) {
++ my $tlp = $tlmediasrc->tlpdb->get_package($pkg);
++ if (!defined($tlp)) {
++ info("Unknown package $pkg\n");
++ next;
++ }
++ if (!$tlp->relocated && $opts{"usermode"}) {
++ info("Package $pkg is not relocatable, cannot install it in user mode!\n");
++ next;
++ }
+ my $re = "";
+ if (defined($localtlpdb->get_package($pkg))) {
+ if ($opts{"reinstall"}) {
+@@ -3119,6 +3156,34 @@
#
@@ -190,7 +316,7 @@ Index: texmf/scripts/texlive/tlmgr.pl
# action conf
# tries to mimick texconfig conf but probably will add some more things
#
-@@ -3182,10 +3234,10 @@
+@@ -3182,10 +3247,10 @@
# stuff changed via the GUI
return if defined $localtlmedia;
return if defined $localtlpdb;