[yast-commit] r45827 - in /trunk/samba-client: VERSION package/yast2-samba-client.changes src/Samba.ycp src/SambaConfig.pm src/complex.ycp
Author: jsuchome Date: Fri Mar 28 12:58:54 2008 New Revision: 45827 URL: http://svn.opensuse.org/viewcvs/yast?rev=45827&view=rev Log: - do not check for required packages during Read (bnc#374703) - SambaConfig: do not create the hash by referencing inside - 2.16.3 Modified: trunk/samba-client/VERSION trunk/samba-client/package/yast2-samba-client.changes trunk/samba-client/src/Samba.ycp trunk/samba-client/src/SambaConfig.pm trunk/samba-client/src/complex.ycp Modified: trunk/samba-client/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/samba-client/VERSION?rev=45827&r1=45826&r2=45827&view=diff ============================================================================== --- trunk/samba-client/VERSION (original) +++ trunk/samba-client/VERSION Fri Mar 28 12:58:54 2008 @@ -1 +1 @@ -2.16.2 +2.16.3 Modified: trunk/samba-client/package/yast2-samba-client.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/samba-client/package/yast2-samba-client.changes?rev=45827&r1=45826&r2=45827&view=diff ============================================================================== --- trunk/samba-client/package/yast2-samba-client.changes (original) +++ trunk/samba-client/package/yast2-samba-client.changes Fri Mar 28 12:58:54 2008 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Fri Mar 28 12:52:34 CET 2008 - jsuchome@suse.cz + +- do not check for required packages during Read (bnc#374703) +- SambaConfig: do not create the hash by referencing inside +- 2.16.3 + +------------------------------------------------------------------- Mon Mar 17 12:43:32 CET 2008 - jsrain@suse.cz - added 'StartupNotify=true' to the desktop file (bnc #304964) Modified: trunk/samba-client/src/Samba.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/samba-client/src/Samba.ycp?rev=45827&r1=45826&r2=45827&view=diff ============================================================================== --- trunk/samba-client/src/Samba.ycp (original) +++ trunk/samba-client/src/Samba.ycp Fri Mar 28 12:58:54 2008 @@ -21,7 +21,6 @@ import "NetworkConfig"; import "Mode"; import "Package"; -import "PackageSystem"; import "Pam"; import "Progress"; import "Report"; @@ -243,7 +242,7 @@ global define boolean ReadSharesSetting () { shares_dir = SambaConfig::GlobalGetStr ("usershare path", shares_dir); - if (FileUtils::Exists (shares_dir)) + if (shares_dir != nil && FileUtils::Exists (shares_dir)) { map stat = (map) SCR::Read (.target.stat, shares_dir); map out = (map) SCR::Execute (.target.bash_output, sformat ("getent group | grep \":%1:\" | /usr/bin/cut -f 1 -d :", stat["gid"]:100)); @@ -425,14 +424,6 @@ // read global settings Progress::NextStage(); - // check installed packages - if (!PackageSystem::CheckAndInstallPackagesInteractive( - UpdatedArchPackages (["samba-client"]))) - { - y2warning("package samba-client not installed"); - return false; - } - SambaConfig::Read(false); // read winbind status Modified: trunk/samba-client/src/SambaConfig.pm URL: http://svn.opensuse.org/viewcvs/yast/trunk/samba-client/src/SambaConfig.pm?rev=45827&r1=45826&r2=45827&view=diff ============================================================================== --- trunk/samba-client/src/SambaConfig.pm (original) +++ trunk/samba-client/src/SambaConfig.pm Fri Mar 28 12:58:54 2008 @@ -23,8 +23,10 @@ textdomain "samba-client"; our %TYPEINFO; -YaST::YCP::Import("SCR"); +YaST::YCP::Import("FileUtils"); YaST::YCP::Import("Mode"); +YaST::YCP::Import("SCR"); +YaST::YCP::Import("PackageSystem"); ########################################################################### @@ -159,6 +161,11 @@ sub Read { my ($self, $forceReRead) = @_; + if (!PackageSystem->Installed("samba-client")) { + y2error("package samba-client not installed"); + return 0; + } + # configuraton already read return 1 if not $forceReRead and %Config; @@ -202,7 +209,10 @@ %WinbindConfig = (); # read the complete global section - $AllAtOnce = SCR->Read(".etc.security_winbind.all"); + $AllAtOnce = {}; + if (FileUtils->Exists ("/etc/security/winbind.conf")) { + $AllAtOnce = SCR->Read(".etc.security_winbind.all"); + } # convert .ini agent all-at-once map to %WinbindConfig foreach my $section (@{$AllAtOnce->{value}}) { @@ -318,7 +328,7 @@ # commit the changes if (!SCR->Write(".etc.security_winbind", undef)) { - y2error("Cannot write settings to /etc/samba/smb.conf"); + y2error("Cannot write settings to /etc/security/winbind.conf"); return 0; } return 1; @@ -553,7 +563,7 @@ $val = toboolean($val); return defined $val ? ($val ? "No" : "Yes") : $default; } - if (defined $Config{$share}{$key}) { + if (defined $Config{$share} && $Config{$share}{$key}) { if (ref $Config{$share}{$key} eq "ARRAY") { return $Config{$share}{$key}[0]; } @@ -586,7 +596,7 @@ return [$val]; } } - if (defined $Config{$share}{$key}) { + if (defined $Config{$share} && $Config{$share}{$key}) { if (ref $Config{$share}{$key} eq "ARRAY") { return $Config{$share}{$key}; } @@ -1031,7 +1041,8 @@ } $key = lc($key); $key = $Synonyms{$key} if exists $Synonyms{$key}; - if (defined $WinbindConfig{$share}{$key}) { + if (defined $WinbindConfig{$share} && defined $WinbindConfig{$share}{$key}) + { if (ref $WinbindConfig{$share}{$key} eq "ARRAY") { return $WinbindConfig{$share}{$key}[0]; } Modified: trunk/samba-client/src/complex.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/samba-client/src/complex.ycp?rev=45827&r1=45826&r2=45827&view=diff ============================================================================== --- trunk/samba-client/src/complex.ycp (original) +++ trunk/samba-client/src/complex.ycp Fri Mar 28 12:58:54 2008 @@ -11,9 +11,10 @@ textdomain "samba-client"; +import "PackageSystem"; +import "Samba"; import "Wizard"; -import "Samba"; include "samba-client/helps.ycp"; include "samba-client/routines.ycp"; @@ -32,6 +33,15 @@ */ symbol ReadDialog() { Wizard::RestoreHelp(HELPS["read"]:""); + + // check installed packages + if (!PackageSystem::CheckAndInstallPackagesInteractive( + Samba::UpdatedArchPackages (["samba-client"]))) + { + y2warning("package samba-client not installed"); + return `abort; + } + boolean ret = Samba::Read(); return ret ? `next : `abort; } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
jsuchome@svn.opensuse.org