summaryrefslogtreecommitdiff
path: root/Master/tlpkg/dev
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/dev')
-rw-r--r--Master/tlpkg/dev/dev.split-desktop-integration.patch333
-rw-r--r--Master/tlpkg/dev/dev.update-tlpdb-option-on-the-fly.README21
-rw-r--r--Master/tlpkg/dev/dev.update-tlpdb-option-on-the-fly.patch56
3 files changed, 112 insertions, 298 deletions
diff --git a/Master/tlpkg/dev/dev.split-desktop-integration.patch b/Master/tlpkg/dev/dev.split-desktop-integration.patch
index 4c308574422..3020684ffea 100644
--- a/Master/tlpkg/dev/dev.split-desktop-integration.patch
+++ b/Master/tlpkg/dev/dev.split-desktop-integration.patch
@@ -1,6 +1,6 @@
Index: install-tl
===================================================================
---- install-tl (revision 19656)
+--- install-tl (revision 19696)
+++ install-tl (working copy)
@@ -861,15 +861,13 @@
sub do_tlpdb_postactions {
@@ -13,22 +13,23 @@ Index: install-tl
&TeXLive::TLUtils::do_postaction("install",
$usedtlpdb->get_package($package),
$vars{'option_file_assocs'},
++ $vars{'option_menu_integration'},
$vars{'option_desktop_integration'},
- $vars{'option_desktop_integration'},
-+ $vars{'option_menu_integration'},
$vars{'option_post_code'});
}
info ("finished with package specific postactions\n");
-@@ -1313,6 +1311,8 @@
+@@ -1313,6 +1311,9 @@
&& ($tlpdb->option("paper") eq "letter" ? 1 : 0);
$vars{'option_desktop_integration'} = $tlpdb->option("desktop_integration");
$vars{'option_desktop_integration'} = 1 if win32();
-+ $vars{'option_menu_integration'} = $tlpdb->option("menu_integration");
-+ $vars{'option_menu_integration'} = 1 if win32();
++ # we unconditionally set the menu integration, this will be done in all
++ # cases but portable use, where we sanitize it away
++ $vars{'option_menu_integration'} = 1;
$vars{'option_path'} = $tlpdb->option("path");
$vars{'option_path'} = 0 if !defined($vars{'option_path'});
$vars{'option_path'} = 1 if win32();
-@@ -1496,6 +1496,7 @@
+@@ -1496,6 +1497,7 @@
$vars{'option_path'} &&= !$vars{'portable'};
$vars{'option_file_assocs'} &&= !$vars{'portable'};
$vars{'option_desktop_integration'} &&= !$vars{'portable'};
@@ -36,14 +37,6 @@ Index: install-tl
}
sub prepare_installation {
-@@ -1543,6 +1544,7 @@
- $localtlpdb->option ("backupdir", $vars{'option_backupdir'});
- $localtlpdb->option ("create_formats", $vars{'option_fmt'} ? "1" : "0");
- $localtlpdb->option ("desktop_integration", $vars{'option_desktop_integration'} ? "1" : "0");
-+ $localtlpdb->option ("menu_integration", $vars{'option_menu_integration'} ? "1" : "0");
- $localtlpdb->option ("file_assocs", $vars{'option_file_assocs'});
- $localtlpdb->option ("post_code", $vars{'option_post_code'} ? "1" : "0");
- $localtlpdb->option ("sys_bin", $vars{'option_sys_bin'});
@@ -1635,6 +1637,7 @@
$previoustlpdb->option_pkg("00texlive.installation",
"create_formats");
@@ -52,298 +45,42 @@ Index: install-tl
$vars{'option_path'} =
$previoustlpdb->option_pkg("00texlive.installation",
"path");
+Index: texmf/scripts/texlive/tlmgrgui.pl
+===================================================================
+--- texmf/scripts/texlive/tlmgrgui.pl (revision 19696)
++++ texmf/scripts/texlive/tlmgrgui.pl (working copy)
+@@ -1098,7 +1098,7 @@
+
+ if (win32()) {
+ push @config_set_l,
+- $back_config_set->Label(-text => __("Create shortcuts in menu and on desktop"), -anchor => "w");
++ $back_config_set->Label(-text => __("Create shortcuts on the desktop"), -anchor => "w");
+ push @config_set_m,
+ $back_config_set->Label(-textvariable => \$changeddefaults{"desktop_integration"}{'display'});
+ push @config_set_r,
+Index: texmf/scripts/texlive/NEWS
+===================================================================
+--- texmf/scripts/texlive/NEWS (revision 19696)
++++ texmf/scripts/texlive/NEWS (working copy)
+@@ -6,6 +6,8 @@
+ <li>set LESS='-R' and unset LESSOPEN and LESSPIPE in the environment
+ before calling pod2usage.
+ <li>don't load the remote db if tlmgr update is called without arguments
++<li>menu shortcuts are installed unconditionally, the desktop_integration
++ option only controls shortcuts on the desktop (W32)
+
+ tlmgr rev 19414 (TeX Live 2010 Release Version)
+
Index: tlpkg/TeXLive/TLConfig.pm
===================================================================
---- tlpkg/TeXLive/TLConfig.pm (revision 19656)
+--- tlpkg/TeXLive/TLConfig.pm (revision 19696)
+++ tlpkg/TeXLive/TLConfig.pm (working copy)
-@@ -140,7 +140,10 @@
+@@ -140,7 +140,7 @@
"Create formats on installation" ],
"desktop_integration" =>
[ "b", 1, "desktop_integration",
- "Create shortcuts (menu and desktop) in postinst" ],
+ "Create shortcuts on the desktop in postinst" ],
-+ "menu_integration" =>
-+ [ "b", 1, "menu_integration",
-+ "Create shortcuts in the Start menu in postinst" ],
"file_assocs" =>
[ "n:0..2", 1, "fileassocs",
"Change file associations in postinst" ],
-Index: tlpkg/TeXLive/TLMedia.pm
-===================================================================
---- tlpkg/TeXLive/TLMedia.pm (revision 19656)
-+++ tlpkg/TeXLive/TLMedia.pm (working copy)
-@@ -272,12 +272,10 @@
- if (win32() && admin() && !$totlpdb->option("w32_multi_user")) {
- non_admin();
- }
-- # for now desktop_integration maps to both installation
-- # of desktop shortcuts and menu items, but we can split them later
- &TeXLive::TLUtils::do_postaction("install", $tlpobj,
- $totlpdb->option("file_assocs"),
- $totlpdb->option("desktop_integration"),
-- $totlpdb->option("desktop_integration"),
-+ $totlpdb->option("menu_integration"),
- $totlpdb->option("post_code"));
- }
- }
-@@ -492,8 +490,8 @@
- if (defined($opts{'nopostinstall'}) && $opts{'nopostinstall'}) {
- &TeXLive::TLUtils::do_postaction("remove", $tlp,
- 0, # option_file_assocs,
-- 0, # option_desktop_integration, menu part
-- 0, # option_desktop_integration, desktop part
-+ 0, # option_desktop_integration
-+ 0, # option_menu_integration
- $localtlpdb->option("post_code"));
- }
- #
-@@ -523,12 +521,11 @@
- # Run the post installation code in the postaction tlpsrc entries
- # the postaction code part cannot be evaluated now since the
- # files are already removed.
-- # Again, desktop integration maps to desktop and menu links
- if (!$nopostinstall) {
- &TeXLive::TLUtils::do_postaction("remove", $tlp,
- $localtlpdb->option("file_assocs"),
- $localtlpdb->option("desktop_integration"),
-- $localtlpdb->option("desktop_integration"),
-+ $localtlpdb->option("menu_integration"),
- 0);
- }
- }
-Index: tlpkg/installer/install-menu-wizard.pl
-===================================================================
---- tlpkg/installer/install-menu-wizard.pl (revision 19656)
-+++ tlpkg/installer/install-menu-wizard.pl (working copy)
-@@ -16,7 +16,7 @@
- # for unix and windows. On W32 with admin privileges both @w32 list options
- # are shown
- my @unix_opts = qw/letter/;
--my @w32_opts = qw/letter desktop_integration/;
-+my @w32_opts = qw/letter desktop_integration menu_integration/;
- my @w32_admin_opts = qw/w32_multi_user/;
-
- my @opts_list = ();
-@@ -329,7 +329,8 @@
-
- my %opts_to_str = (
- "letter" => "Default paper size",
-- "desktop_integration" => "Add shortcuts to menu and desktop",
-+ "desktop_integration" => "Add shortcuts on the desktop",
-+ "menu_integration" => "Add shortcuts in the Start menu",
- "file_assocs" => "Change file associations",
- "path" => "Adjust PATH setting in registry",
- "w32_multi_user" => "Installation for all users",
-@@ -357,9 +358,13 @@
- # -variable => \$vars{"option_letter"});
- #
- # $opt_cb{"desktop_integration"} = $fmain->Checkbutton(
--# -text => __("Add shortcuts to menu and desktop"),
-+# -text => __("Add shortcuts on the desktop"),
- ## -variable => \$vars{"option_desktop_integration"});
- #
-+# $opt_cb{"menu_integration"} = $fmain->Checkbutton(
-+# -text => __("Add shortcuts in the Start menu"),
-+## -variable => \$vars{"option_desktop_integration"});
-+#
- # $opt_cb{"file_assocs"} = $fmain->Checkbutton(
- # -text => __('Change file associations'),
- ## -variable => \$vars{"option_file_assocs"});
-Index: tlpkg/installer/install-menu-perltk.pl
-===================================================================
---- tlpkg/installer/install-menu-perltk.pl (revision 19656)
-+++ tlpkg/installer/install-menu-perltk.pl (working copy)
-@@ -78,6 +78,7 @@
- my $fmtyesno = ( $vars{'option_fmt'} ? __("Yes") : __("No") );
- my $srcyesno = ( $vars{'option_src'} ? __("Yes") : __("No") );
- my $deskintyesno = ( $vars{'option_desktop_integration'} ? __("Yes") : __("No") );
-+my $menuintyesno = ( $vars{'option_menu_integration'} ? __("Yes") : __("No") );
- my $pathadjyesno = ( $vars{'option_path'} ? __("Yes") : __("No") );
- my $fileassocyesno = $::fileassocdesc[$vars{'option_file_assocs'}];
- my $editoryesno = ( $vars{'collection-texworks'} ? __("Yes") : __("No") );
-@@ -294,11 +295,17 @@
-
- if ($::opt_all_options || win32()) {
- $row++;
-- $fr->Label(-text => __('Add shortcuts to menu and desktop'), -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
-+ $fr->Label(-text => __('Add shortcuts on the desktop'), -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
- $fr->Label(-anchor => 'w', -textvariable => \$deskintyesno)->grid(-row => $row, -column => 2, -padx => "2m");
- $fr->Button(-text => __("Toggle"), -command => sub { toggle_and_set_opt_variable(\$vars{'option_desktop_integration'}, \$deskintyesno); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
-
- $row++;
-+ $fr->Label(-text => __('Add shortcuts in Start menu'), -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
-+ $fr->Label(-anchor => 'w', -textvariable => \$menuintyesno)->grid(-row => $row, -column => 2, -padx => "2m");
-+ $fr->Button(-text => __("Toggle"), -command => sub { toggle_and_set_opt_variable(\$vars{'option_menu_integration'}, \$menuintyesno); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
-+
-+ $row++;
-+ $row++;
- $fr->Label(-text => __('Change file associations'), -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
- $fr->Label(-anchor => 'w', -textvariable => \$fileassocyesno)->grid(-row => $row, -column => 2, -padx => "2m");
- $fr->Button(-text => __("Change"), -command => sub { menu_edit_file_assocs(); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
-Index: tlpkg/installer/install-menu-text.pl
-===================================================================
---- tlpkg/installer/install-menu-text.pl (revision 19656)
-+++ tlpkg/installer/install-menu-text.pl (working copy)
-@@ -711,6 +711,7 @@
- my $b_fmt=button($vars{'option_fmt'});
- my $b_letter=button($vars{'option_letter'});
- my $b_deskint=button($vars{'option_desktop_integration'});
-+ my $b_menuint=button($vars{'option_menu_integration'});
- my $b_admin=button($vars{'option_w32_multi_user'});
- my $b_addoneditor=button($vars{'collection-texworks'});
- my $b_restricted=button($vars{'option_write18_restricted'});
-@@ -760,7 +761,8 @@
- ;
- }
- if (win32() || $::opt_all_options) {
-- print " <M> install menu items, shortcuts, etc: $b_deskint\n";
-+ print " <L> install desktop shortcuts: $b_deskint\n";
-+ print " <M> install menu items: $b_menuint\n";
- print " <N> update file associations: [$::fileassocdesc[$vars{'option_file_assocs'}]]\n";
- if ($::opt_all_options || TeXLive::TLWinGoo::admin()) {
- # if we are admin we allow normal user installation, too
-@@ -812,10 +814,14 @@
- }
- }
- if (win32() || $::opt_all_options) {
-- if ("\u$answer" eq 'M') {
-+ if ("\u$answer" eq 'L') {
- toggle 'option_desktop_integration';
- return $command{'self'};
-
-+ } elsif ("\u$answer" eq 'M') {
-+ toggle 'option_menu_integration';
-+ return $command{'self'};
-+
- } elsif ("\u$answer" eq 'N') {
- print "New value for file_assocs:\n";
- print " 0 -- don't tweak the file associations\n";
-@@ -898,6 +904,7 @@
- my $b_fmt=button($vars{'option_fmt'});
- my $b_letter=button($vars{'option_letter'});
- my $b_deskint=button($vars{'option_desktop_integration'});
-+ my $b_menuint=button($vars{'option_menu_integration'});
- my $b_admin=button($vars{'option_w32_multi_user'});
- my $b_addoneditor=button($vars{'collection-texworks'});
- my $b_restricted=button($vars{'option_write18_restricted'});
-@@ -1014,7 +1021,8 @@
- }
- if (win32()) {
- print " $b_path adjust search path\n";
-- print " $b_deskint add menu items, shortcuts, etc.\n";
-+ print " $b_deskint add desktop shortcuts\n";
-+ print " $b_menuint add menu items\n";
- print " [$vars{'option_file_assocs'}] update file associations\n";
- if (admin()) {
- print " $b_admin make installation available to all users\n";
-Index: tlpkg/installer/installer-options.txt
-===================================================================
---- tlpkg/installer/installer-options.txt (revision 19656)
-+++ tlpkg/installer/installer-options.txt (working copy)
-@@ -36,12 +36,20 @@
-
- option_desktop_integration 1 w32 w32 w32
- option("desktop_integration")
-- shortcuts etc
-+ shortcuts on the desktop
- currently effects w32 only
- install-tl: sub do_tlpdb_postactions
- TLMedia: remove_package, install_package
-
-+option_menu_integration 1 w32 w32 w32
-+ option("menu_integration")
-+ shortcuts in the menu
-+ currently effects w32 only
-+ install-tl: sub do_tlpdb_postactions
-+ TLMedia: remove_package, install_package
-+
- option_post_code 1
-+option_post_code 1
- option("post_code")
- postaction code
- install-tl: sub do_tlpdb_postactions
-Index: texmf/scripts/texlive/tlmgr.pl
-===================================================================
---- texmf/scripts/texlive/tlmgr.pl (revision 19656)
-+++ texmf/scripts/texlive/tlmgr.pl (working copy)
-@@ -2886,6 +2886,7 @@
- for my $o (keys %{$localtlpdb->options}) {
- # ignore some things which are win32 specific
- next if ($o eq "desktop_integration" && !win32());
-+ next if ($o eq "menu_integration" && !win32());
- next if ($o eq "file_assocs" && !win32());
- next if ($o eq "w32_multi_user" && !win32());
- if (win32()) {
-@@ -3999,9 +4000,10 @@
- @todo = @ARGV;
- @todo = $localtlpdb->expand_dependencies("-only-arch", $localtlpdb, @todo);
- }
-- if ($type =~ m/^shortcut$/i) {
-+ if ($type =~ m/^(shortcut|desktop|menu)$/i) {
-+ my $st = lc($1);
- if (!win32()) {
-- tlwarn("action postaction shortcut only works on windows.\n");
-+ tlwarn("action postaction $st only works on windows.\n");
- return;
- }
- for my $p (@todo) {
-@@ -4010,7 +4012,18 @@
- tlwarn("$p is not installed, ignoring it.\n");
- } else {
- # run all shortcut actions, desktop and menu integration
-- TeXLive::TLUtils::do_postaction($how, $tlp, 0, 1, 1, 0);
-+ my @op = (1, 1);
-+ if ($st eq "shortcut") {
-+ @op = (1, 1);
-+ } elsif ($st eq "menu") {
-+ @op = (1, 0);
-+ } elsif ($st eq "desktop") {
-+ @op = (0, 1);
-+ } else {
-+ tlwarn("very strange, that should not happen: postaction type shortcut = ..$st..\n");
-+ @op = (0, 0);
-+ }
-+ TeXLive::TLUtils::do_postaction($how, $tlp, 0, @op, 0);
- }
- }
- } elsif ($type =~ m/^fileassoc$/i) {
-@@ -5418,12 +5431,15 @@
-
-
- =head2 postaction [--w32mode=user|admin] [--fileassocmode=1|2] [--all]
-- [install|remove] [shortcut|fileassoc|script] [I<pkg>]...
-+ [install|remove] [shortcut|menu|desktop|fileassoc|script] [I<pkg>]...
-
- Carry out the postaction C<shortcut>, C<fileassoc>, or C<script> given
- as the second required argument in install or remove mode (which is the
- first required argument), for either the packages given on the command
--line, or for all if C<--all> is given.
-+line, or for all if C<--all> is given. Here C<shortcut> runs both the
-+desktop and menu shortcut code, while C<menu> only installs/removes
-+the menu entries, and C<desktop> only installs/removes the desktop
-+shortcuts.
-
- The option C<--w32mode> is C<user> all actions will only carried out in
- the user accessible parts of the registry/filesystem, while the C<admin>
-Index: texmf/scripts/texlive/tlmgrgui.pl
-===================================================================
---- texmf/scripts/texlive/tlmgrgui.pl (revision 19656)
-+++ texmf/scripts/texlive/tlmgrgui.pl (working copy)
-@@ -1098,8 +1098,16 @@
-
- if (win32()) {
- push @config_set_l,
-- $back_config_set->Label(-text => __("Create shortcuts in menu and on desktop"), -anchor => "w");
-+ $back_config_set->Label(-text => __("Create shortcuts in Start menu"), -anchor => "w");
- push @config_set_m,
-+ $back_config_set->Label(-textvariable => \$changeddefaults{"menu_integration"}{'display'});
-+ push @config_set_r,
-+ $back_config_set->Button(-text => __("Toggle"),
-+ -command => sub { toggle_setting("menu_integration"); });
-+
-+ push @config_set_l,
-+ $back_config_set->Label(-text => __("Create shortcuts on the desktop"), -anchor => "w");
-+ push @config_set_m,
- $back_config_set->Label(-textvariable => \$changeddefaults{"desktop_integration"}{'display'});
- push @config_set_r,
- $back_config_set->Button(-text => __("Toggle"),
diff --git a/Master/tlpkg/dev/dev.update-tlpdb-option-on-the-fly.README b/Master/tlpkg/dev/dev.update-tlpdb-option-on-the-fly.README
new file mode 100644
index 00000000000..9e165733ea9
--- /dev/null
+++ b/Master/tlpkg/dev/dev.update-tlpdb-option-on-the-fly.README
@@ -0,0 +1,21 @@
+update tlpdb options by comparing the set of old and the set of
+new entries in TeXLive::TLConfig::TLPDBOptions after installtion.
+
+TODO:
+Get rid of warning:
+Subroutine module_revision redefined at /home/norbert/tl/2010/tlpkg/TeXLive/TLConfig.pm line 16.
+
+Current output:
+[~] tlmgr update --self
+tlmgr: package repository /var/www/norbert/tlnet
+tlmgr: saving backups to /home/norbert/tl/2010/tlpkg/backups
+[1/1, ??:??/??:??] update: texlive.infra [277k] (1954 -> 19547) ... done
+Subroutine module_revision redefined at /home/norbert/tl/2010/tlpkg/TeXLive/TLConfig.pm line 16.
+Updating local tlpdb:
+* new option desktop_integration
+ description: Create shortcuts (menu and desktop) in postinst
+ default value: 1
+tlmgr: package log updated at /home/norbert/tl/2010/texmf-var/web2c/tlmgr.log
+running mktexlsr ...
+done running mktexlsr.
+[~]
diff --git a/Master/tlpkg/dev/dev.update-tlpdb-option-on-the-fly.patch b/Master/tlpkg/dev/dev.update-tlpdb-option-on-the-fly.patch
new file mode 100644
index 00000000000..f6d5d9cb926
--- /dev/null
+++ b/Master/tlpkg/dev/dev.update-tlpdb-option-on-the-fly.patch
@@ -0,0 +1,56 @@
+--- ./texmf/scripts/texlive/tlmgr.pl.pre 2010-09-14 01:36:15.000000000 +0900
++++ ./texmf/scripts/texlive/tlmgr.pl 2010-09-14 02:11:51.000000000 +0900
+@@ -1811,6 +1811,10 @@
+ }
+
+ sub action_update {
++ # the following var is only use to update options in
++ # the local tlpdb in case we updated texlive.infra
++ my $texlive_infra_was_updated = 0;
++
+ init_local_db(1);
+ $opts{"no-depends"} = 1 if $opts{"no-depends-at-all"};
+
+@@ -2446,6 +2450,9 @@
+ }
+ }
+ }
++ # special case if texlive.infra was changed so that before shutting
++ # down we can update the options
++ $texlive_infra_was_updated = 1 if ($pkg eq "texlive.infra");
+ } else {
+ # install_package returned a scalar, so error.
+ # now in fact we should do some cleanup, removing files and
+@@ -2614,6 +2621,32 @@
+ }
+ }
+
++ # update of tlpdb options
++ # if texlive.infra has been updated (actually, not --list or --dry-run)
++ # we check the old against the new TLConfig::TLPDBOptions and add
++ # new ones
++ if ($texlive_infra_was_updated) {
++ my $changed = 0;
++ # save he old %TLConfig:
++ my %oldTLPDBOptions = %TeXLive::TLConfig::TLPDBOptions;
++ # make sure that a require reloads the TLConfig.pm
++ delete $INC{'TeXLive/TLConfig.pm'};
++ # reload TLConfig.pm, but disable warnings about redefining stuff
++ no warnings qw(redefine);
++ require 'TeXLive/TLConfig.pm';
++ use warnings 'all';
++ for my $opt (keys %TeXLive::TLConfig::TLPDBOptions) {
++ next if (defined($oldTLPDBOptions{$opt}));
++ $changed = 1;
++ info("Updating local tlpdb:\n");
++ info("* new option $opt\n");
++ info(" description: " . $TeXLive::TLConfig::TLPDBOptions{$opt}->[3] . "\n");
++ info(" default value: " . $TeXLive::TLConfig::TLPDBOptions{$opt}->[1] . "\n");
++ $localtlpdb->option($opt, $TeXLive::TLConfig::TLPDBOptions{$opt}->[1]);
++ }
++ $localtlpdb->save if $changed;
++ }
++
+ my $restart_tlmgr = 0;
+ if ($opts{"self"} && @critical &&
+ $infra_update_done && $other_updates_asked_for) {