Hello community, here is the log from the commit of package suseRegister checked in at Mon Nov 3 14:26:11 CET 2008. -------- --- suseRegister/suseRegister.changes 2008-10-24 16:02:24.000000000 +0200 +++ /mounts/work_src_done/STABLE/suseRegister/suseRegister.changes 2008-10-30 17:12:18.216020000 +0100 @@ -1,0 +2,8 @@ +Thu Oct 30 14:26:03 CET 2008 - mc@suse.de + +- change the language enviroment variables only for + executing a command. (bnc#438104) +- do not call xenstore commands in dom0, + if xend isn't running. + +------------------------------------------------------------------- calling whatdependson for head-i586 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ suseRegister.spec ++++++ --- /var/tmp/diff_new_pack.ED2471/_old 2008-11-03 14:25:43.000000000 +0100 +++ /var/tmp/diff_new_pack.ED2471/_new 2008-11-03 14:25:43.000000000 +0100 @@ -20,7 +20,7 @@ Name: suseRegister Version: 1.3 -Release: 8 +Release: 9 Summary: Registration Tool Group: Productivity/Other License: GPL v2 or later @@ -89,6 +89,11 @@ /usr/lib/suseRegister/bin/* %changelog +* Thu Oct 30 2008 mc@suse.de +- change the language enviroment variables only for + executing a command. (bnc#438104) +- do not call xenstore commands in dom0, + if xend isn't running. * Fri Oct 24 2008 mc@suse.de - fix hypervisor detection: output format of lscpu changed * Tue Oct 21 2008 mc@suse.de ++++++ suseRegister-1.3.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/suseRegister-1.3/SRPrivate.pm new/suseRegister-1.3/SRPrivate.pm --- old/suseRegister-1.3/SRPrivate.pm 2008-10-24 15:52:38.000000000 +0200 +++ new/suseRegister-1.3/SRPrivate.pm 2008-10-30 17:11:28.000000000 +0100 @@ -2255,14 +2255,25 @@ my $err = ""; my $code = 0; + my $lang = $ENV{LANG}; + my $language = $ENV{LANGUAGE}; + + if(!defined $command || !-x $command) { return logPrintReturn($ctx, "invalid Command '$command'", 13) } - + + # set lang to en_US to get output in english. + $ENV{LANG} = "en_US"; + $ENV{LANGUAGE} = "en_US"; + + printLog($ctx, "debug1", "Execute command: $command ".join(" ",@arguments)); my $pid = open3(\*IN, \*OUT, \*ERR, $command, @arguments) or do { + $ENV{LANG} = $lang; + $ENV{LANGUAGE} = $language; return logPrintReturn($ctx, "Cannot execute $command ".join(" ", @arguments).": $!\n",13); }; if(defined $input) @@ -2287,6 +2298,9 @@ chomp($out); chomp($err); + $ENV{LANG} = $lang; + $ENV{LANGUAGE} = $language; + $code = ($?>>8); printLog($ctx, "debug1", "Execute command exit($code): $err"); @@ -2306,33 +2320,36 @@ if(-d "/proc/xen") { printLog($ctx, "debug2", "Found XEN"); - - if(-e $ctx->{xenstoreread}) + + if(-e "/proc/xen/xsd_port") { - my $err = ""; - my $val = ""; - - ($code, $err, $val) = executeCommand($ctx, $ctx->{xenstoreread}, undef, ("domid")); + printLog($ctx, "debug2", "We are Domain-0"); + + my $xend_running=0; + ($code, $err, $val) = executeCommand($ctx, "/etc/init.d/xend", undef, ("status")); + if($code == 0) + { + $xend_running = 1; + } - if($code == 0 && defined $val && $val eq "0") + # we are Domain-0 ; xenstored is required in domain 0 for xenstore-write... + if($xend_running && -e $ctx->{xenstorewrite} && -e $ctx->{xenstorechmod}) { - printLog($ctx, "debug2", "We are Domain-0"); + printLog($ctx, "debug1", "Write /tool/SR/HostDeviceID to xenbus"); - # we are Domain-0 - if(-e $ctx->{xenstorewrite} && -e $ctx->{xenstorechmod}) - { - printLog($ctx, "debug1", "Write /tool/SR/HostDeviceID to xenbus"); - - executeCommand($ctx, $ctx->{xenstorewrite}, undef, ("/tool/SR/HostDeviceID", "$ctx->{guid}")); - executeCommand($ctx, $ctx->{xenstorechmod}, undef, ("/tool/SR/HostDeviceID", "r")); - } + executeCommand($ctx, $ctx->{xenstorewrite}, undef, ("/tool/SR/HostDeviceID", "$ctx->{guid}")); + executeCommand($ctx, $ctx->{xenstorechmod}, undef, ("/tool/SR/HostDeviceID", "r")); } - elsif($code == 0 && defined $val && $val ne "") + } + else + { + $ctx->{virtType} = "Xen"; + $ctx->{hostGUID} = "Y"; + + if(-e $ctx->{xenstoreread}) { - $ctx->{virtType} = "Xen"; - printLog($ctx, "debug2", "try to read /tool/SR/HostDeviceID from xenbus"); - + ($code, $err, $val) = executeCommand($ctx, $ctx->{xenstoreread}, undef, ("/tool/SR/HostDeviceID")); if(defined $val && $val ne "") { @@ -2340,20 +2357,6 @@ $ctx->{hostGUID} = $val; } - else - { - $ctx->{hostGUID} = "Y"; - } - } - else - { - printLog($ctx, "debug1", "Cannot read from xenstore: $code"); - - if(! -e "proc/xen/xsd_port") - { - $ctx->{virtType} = "Xen"; - $ctx->{hostGUID} = "Y"; - } } } } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/suseRegister-1.3/SuseRegister.pm new/suseRegister-1.3/SuseRegister.pm --- old/suseRegister-1.3/SuseRegister.pm 2008-10-24 15:52:38.000000000 +0200 +++ new/suseRegister-1.3/SuseRegister.pm 2008-10-30 17:11:28.000000000 +0100 @@ -368,10 +368,6 @@ } } - # set LANG to en_US to get the error messages in english - $ENV{LANG} = "en_US"; - $ENV{LANGUAGE} = "en_US"; - # check for xen tools if(! -e $ctx->{xenstoreread} && -e "/bin/xenstore-read") ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org