Hello community, here is the log from the commit of package yast2-users for openSUSE:Factory checked in at 2014-05-26 10:28:04 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-users (Old) and /work/SRC/openSUSE:Factory/.yast2-users.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "yast2-users" Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-users/yast2-users.changes 2014-05-17 22:01:29.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.yast2-users.new/yast2-users.changes 2014-05-26 10:28:05.000000000 +0200 @@ -1,0 +2,7 @@ +Fri May 23 14:57:15 CEST 2014 - schubi@suse.de + +- Generating user section in autoinst.xml file + (bnc#877985) +- 3.1.25 + +------------------------------------------------------------------- Old: ---- yast2-users-3.1.24.tar.bz2 New: ---- yast2-users-3.1.25.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-users.spec ++++++ --- /var/tmp/diff_new_pack.uPrnBu/_old 2014-05-26 10:28:06.000000000 +0200 +++ /var/tmp/diff_new_pack.uPrnBu/_new 2014-05-26 10:28:06.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2-users -Version: 3.1.24 +Version: 3.1.25 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build ++++++ yast2-users-3.1.24.tar.bz2 -> yast2-users-3.1.25.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-users-3.1.24/package/yast2-users.changes new/yast2-users-3.1.25/package/yast2-users.changes --- old/yast2-users-3.1.24/package/yast2-users.changes 2014-05-13 15:03:46.000000000 +0200 +++ new/yast2-users-3.1.25/package/yast2-users.changes 2014-05-23 15:03:45.000000000 +0200 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Fri May 23 14:57:15 CEST 2014 - schubi@suse.de + +- Generating user section in autoinst.xml file + (bnc#877985) +- 3.1.25 + +------------------------------------------------------------------- Tue May 13 13:32:22 CEST 2014 - jsuchome@suse.cz - added Test Keyboard Layout field into current root password dialog diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-users-3.1.24/package/yast2-users.spec new/yast2-users-3.1.25/package/yast2-users.spec --- old/yast2-users-3.1.24/package/yast2-users.spec 2014-05-13 15:03:46.000000000 +0200 +++ new/yast2-users-3.1.25/package/yast2-users.spec 2014-05-23 15:03:45.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2-users -Version: 3.1.24 +Version: 3.1.25 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-users-3.1.24/src/clients/users_auto.rb new/yast2-users-3.1.25/src/clients/users_auto.rb --- old/yast2-users-3.1.24/src/clients/users_auto.rb 2014-05-13 15:03:46.000000000 +0200 +++ new/yast2-users-3.1.25/src/clients/users_auto.rb 2014-05-23 15:03:45.000000000 +0200 @@ -43,6 +43,7 @@ textdomain "users" Yast.import "Mode" Yast.import "Users" + Yast.import "UsersSimple" Yast.import "Wizard" Yast.include self, "users/wizards.rb" @@ -104,7 +105,22 @@ @ret = AutoSequence(@start_dialog) Wizard.CloseDialog elsif @func == "Export" + if Stage.initial + # Importing all users/groups from the UI if we are + # in the installation workflow + Users.SetExportAll(true) + setup_all_users + end + @ret = Users.Export + + if Stage.initial + #Setting root password in the return value. We are in the inst_sys. + #The root password has not been written but is only available in + #UserSimple model. We have to set it manually. + root = @ret["users"].find { |u| u["uid"] == "0" } + root["user_password"] = Users.CryptPassword(UsersSimple.GetRootPassword, "system") if root + end Users.SetExportAll(false) elsif @func == "Read" Yast.import "Progress" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-users-3.1.24/src/clients/users_finish.rb new/yast2-users-3.1.25/src/clients/users_finish.rb --- old/yast2-users-3.1.24/src/clients/users_finish.rb 2014-05-13 15:03:46.000000000 +0200 +++ new/yast2-users-3.1.25/src/clients/users_finish.rb 2014-05-23 15:03:45.000000000 +0200 @@ -68,31 +68,13 @@ [:installation, :live_installation, :autoinst] } elsif @func == "Write" - # disable UI (progress) - Users.SetGUI(false) + # Creating all users and their environment # write the root password UsersSimple.Write - @users = UsersSimple.GetUsers - - if !@users.empty? - Users.Read - Users.ResetCurrentUser - Builtins.y2milestone("There are #{@users.size} users to import") - - create_users(@users) - - if UsersSimple.AutologinUsed - Autologin.user = UsersSimple.GetAutologinUser - Autologin.Use(true) - end - - root_alias = UsersSimple.GetRootAlias - Users.AddRootAlias(root_alias) unless root_alias.empty? - - Users.Write - end + other_users = setup_all_users + Users.Write if other_users else Builtins.y2error("unknown function: %1", @func) end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-users-3.1.24/src/include/users/routines.rb new/yast2-users-3.1.25/src/include/users/routines.rb --- old/yast2-users-3.1.24/src/include/users/routines.rb 2014-05-13 15:03:46.000000000 +0200 +++ new/yast2-users-3.1.25/src/include/users/routines.rb 2014-05-23 15:03:45.000000000 +0200 @@ -137,4 +137,39 @@ end end end + + # setup ALL users (included root user, autologin, root aliases,...) + # Return: true if there has been added a user + def setup_all_users + ret = false + + # disable UI (progress) + old_gui = Users.GetGUI + Users.SetGUI(false) + + users = UsersSimple.GetUsers + + if !users.empty? + Users.Read + Users.ResetCurrentUser + Builtins.y2milestone("There are #{users.size} users to import") + + create_users(users) + + #resetting Autologin settings + Autologin.Disable + + if UsersSimple.AutologinUsed + Autologin.user = UsersSimple.GetAutologinUser + Autologin.Use(true) + end + + root_alias = UsersSimple.GetRootAlias + Users.AddRootAlias(root_alias) unless root_alias.empty? + ret = true + end + Users.SetGUI(old_gui) + ret + end + end -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org