Server IP : 195.201.23.43 / Your IP : 3.145.175.141 Web Server : Apache System : Linux webserver2.vercom.be 5.4.0-192-generic #212-Ubuntu SMP Fri Jul 5 09:47:39 UTC 2024 x86_64 User : kdecoratie ( 1041) PHP Version : 7.1.33-63+ubuntu20.04.1+deb.sury.org+1 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/emacsen-common/ |
Upload File : |
#!/usr/bin/perl -w use Errno; use strict; my $lib_dir = "/usr/lib/emacsen-common"; my $invoked_by_old_pkg; my $context; my $flavor; require $lib_dir . "/lib.pl"; umask 0022 or die "emacs-install: can't set umask, aborting."; sub usage { my($file_handle) = @_; if($invoked_by_old_pkg) { print $file_handle "Usage: emacs-install FLAVOR\n"; } else { print $file_handle "Usage: emacs-install (--preinst|--postinst) FLAVOR\n"; } } if(scalar(@ARGV) == 1) { $invoked_by_old_pkg = 1; $flavor = $ARGV[0]; $context = 'postinst;' } elsif (scalar(@ARGV) == 2) { if($ARGV[0] eq '--preinst') { $context = 'preinst'; } elsif($ARGV[0] eq '--postinst') { $context = 'postinst'; } else { usage(*STDERR{IO}); exit(1); } $flavor = $ARGV[1]; } else { usage(*STDERR{IO}); exit(1); } if($context eq 'preinst') { my $f = "$::installed_flavor_state_dir/$flavor"; unlink("$f"); die "ERROR: cannot unlink $f: $!, " unless (unlink($f) or $!{ENOENT}); exit(0); } # Must be --postinst. my @installed_flavors = get_installed_flavors(); # Mark as safe to include in list of flavors for package setup. ex('touch', "$::installed_flavor_state_dir/$flavor"); my @ordered_pkg_list = generate_add_on_install_list(get_installed_add_on_packages()); foreach my $pkg (@ordered_pkg_list) { print "Install $pkg for $flavor\n"; my $script = $lib_dir . "/packages/install/$pkg"; my $failed; if(-e "$lib_dir/packages/compat/$pkg") # New-style package. { $failed = -e $script && (system($script, $flavor) != 0); } else # Old-style package. { $failed = -e $script && (system($script, $flavor, @installed_flavors) != 0); } if($failed) { print STDERR "ERROR: install script from $pkg package failed\n"; exit(1); } }Private