Hello community,

here is the log from the commit of package yast2-inetd for openSUSE:Factory 
checked in at 2014-05-06 13:40:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-inetd (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-inetd.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-inetd"

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-inetd/yast2-inetd.changes  2014-04-05 
14:42:49.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-inetd.new/yast2-inetd.changes     
2014-05-06 13:40:45.000000000 +0200
@@ -1,0 +2,8 @@
+Mon May  5 13:21:51 CEST 2014 - [email protected]
+
+- Replaced obsolete Service.* calls with new ones
+- Inetd.netd_status* are now boolean values
+- Adapted testsuite
+- 3.1.5
+
+-------------------------------------------------------------------

Old:
----
  yast2-inetd-3.1.4.tar.bz2

New:
----
  yast2-inetd-3.1.5.tar.bz2

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

Other differences:
------------------
++++++ yast2-inetd.spec ++++++
--- /var/tmp/diff_new_pack.O6MBf4/_old  2014-05-06 13:40:46.000000000 +0200
+++ /var/tmp/diff_new_pack.O6MBf4/_new  2014-05-06 13:40:46.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-inetd
-Version:        3.1.4
+Version:        3.1.5
 Release:        0
 Url:            https://github.com/yast/yast-inetd
 

++++++ yast2-inetd-3.1.4.tar.bz2 -> yast2-inetd-3.1.5.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-inetd-3.1.4/package/yast2-inetd.changes 
new/yast2-inetd-3.1.5/package/yast2-inetd.changes
--- old/yast2-inetd-3.1.4/package/yast2-inetd.changes   2014-03-28 
14:34:06.000000000 +0100
+++ new/yast2-inetd-3.1.5/package/yast2-inetd.changes   2014-05-05 
13:49:49.000000000 +0200
@@ -1,4 +1,12 @@
 -------------------------------------------------------------------
+Mon May  5 13:21:51 CEST 2014 - [email protected]
+
+- Replaced obsolete Service.* calls with new ones
+- Inetd.netd_status* are now boolean values
+- Adapted testsuite
+- 3.1.5
+
+-------------------------------------------------------------------
 Fri Mar 28 09:56:24 UTC 2014 - [email protected]
 
 - Fix failing testsuite
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-inetd-3.1.4/package/yast2-inetd.spec 
new/yast2-inetd-3.1.5/package/yast2-inetd.spec
--- old/yast2-inetd-3.1.4/package/yast2-inetd.spec      2014-03-28 
14:34:06.000000000 +0100
+++ new/yast2-inetd-3.1.5/package/yast2-inetd.spec      2014-05-05 
13:49:49.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-inetd
-Version:        3.1.4
+Version:        3.1.5
 Release:        0
 Url:            https://github.com/yast/yast-inetd
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-inetd-3.1.4/src/clients/inetd_auto.rb 
new/yast2-inetd-3.1.5/src/clients/inetd_auto.rb
--- old/yast2-inetd-3.1.4/src/clients/inetd_auto.rb     2014-03-28 
14:34:06.000000000 +0100
+++ new/yast2-inetd-3.1.5/src/clients/inetd_auto.rb     2014-05-05 
13:49:49.000000000 +0200
@@ -100,7 +100,7 @@
         @po = Progress.set(false)
         @ret = Inetd.Read
         Progress.set(@po)
-        Inetd.netd_status = Service.Status("xinetd")
+        Inetd.netd_status = Service.active?("xinetd")
         Inetd.netd_conf = Builtins.maplist(Inetd.netd_conf) do |s|
           Builtins.add(s, "changed", true)
         end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-inetd-3.1.4/src/include/inetd/dialogs.rb 
new/yast2-inetd-3.1.5/src/include/inetd/dialogs.rb
--- old/yast2-inetd-3.1.4/src/include/inetd/dialogs.rb  2014-03-28 
14:34:06.000000000 +0100
+++ new/yast2-inetd-3.1.5/src/include/inetd/dialogs.rb  2014-05-05 
13:49:49.000000000 +0200
@@ -426,7 +426,7 @@
       new_state = false
 
       # if service active, enable editting
-      new_state = true if Inetd.netd_status == 0
+      new_state = Inetd.netd_status
       UI.ChangeWidget(Id(:editable), :Value, new_state)
       UI.ChangeWidget(Id(:table), :Enabled, new_state)
       UI.ChangeWidget(Id(:create), :Enabled, new_state)
@@ -468,11 +468,7 @@
           UI.ChangeWidget(Id(:toggle_menu), :Enabled, new_state2)
           UI.ChangeWidget(Id(:switch_active), :Enabled, new_state2)
 
-          if new_state2
-            Inetd.netd_status = 0
-          else
-            Inetd.netd_status = -1
-          end
+          Inetd.netd_status = new_state2
         # create new entry
         elsif ret == :create
           selected_item = Convert.to_string(
@@ -779,8 +775,8 @@
       end
 
       if ret == :next
-        if Inetd.netd_status == 0 && IsAnyServiceEnabled(Inetd.netd_conf) == 
:no
-          Inetd.netd_status = -1
+        if Inetd.netd_status && IsAnyServiceEnabled(Inetd.netd_conf) == :no
+          Inetd.netd_status = false
           # Translators: Popup::Warning
           Popup.Warning(
             _(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-inetd-3.1.4/src/include/inetd/routines.rb 
new/yast2-inetd-3.1.5/src/include/inetd/routines.rb
--- old/yast2-inetd-3.1.4/src/include/inetd/routines.rb 2014-03-28 
14:34:06.000000000 +0100
+++ new/yast2-inetd-3.1.5/src/include/inetd/routines.rb 2014-05-05 
13:49:49.000000000 +0200
@@ -30,6 +30,8 @@
 # $Id$
 module Yast
   module InetdRoutinesInclude
+    TCPD_BINARY = "/usr/sbin/tcpd"
+
     def initialize_inetd_routines(include_target)
       Yast.import "UI"
 
@@ -68,27 +70,26 @@
       nil
     end
 
-    # Used for cpmparisons whether the servers match:
+    # Used for comparisons whether the servers match:
     # If server is /usr/sbin/tcpd, consider server_args instead.
-    # Then take the firse word (strips arguments or the parenthesized pkg 
name).
+    # Then take the first word (strips arguments or the parenthesized pkg 
name).
     # Then take the last slash-delimited component.
     # For sparse matching: nil is returned if server is nil
     # (or if server args is nil AND is needed)
+    #
     # @param [String] server "server" field of a service
     # @param [String] server_args "server_args" field of a service
     # @return basename of the real server
     def GetServerBasename(server, server_args)
-      result = server
-      # discard tcpd
-      result = server_args if result == "/usr/sbin/tcpd"
+      result = (server == TCPD_BINARY ? server_args : server).dup
+
       # check nil
-      if result != nil
-        # program only
-        result = String.FirstChunk(result, " \t")
-        # basename
-        comp = Builtins.splitstring(result, "/")
-        result = Ops.get(comp, Ops.subtract(Builtins.size(comp), 1), "")
+      if result && !result.empty?
+        # find the server name
+        server_path = result.strip.split(/[ \t]/).first
+        result = File.basename(server_path)
       end
+
       result
     end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-inetd-3.1.4/src/modules/Inetd.rb 
new/yast2-inetd-3.1.5/src/modules/Inetd.rb
--- old/yast2-inetd-3.1.4/src/modules/Inetd.rb  2014-03-28 14:34:06.000000000 
+0100
+++ new/yast2-inetd-3.1.5/src/modules/Inetd.rb  2014-05-05 13:49:49.000000000 
+0200
@@ -157,7 +157,7 @@
 
       # Is xinetd running?
       # These variables contains return values from Service::Status() calls.
-      @netd_status = -1
+      @netd_status = false
       @netd_status_read = @netd_status
 
       # This variable is used for new iid "generator"
@@ -205,7 +205,7 @@
         :to   => "list <map <string, any>>"
       )
 
-      @netd_status = Service.Status("xinetd")
+      @netd_status = Service.active?("xinetd")
       @netd_status_read = @netd_status
 
       return false if Abort()
@@ -283,7 +283,8 @@
 
       if @write_only
         # enable/disable the current service
-        Service.Adjust("xinetd", @netd_status == 0 ? "enable" : "disable")
+        @netd_status ? Service.enable("xinetd") : Service.disable("xinetd")
+
         # YUCK, looks like autoinst part, should be done in inetd_auto.ycp
         new_conf = []
         new_conf = Convert.convert(
@@ -296,13 +297,13 @@
       else
         SCR.Write(path(".etc.xinetd_conf.services"), @netd_conf)
 
-        if @netd_status != 0
-          if @netd_status_read == 0
+        if @netd_status
+          if !@netd_status_read
             Builtins.y2milestone(
               "%1 was running --- stoping and disabling service",
               "xinetd"
             )
-            Service.Stop("xinetd") if !@write_only
+            Service.Stop("xinetd") unless @write_only
             Service.Disable("xinetd")
           else
             Builtins.y2milestone(
@@ -312,18 +313,18 @@
           end
         else
           # current is running - only reload
-          if @netd_status_read == 0
+          if @netd_status_read
             Builtins.y2milestone(
-              "%1 was running --- calling force-reload",
+              "%1 was running --- calling reload",
               "xinetd"
             )
-            Service.RunInitScript("xinetd", "force-reload") if !@write_only
+            Service.reload("xinetd") unless @write_only
           else
             Builtins.y2milestone(
               "%1 was stopped --- enabling and starting service",
               "xinetd"
             )
-            Service.Start("xinetd") if !@write_only
+            Service.Start("xinetd") unless @write_only
             Service.Enable("xinetd")
           end
         end
@@ -475,7 +476,8 @@
       settings = deep_copy(settings)
       #y2milestone("settings = %1", settings);
       @netd_conf = mergeWithDefaults(Ops.get_list(settings, "netd_conf", []))
-      @netd_status = Ops.get_integer(settings, "netd_status", -1)
+      # old profile can still use integer value (0 == true)
+      @netd_status = [0, true].include?(settings["netd_status"])
 
       # common variables
       @last_created = Ops.get_integer(settings, "last_created", 0)
@@ -577,7 +579,6 @@
     # (For use by autoinstallation.)
     # @return [Hash] Dumped settings (later acceptable by Import ())
     def Export
-      #    sleep(3000);
       config = {}
       config = Builtins.add(config, "netd_conf", getChanged(@netd_conf))
       config = Builtins.add(config, "netd_status", @netd_status)
@@ -790,8 +791,8 @@
     publish :variable => :auto_mode, :type => "boolean"
     publish :variable => :autoyast_initialized, :type => "boolean"
     publish :variable => :netd_conf, :type => "list <map <string, any>>"
-    publish :variable => :netd_status, :type => "integer"
-    publish :variable => :netd_status_read, :type => "integer"
+    publish :variable => :netd_status, :type => "boolean"
+    publish :variable => :netd_status_read, :type => "boolean"
     publish :variable => :last_created, :type => "integer"
     publish :function => :Read, :type => "boolean ()"
     publish :function => :MergeEditedWithSystem, :type => "list <map <string, 
any>> (list <map <string, any>>, list <map <string, any>>)"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-inetd-3.1.4/testsuite/tests/Inetd.out 
new/yast2-inetd-3.1.5/testsuite/tests/Inetd.out
--- old/yast2-inetd-3.1.4/testsuite/tests/Inetd.out     2014-03-28 
14:34:06.000000000 +0100
+++ new/yast2-inetd-3.1.5/testsuite/tests/Inetd.out     2014-05-05 
13:49:49.000000000 +0200
@@ -5,7 +5,6 @@
 Dump   Read  --- read all services
 Dump   
 Read   .etc.xinetd_conf.services [$["comment":"My service", "enabled":true, 
"iid":"whatever", "protocol":"tcp", "server":"/usr/sbin/tcpd", 
"server_args":"in.fingerd -w", "service":"finger", "socket_type":"stream", 
"user":"nobody", "wait":false]]
-Log    [DEPRECIATION] `Status' is deprecated; use `active?` instead
 Return true
 Dump   
 Dump   Write --- write services
@@ -21,7 +20,6 @@
 Dump   Read  --- read all services
 Dump   
 Read   .etc.xinetd_conf.services [$["comment":"My service", "enabled":true, 
"iid":"whatever", "protocol":"tcp", "server":"/usr/sbin/tcpd", 
"server_args":"in.fingerd -w", "service":"finger", "socket_type":"stream", 
"user":"nobody", "wait":false]]
-Log    [DEPRECIATION] `Status' is deprecated; use `active?` instead
 Return true
 Dump   
 Dump   Write --- write xinetd
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-inetd-3.1.4/testsuite/tests/Inetd2.out 
new/yast2-inetd-3.1.5/testsuite/tests/Inetd2.out
--- old/yast2-inetd-3.1.4/testsuite/tests/Inetd2.out    2014-03-28 
14:34:06.000000000 +0100
+++ new/yast2-inetd-3.1.5/testsuite/tests/Inetd2.out    2014-05-05 
13:49:49.000000000 +0200
@@ -5,7 +5,6 @@
 Dump   Read  --- read all services
 Dump   
 Read   .etc.xinetd_conf.services nil
-Log    [DEPRECIATION] `Status' is deprecated; use `active?` instead
 Return true
 Dump   
 Dump   Write --- write inetd
@@ -20,7 +19,6 @@
 Dump   Read  --- read all services
 Dump   
 Read   .etc.xinetd_conf.services nil
-Log    [DEPRECIATION] `Status' is deprecated; use `active?` instead
 Return true
 Dump   
 Dump   Write --- write inetd
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-inetd-3.1.4/testsuite/tests/Inetd3.out 
new/yast2-inetd-3.1.5/testsuite/tests/Inetd3.out
--- old/yast2-inetd-3.1.4/testsuite/tests/Inetd3.out    2014-03-28 
14:34:06.000000000 +0100
+++ new/yast2-inetd-3.1.5/testsuite/tests/Inetd3.out    2014-05-05 
13:49:49.000000000 +0200
@@ -2,7 +2,6 @@
 Dump   Read  --- read all services
 Dump   
 Read   .etc.xinetd_conf.services [$["comment":"My service", "enabled":true, 
"iid":"whatever", "protocol":"tcp", "server":"/usr/sbin/tcpd", 
"server_args":"in.fingerd -w", "service":"finger", "socket_type":"stream", 
"user":"nobody", "wait":false]]
-Log    [DEPRECIATION] `Status' is deprecated; use `active?` instead
 Return true
 Dump   
 Dump   Write --- write xinetd
@@ -12,7 +11,6 @@
 Dump     ---
 Dump   
 Read   .etc.xinetd_conf.services [$["comment":"My service", "enabled":true, 
"iid":"whatever", "protocol":"tcp", "server":"/usr/sbin/tcpd", 
"server_args":"in.fingerd -w", "service":"finger", "socket_type":"stream", 
"user":"nobody", "wait":false]]
-Log    [DEPRECIATION] `Status' is deprecated; use `active?` instead
 Return true
 Dump   
 Dump   Write --- write xinetd

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to