OBS User unknown 2008-07-17 22:46:31 +00:00 committed by Git OBS Bridge
parent 6db9e0a534
commit 7b8d77988d
6 changed files with 56 additions and 16 deletions

View File

@ -95,11 +95,11 @@ function add_entry()
chmod 755 $delayed_exec_file chmod 755 $delayed_exec_file
else else
# Set up the new kernel # Set up the new kernel
if [ -f /etc/sysconfig/bootloader ] && if [ -f $PERL_BOOTLOADER_TESTSUITE_PATH/etc/sysconfig/bootloader ] &&
[ -f /boot/grub/menu.lst -o \ [ -f $PERL_BOOTLOADER_TESTSUITE_PATH/boot/grub/menu.lst -o \
-f /etc/lilo.conf -o \ -f $PERL_BOOTLOADER_TESTSUITE_PATH/etc/lilo.conf -o \
-f /etc/elilo.conf -o \ -f $PERL_BOOTLOADER_TESTSUITE_PATH/etc/elilo.conf -o \
-f /etc/zipl.conf ]; then -f $PERL_BOOTLOADER_TESTSUITE_PATH/etc/zipl.conf ]; then
case $flavor in case $flavor in
(kdump|um) (kdump|um)
;; ;;
@ -254,7 +254,7 @@ function remove_entry()
##################### M A I N ############################################### ##################### M A I N ###############################################
# Log how program was called # Log how program was called
logname="/var/log/YaST2/perl-BL-standalone-log" logname=$PERL_BOOTLOADER_TESTSUITE_PATH"/var/log/YaST2/perl-BL-standalone-log"
echo "bootloader_entry was called as: $*" >> $logname echo "bootloader_entry was called as: $*" >> $logname
# Log parts of the current system configuration # Log parts of the current system configuration

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7886700d349abb45111d56c8b658d9a56155f6f2dc7751cb40290eb4be0d5c9c
size 50640

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:900bfac1eec5b2d7d852e4e83740089a358a585eb1b33d44e55280518c9078c1
size 51294

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Thu Jul 17 17:33:47 CEST 2008 - jreidinger@suse.cz
- refactor pathnames, no it can be used
$PERL_BOOTLOADER_TESTSUITE_PATH variable for prefix
- fixed manpage warnings bnc#398538
- added fix for bnc#381386 to trunk
- perl-gettext is only reccomends (FATE #301805)
- read kernel parametrs from sysconfig (jsrain)
- Version bump to 0.4.64
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Jun 4 14:04:38 CEST 2008 - aosthof@suse.de Wed Jun 4 14:04:38 CEST 2008 - aosthof@suse.de

View File

@ -1,5 +1,5 @@
# #
# spec file for package perl-Bootloader (Version 0.4.63) # spec file for package perl-Bootloader (Version 0.4.64)
# #
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine # This file and all modifications and additions to the pristine
@ -12,11 +12,11 @@
Name: perl-Bootloader Name: perl-Bootloader
Version: 0.4.63 Version: 0.4.64
Release: 1 Release: 1
Requires: perl = %{perl_version} Requires: perl-base = %{perl_version}
Requires: perl-gettext
Requires: e2fsprogs Requires: e2fsprogs
Recommends: perl-gettext
AutoReqProv: on AutoReqProv: on
Group: System/Boot Group: System/Boot
License: GPL v2 or later License: GPL v2 or later
@ -67,6 +67,14 @@ install -m 755 %{SOURCE2} $RPM_BUILD_ROOT/usr/lib/bootloader
/usr/lib/bootloader /usr/lib/bootloader
%changelog %changelog
* Thu Jul 17 2008 jreidinger@suse.cz
- refactor pathnames, no it can be used
$PERL_BOOTLOADER_TESTSUITE_PATH variable for prefix
- fixed manpage warnings bnc#398538
- added fix for bnc#381386 to trunk
- perl-gettext is only reccomends (FATE #301805)
- read kernel parametrs from sysconfig (jsrain)
- Version bump to 0.4.64
* Wed Jun 04 2008 aosthof@suse.de * Wed Jun 04 2008 aosthof@suse.de
- Reverted the fix for minor bnc#389891 causing blocker bnc#395085 - Reverted the fix for minor bnc#389891 causing blocker bnc#395085
- Fixed perl dependency in perl-Bootloader.spec - Fixed perl dependency in perl-Bootloader.spec

View File

@ -4,7 +4,7 @@ use POSIX;
use Getopt::Long; use Getopt::Long;
use Pod::Usage; use Pod::Usage;
use Bootloader::Tools; use Bootloader::Tools;
use Locale::gettext; use Bootloader::Path;
use strict; use strict;
my %oper; my %oper;
@ -47,9 +47,12 @@ Needs a call to --refresh to take effect.
activate the new config e.g. write boot loader to disk activate the new config e.g. write boot loader to disk
=back
=head1 PARAMETER =head1 PARAMETER
=over 8
=item B<--help> =item B<--help>
Print a brief help message and exits. Print a brief help message and exits.
@ -162,7 +165,19 @@ sub GetProduct {
return "Linux"; return "Linux";
} }
my $logname = "/var/log/YaST2/perl-BL-standalone-log"; sub test_gettext {
my $filename = "Locale/gettext.pm";
my $realfilename;
foreach my $prefix (@INC) {
$realfilename = "$prefix/$filename";
if (-f $realfilename) {
return 1;
}
}
return undef
}
my $logname = Bootloader::Path::Logname();
open (LOG, ">>$logname"); open (LOG, ">>$logname");
print LOG ("update-bootloader called:\n" . $0 . " " . join (" ", @ARGV) . "\n"); print LOG ("update-bootloader called:\n" . $0 . " " . join (" ", @ARGV) . "\n");
close LOG; close LOG;
@ -269,7 +284,7 @@ if (defined $oper{add}) {
} }
# only localize on grub and lilo # only localize on grub and lilo
if ($loader eq "grub" || $loader eq "lilo") { if (($loader eq "grub" || $loader eq "lilo") && defined(test_gettext())) {
setlocale(LC_MESSAGES, Bootloader::Tools::GetSystemLanguage()); setlocale(LC_MESSAGES, Bootloader::Tools::GetSystemLanguage());
my $d = Locale::gettext->domain("bootloader"); my $d = Locale::gettext->domain("bootloader");
@ -277,6 +292,12 @@ if (defined $oper{add}) {
my $opt_trans = $d->get($opt_name); my $opt_trans = $d->get($opt_name);
chomp ($opt_trans); chomp ($opt_trans);
#log what is translated
my $logname = Bootloader::Path::Logname();
open (LOG, ">>$logname");
print LOG ("translate :\n" . $0 . " " . join (" ", @ARGV) . "\n");
close LOG;
# check whether translation only contains [a-zA-Z0-9 _] # check whether translation only contains [a-zA-Z0-9 _]
# otherwise fall back to untranslated string # otherwise fall back to untranslated string
if ($opt_trans =~ /^[a-zA-Z\d _]+$/g ) { if ($opt_trans =~ /^[a-zA-Z\d _]+$/g ) {