Hello community,

here is the log from the commit of package yast2 for openSUSE:Factory checked 
in at 2014-02-06 07:00:54
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2 (Old)
 and      /work/SRC/openSUSE:Factory/.yast2.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2"

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2/yast2.changes      2014-01-31 
11:50:48.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.yast2.new/yast2.changes 2014-02-06 
07:00:55.000000000 +0100
@@ -1,0 +2,7 @@
+Wed Feb  5 11:26:09 CET 2014 - jsuch...@suse.cz
+
+- Check for Chef outside in the yast2 shell script to catch modules
+  not using CommandLine (bnc#803358)
+- 3.1.18
+
+-------------------------------------------------------------------

Old:
----
  yast2-3.1.17.tar.bz2

New:
----
  yast2-3.1.18.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ yast2.spec ++++++
--- /var/tmp/diff_new_pack.mVJFRY/_old  2014-02-06 07:00:55.000000000 +0100
+++ /var/tmp/diff_new_pack.mVJFRY/_new  2014-02-06 07:00:55.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2
-Version:        3.1.17
+Version:        3.1.18
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

++++++ yast2-3.1.17.tar.bz2 -> yast2-3.1.18.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-3.1.17/library/commandline/src/Makefile.am 
new/yast2-3.1.18/library/commandline/src/Makefile.am
--- old/yast2-3.1.17/library/commandline/src/Makefile.am        2014-01-30 
16:11:59.000000000 +0100
+++ new/yast2-3.1.18/library/commandline/src/Makefile.am        2014-02-05 
14:12:29.000000000 +0100
@@ -3,12 +3,15 @@
 module_DATA = \
   modules/CommandLine.rb
 
+client_DATA = \
+  clients/other_tools_warning.rb
+
 scrconf_DATA = \
   scrconf/tty.scr
 
 agent_SCRIPTS = \
   servers_non_y2/ag_tty
 
-EXTRA_DIST = $(module_DATA) $(scrconf_DATA) $(agent_SCRIPTS)
+EXTRA_DIST = $(module_DATA) $(scrconf_DATA) $(agent_SCRIPTS) $(client_DATA)
 
-include $(top_srcdir)/Makefile.am.common
\ No newline at end of file
+include $(top_srcdir)/Makefile.am.common
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-3.1.17/library/commandline/src/clients/other_tools_warning.rb 
new/yast2-3.1.18/library/commandline/src/clients/other_tools_warning.rb
--- old/yast2-3.1.17/library/commandline/src/clients/other_tools_warning.rb     
1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-3.1.18/library/commandline/src/clients/other_tools_warning.rb     
2014-02-05 14:12:29.000000000 +0100
@@ -0,0 +1,55 @@
+# encoding: utf-8
+
+# ***************************************************************************
+#
+# Copyright (c) 2014 SUSE LLC
+# All Rights Reserved.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of version 2 of the GNU General Public License as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.   See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, contact Novell, Inc.
+#
+# To contact Novell about this file by physical or electronic mail,
+# you may find current contact information at www.novell.com
+#
+# ***************************************************************************
+
+#*
+# There may be different ways to configure the system than YaST, e.g. Chef.
+# It will periodically overwrite files under its control.
+# If it is running, now is a good time to tell the user
+# and ask if she wants to proceed with YaST anyway.
+# We do not try to find out which files these are and ask
+# before any interactive YaST module.
+# See bnc#803358
+
+module Yast
+  class OtherToolsWarningClient < Client
+    def main
+      Yast.import "Popup"
+      textdomain "base"
+
+      if WFM.Args().include? "chef"
+        # Translators: a warning message in a continue-cancel question
+        # Opscode Chef is a different way to configure the system.
+        message = _(
+           "Chef Client is running. The changes that you make\n" +
+             "may be overridden by Chef later.\n" +
+             "Continue configuration with YaST?"
+        )
+        return Popup.ContinueCancel(message)
+      end
+
+    end
+  end
+end
+
+Yast::OtherToolsWarningClient.new.main
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-3.1.17/library/commandline/src/modules/CommandLine.rb 
new/yast2-3.1.18/library/commandline/src/modules/CommandLine.rb
--- old/yast2-3.1.17/library/commandline/src/modules/CommandLine.rb     
2014-01-30 16:11:59.000000000 +0100
+++ new/yast2-3.1.18/library/commandline/src/modules/CommandLine.rb     
2014-02-05 14:12:29.000000000 +0100
@@ -1542,37 +1542,6 @@
       ret
     end
 
-     def ChefIsRunning
-       SCR.Execute(path(".target.bash"), "pgrep -fl chef-client") == 0
-     end
- 
-     # Chef is a different way to configure the system.
-     # It will periodically overwrite files under its control.
-     # If it is running, now is a good time to tell the user
-     # and ask if she wants to proceed with YaST anyway.
-     # We do not try to find out which files these are and ask
-     # before any interactive YaST module.
-     # bnc#803358
-     # @return true if we can go on: chef not running, or if the user
-     #              wants to continue anyway
-     def IgnoreOtherConfigTools
-       if ChefIsRunning()
-         # Translators: a warning message in a continue-cancel question
-         # Opscode Chef is a different way to configure the system.
-         message = _(
-           "Chef Client is running. The changes that you make\n" +
-             "may be overridden by Chef later.\n" +
-             "Continue configuration with YaST?"
-         )
-         return Popup.ContinueCancel(message)
-       end
- 
-       # if we want to check other tools (Puppet?) add them here
- 
-       # no conflicting tool found
-       true
-     end
-
     # Parse the Command Line
     #
     # Function to parse the command line, start a GUI or handle interactive and
@@ -1613,9 +1582,6 @@
           return false
         end
 
-        # A hacky bail-out hook before interactive modules
-        return false unless IgnoreOtherConfigTools()
-
         if Ops.is(Ops.get(commandline, "guihandler"), "symbol ()")
           exec = Convert.convert(
             Ops.get(commandline, "guihandler"),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-3.1.17/package/yast2.changes 
new/yast2-3.1.18/package/yast2.changes
--- old/yast2-3.1.17/package/yast2.changes      2014-01-30 16:11:59.000000000 
+0100
+++ new/yast2-3.1.18/package/yast2.changes      2014-02-05 14:12:29.000000000 
+0100
@@ -1,4 +1,11 @@
 -------------------------------------------------------------------
+Wed Feb  5 11:26:09 CET 2014 - jsuch...@suse.cz
+
+- Check for Chef outside in the yast2 shell script to catch modules
+  not using CommandLine (bnc#803358)
+- 3.1.18
+
+-------------------------------------------------------------------
 Thu Jan 30 09:27:43 UTC 2014 - mfi...@suse.com
 
 - bnc#861078
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-3.1.17/package/yast2.spec 
new/yast2-3.1.18/package/yast2.spec
--- old/yast2-3.1.17/package/yast2.spec 2014-01-30 16:11:59.000000000 +0100
+++ new/yast2-3.1.18/package/yast2.spec 2014-02-05 14:12:29.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2
-Version:        3.1.17
+Version:        3.1.18
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-3.1.17/scripts/yast2 
new/yast2-3.1.18/scripts/yast2
--- old/yast2-3.1.17/scripts/yast2      2014-01-30 16:11:59.000000000 +0100
+++ new/yast2-3.1.18/scripts/yast2      2014-02-05 14:12:29.000000000 +0100
@@ -187,6 +187,41 @@
     fi
 }
 
+chef_is_running ()
+{
+  pgrep -fl chef-client >/dev/null
+}
+
+# ask user if he want to continue despite there is chef-client running
+# return 0 if user decided to continue
+chef_warning_continue ()
+{
+  $ybindir/y2base other_tools_warning -S "(chef)" "$SELECTED_GUI" $Y2_GEOMETRY 
$Y2UI_ARGS
+}
+
+# Check if chef-client is running and warn user about it (bnc#803358)
+# Returns 0 if user confirmed the conflict and wants to exit before starting 
YaST.
+# (check for other tools (like puppet) may be added here)
+other_tools_are_conflicting ()
+{
+  # - no need to check for installation/firstboot, they are started directly 
with y2base
+
+  if ! chef_is_running; then
+    return 1
+  fi
+
+  # existing arguments for yast module = CLI mode
+  # continue, but print a warning
+  if [ -n "$1"  ]; then
+    echo "Warning: Chef Client is running. Your changes may be overridden by 
Chef later." >&2
+    return 1
+  fi
+
+  if chef_warning_continue; then
+    return 1
+  fi
+  return 0
+}
 
 TEMP=`/usr/bin/getopt -o hlg:s:Si --long 
help,list,kcontrol,geometry:,style:,strings,install,update,remove,fullscreen,noborder,qt,gtk,ncurses
 \
      -n 'yast2' -- "$@"`
@@ -368,6 +403,8 @@
 if [ $module == "menu" -a -x "$y2ccbin" ] ; then
     $y2ccbin $Y2UI_ARGS "$@"
     exit_code=$?
+elif test $module != "menu" && other_tools_are_conflicting "$@" ; then
+    exit_code=1
 else
     # In case YaST has to be restarted, create this file
     # and exit. Script that creates the file should also

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to