diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-08-10 15:52:22 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-08-10 16:03:28 +0200 |
commit | 6dcb3d4ef46312729bb6f16c473b433474863f68 (patch) | |
tree | 58f2f577d9883e32b886bbe4086f83d0bb16fc81 /setup_native/scripts | |
parent | f2f3703740f65b76e891ecc3591d7e60d5b7caef (diff) |
Related fdo#51252: No more prereg, no more unopkg sync
Now that 5c47e5f63a79a9e72ec4a100786b1bbf65137ed4 "fdo#51252 Disable copying
share/prereg/bundled to avoid startup crashes" removed the use of share/prereg,
there is no longer need to generate it in the first place (by calling "unopkg
sync" at build or installation time), and so no need for the "unopkg sync" sub-
command, either. This also allows to simplify some of the jvmfwk code that was
only there so that "unopkg sync" (which can require a JVM) can work in "hostile"
environments (during build and installation).
Change-Id: I52657384f4561bf27948ba4f0f88f4498e90987f
Diffstat (limited to 'setup_native/scripts')
-rw-r--r-- | setup_native/scripts/admin.pl | 193 | ||||
-rw-r--r-- | setup_native/scripts/deregister_extensions | 78 | ||||
-rw-r--r-- | setup_native/scripts/install_solaris.sh | 4 | ||||
-rw-r--r-- | setup_native/scripts/makefile.mk | 2 | ||||
-rw-r--r-- | setup_native/scripts/register_extensions | 84 |
5 files changed, 1 insertions, 360 deletions
diff --git a/setup_native/scripts/admin.pl b/setup_native/scripts/admin.pl index 5ddeabdb047b..16f3692ff2d9 100644 --- a/setup_native/scripts/admin.pl +++ b/setup_native/scripts/admin.pl @@ -297,69 +297,6 @@ sub get_sourcepath_from_filename_and_includepath return \$onefile; } -############################################################## -# Removing all empty directories below a specified directory -############################################################## - -sub remove_empty_dirs_in_folder -{ - my ( $dir, $firstrun ) = @_; - - if ( $firstrun ) - { - print "Removing superfluous directories\n"; - } - - my @content = (); - - $dir =~ s/\Q$separator\E\s*$//; - - if ( -d $dir ) - { - opendir(DIR, $dir); - @content = readdir(DIR); - closedir(DIR); - - my $oneitem; - - foreach $oneitem (@content) - { - if ((!($oneitem eq ".")) && (!($oneitem eq ".."))) - { - my $item = $dir . $separator . $oneitem; - - if ( -d $item ) # recursive - { - remove_empty_dirs_in_folder($item, 0); - } - } - } - - # try to remove empty directory - my $returnvalue = rmdir $dir; - - # if ( $returnvalue ) { print "Successfully removed empty dir $dir\n"; } - } -} - -#################################################### -# Detecting the directory with extensions -#################################################### - -sub get_extensions_dir -{ - my ( $unopkgfile ) = @_; - - my $localbranddir = $unopkgfile; - get_path_from_fullqualifiedname(\$localbranddir); # "program" dir in brand layer - get_path_from_fullqualifiedname(\$localbranddir); # root dir in brand layer - $localbranddir =~ s/\Q$separator\E\s*$//; - my $extensiondir = $localbranddir . $separator . "share" . $separator . "extensions"; - my $preregdir = $localbranddir . $separator . "share" . $separator . "prereg" . $separator . "bundled"; - - return ($extensiondir, $preregdir); -} - ######################################################## # Finding all files with a specified file extension # in a specified directory. @@ -687,26 +624,6 @@ sub analyze_media_file return \%diskidhash; } -sub analyze_customaction_file -{ - my ($filecontent) = @_; - - my $register_extensions_exists = 0; - - my %table = (); - - for ( my $i = 0; $i <= $#{$filecontent}; $i++ ) - { - if ( ${$filecontent}[$i] =~ /^\s*RegisterExtensions\s+/ ) - { - $register_extensions_exists = 1; - last; - } - } - - return $register_extensions_exists; -} - ################################################################################ # Analyzing the content of Directory.idt ################################################################################# @@ -941,8 +858,6 @@ sub copy_files_into_directory_structure print "Copying files\n"; - my $unopkgfile = ""; - for ( my $i = 1; $i <= $maxsequence; $i++ ) { if ( exists($fileorder->{$i}) ) @@ -984,8 +899,6 @@ sub copy_files_into_directory_structure if ( ! $copyreturn) { exit_program("ERROR: Could not copy $source to $dest\n"); } - # Searching unopkg.exe - if ( $destfile =~ /unopkg\.exe\s*$/ ) { $unopkgfile = $destfile; } # if (( $^O =~ /cygwin/i ) && ( $destfile =~ /\.exe\s*$/ )) { change_privileges($destfile, "775"); } } # else # allowing missing sequence numbers ? @@ -993,8 +906,6 @@ sub copy_files_into_directory_structure # exit_program("ERROR: No file assigned to sequence $i"); # } } - - return ($unopkgfile); } ###################################################### @@ -1085,93 +996,6 @@ sub get_temppath } #################################################################################### -# Registering extensions -#################################################################################### - -sub register_extensions_sync -{ - my ($unopkgfile, $localtemppath, $preregdir) = @_; - - if ( $preregdir eq "" ) - { - my $logtext = "ERROR: Failed to determine \"prereg\" folder for extension registration! Please check your installation set."; - print $logtext . "\n"; - exit_program($logtext); - } - - my $from = cwd(); - - my $path = $unopkgfile; - get_path_from_fullqualifiedname(\$path); - $path =~ s/\\\s*$//; - $path =~ s/\/\s*$//; - - my $executable = $unopkgfile; - make_absolute_filename_to_relative_filename(\$executable); - - chdir($path); - - if ( ! $path_displayed ) - { - print "... current dir: $path ...\n"; - $path_displayed = 1; - } - - $localtemppath =~ s/\\/\//g; - - if ( $^O =~ /cygwin/i ) { - $executable = "./" . $executable; - $preregdir = qx{cygpath -m "$preregdir"}; - chomp($preregdir); - } - - $preregdir =~ s/\/\s*$//g; - - my $systemcall = $executable . " sync --verbose 2\>\&1 |"; - - print "... $systemcall\n"; - - my @unopkgoutput = (); - - open (UNOPKG, $systemcall); - while (<UNOPKG>) {push(@unopkgoutput, $_); } - close (UNOPKG); - - my $returnvalue = $?; # $? contains the return value of the systemcall - - if ($returnvalue) - { - print "ERROR: Could not execute \"$systemcall\"!\nExitcode: '$returnvalue'\n"; - for ( my $j = 0; $j <= $#unopkgoutput; $j++ ) { print "$unopkgoutput[$j]"; } - exit_program("ERROR: $systemcall failed!"); - } - - chdir($from); -} - -#################################################################################### -# Registering all extensions located in /share/extension/install -#################################################################################### - -sub register_extensions -{ - my ($unopkgfile, $temppath, $preregdir) = @_; - - print "Registering extensions:\n"; - - if (( ! -f $unopkgfile ) || ( $unopkgfile eq "" )) - { - print("WARNING: Could not find unopkg.exe (Language Pack?)!\n"); - } - else - { - register_extensions_sync($unopkgfile, $temppath, $preregdir); - remove_complete_directory($temppath, 1); - } - -} - -#################################################################################### # Reading one file #################################################################################### @@ -1412,28 +1236,13 @@ my ( $filehash, $fileorder, $maxsequence ) = analyze_file_file($filecontent); my $fullpathhash = create_directory_structure($dirhash, $targetdir); # Copying files -my ($unopkgfile) = copy_files_into_directory_structure($fileorder, $filehash, $componenthash, $fullpathhash, $maxsequence, $unpackdir, $installdir, $dirhash); +copy_files_into_directory_structure($fileorder, $filehash, $componenthash, $fullpathhash, $maxsequence, $unpackdir, $installdir, $dirhash); if ( $^O =~ /cygwin/i ) { change_privileges_full($targetdir); } my $msidatabase = $targetdir . $separator . $databasefilename; my $copyreturn = copy($databasepath, $msidatabase); if ( ! $copyreturn) { exit_program("ERROR: Could not copy $source to $dest\n"); } -# Reading tables -$filename = $helperdir . $separator . "CustomAction.idt"; -$filecontent = read_file($filename); -my $register_extensions_exists = analyze_customaction_file($filecontent); - -# Removing empty dirs in extension folder -my ( $extensionfolder, $preregdir ) = get_extensions_dir($unopkgfile); -if ( -d $extensionfolder ) { remove_empty_dirs_in_folder($extensionfolder, 1); } - -if ( $register_extensions_exists ) -{ - # Registering extensions - register_extensions($unopkgfile, $temppath, $preregdir); -} - # Saving info in Summary Information Stream of msi database (required for following patches) if ( $msiinfo_available ) { write_sis_info($msidatabase); } diff --git a/setup_native/scripts/deregister_extensions b/setup_native/scripts/deregister_extensions deleted file mode 100644 index 4a8f91de41f0..000000000000 --- a/setup_native/scripts/deregister_extensions +++ /dev/null @@ -1,78 +0,0 @@ -#!/bin/bash - -USAGE="Usage: $0" - -SCRIPTNAME=`basename "$0"` -PROGRAMDIR=`dirname "$0"` -OFFICEDIR="$PROGRAMDIR/.." -EXTENSIONDIR=$OFFICEDIR/share/extension/install -UNOPKG=$PROGRAMDIR/unopkg - -help() -{ - echo - echo "Uninstallation script for office extensions located in <office>/share/extension/install" - echo - echo "This uninstallation script can be executed after successful installation of packages." - echo "Please execute this script, before uninstallation of packages." - echo "Usage: $0" - echo "No parameter required." - echo -} - -# -# This script is only for root installations -# (How about installations done with user privileges?) -# - -# if [ $UID -ne 0 ] -# then -# printf "\nThis script is for installation only wiht administrative rights only\n" -# help -# exit 2 -# fi - -# -# Checking existence of unopkg in program directory -# - -if [ ! -f "$UNOPKG" ]; then - echo "Error: File $UNOPKG does not exist" - exit 1 -fi - -if [ ! -x "$UNOPKG" ]; then - echo "Error: File $UNOPKG is not an executable file" - exit 1 -fi - -# -# Collecting all files located in share/install/extensions -# - -FILELIST=`find $EXTENSIONDIR -type f -name "*.oxt" -print` - -if [ -z "$FILELIST" ] -then - printf "\n$0: No extensions found in $EXTENSIONDIR\n" - exit 2 -fi - -echo -echo "Uninstalling:" -for i in $FILELIST; do - echo `basename $i` -done -echo - -for i in $FILELIST; do - COMMAND="$UNOPKG remove --shared `basename $i`" - echo $COMMAND - $COMMAND -done - -echo -echo "Uninstallation done ..." -echo - -exit 0 diff --git a/setup_native/scripts/install_solaris.sh b/setup_native/scripts/install_solaris.sh index bb792bcf2618..4ded451d9a7f 100644 --- a/setup_native/scripts/install_solaris.sh +++ b/setup_native/scripts/install_solaris.sh @@ -233,10 +233,6 @@ cat > ${INSTALL_ROOT}/usr/lib/postrun << \EOF #!/bin/sh set -e -# Override UserInstallation in bootstraprc for unopkg .. -UserInstallation='$BRAND_BASE_DIR/../UserInstallation' -export UserInstallation - if [ -x /usr/bin/mktemp ] then CMD=`/usr/bin/mktemp /tmp/userinstall.XXXXXX` diff --git a/setup_native/scripts/makefile.mk b/setup_native/scripts/makefile.mk index 7a03660ad858..fd4ec7671f49 100644 --- a/setup_native/scripts/makefile.mk +++ b/setup_native/scripts/makefile.mk @@ -40,8 +40,6 @@ UNIXTEXT= \ $(BIN)$/langpackscript.sh \ $(BIN)$/linuxpatchscript.sh \ $(BIN)$/javaloader.sh \ - $(BIN)$/register_extensions \ - $(BIN)$/deregister_extensions \ $(BIN)$/update.sh \ $(BIN)$/downloadscript.sh diff --git a/setup_native/scripts/register_extensions b/setup_native/scripts/register_extensions deleted file mode 100644 index 034642175c29..000000000000 --- a/setup_native/scripts/register_extensions +++ /dev/null @@ -1,84 +0,0 @@ -#!/bin/bash - -USAGE="Usage: $0" - -SCRIPTNAME=`basename "$0"` -PROGRAMDIR=`dirname "$0"` -OFFICEDIR="$PROGRAMDIR/.." -EXTENSIONDIR=$OFFICEDIR/share/extension/install -REGISTERFILE=$PROGRAMDIR/register.dat -UNOPKG=$PROGRAMDIR/unopkg - -help() -{ - echo - echo "Installation script for office extensions located in <office>/share/extension/install" - echo - echo "This installation script can be executed after successful installation of packages." - echo "Before uninstallation please execute the script \"deregister_extensions\" located next" - echo "to this script." - echo "Usage: $0" - echo "No parameter required." - echo -} - -# -# This script is only for root installations -# (How about installations done with user privileges?) -# - -# if [ $UID -ne 0 ] -# then -# printf "\nThis script is for installation only wiht administrative rights only\n" -# help -# exit 2 -# fi - -# -# Checking existence of unopkg in program directory -# - -if [ ! -f "$UNOPKG" ]; then - echo "Error: File $UNOPKG does not exist" - exit 1 -fi - -if [ ! -x "$UNOPKG" ]; then - echo "Error: File $UNOPKG is not an executable file" - exit 1 -fi - -# -# Collecting all files located in share/install/extensions -# - -FILELIST=`find $EXTENSIONDIR -type f -name "*.oxt" -print` - -if [ -z "$FILELIST" ] -then - printf "\n$0: No extensions found in $EXTENSIONDIR\n" - exit 2 -fi - -echo -echo "Installing:" -for i in $FILELIST; do - echo `basename $i` -done -echo - -for i in $FILELIST; do - COMMAND="$UNOPKG add --shared --suppress-license $i" - echo $COMMAND - $COMMAND -done - -if [ -f $REGISTERFILE ]; then - rm $REGISTERFILE -fi - -echo -echo "Installation done ..." -echo - -exit 0 |