Hello community,

here is the log from the commit of package yast2-nfs-server for 
openSUSE:Factory checked in at 2020-01-30 09:40:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-nfs-server (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-nfs-server.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-nfs-server"

Thu Jan 30 09:40:28 2020 rev:59 rq:766901 version:4.2.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-nfs-server/yast2-nfs-server.changes        
2020-01-20 22:49:30.107206344 +0100
+++ 
/work/SRC/openSUSE:Factory/.yast2-nfs-server.new.26092/yast2-nfs-server.changes 
    2020-01-30 09:41:22.657489360 +0100
@@ -1,0 +2,8 @@
+Thu Jan 23 14:54:17 UTC 2020 - Josef Reidinger <jreidin...@suse.com>
+
+- Fix exit codes for CLI (bsc#1142979)
+- nicer error messages when CLI is wrongly used or failed
+  (bsc#1142979)
+- 4.2.4
+
+-------------------------------------------------------------------

Old:
----
  yast2-nfs-server-4.2.3.tar.bz2

New:
----
  yast2-nfs-server-4.2.4.tar.bz2

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

Other differences:
------------------
++++++ yast2-nfs-server.spec ++++++
--- /var/tmp/diff_new_pack.WlMbxA/_old  2020-01-30 09:41:23.349489731 +0100
+++ /var/tmp/diff_new_pack.WlMbxA/_new  2020-01-30 09:41:23.349489731 +0100
@@ -20,7 +20,7 @@
 Summary:        YaST2 - NFS Server Configuration
 License:        GPL-2.0-or-later
 Group:          System/YaST
-Version:        4.2.3
+Version:        4.2.4
 Release:        0
 URL:            https://github.com/yast/yast-nfs-server
 

++++++ yast2-nfs-server-4.2.3.tar.bz2 -> yast2-nfs-server-4.2.4.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-nfs-server-4.2.3/package/yast2-nfs-server.changes 
new/yast2-nfs-server-4.2.4/package/yast2-nfs-server.changes
--- old/yast2-nfs-server-4.2.3/package/yast2-nfs-server.changes 2020-01-17 
13:48:20.000000000 +0100
+++ new/yast2-nfs-server-4.2.4/package/yast2-nfs-server.changes 2020-01-24 
14:57:40.000000000 +0100
@@ -1,4 +1,12 @@
 -------------------------------------------------------------------
+Thu Jan 23 14:54:17 UTC 2020 - Josef Reidinger <jreidin...@suse.com>
+
+- Fix exit codes for CLI (bsc#1142979)
+- nicer error messages when CLI is wrongly used or failed
+  (bsc#1142979)
+- 4.2.4
+
+-------------------------------------------------------------------
 Wed Jan 15 16:28:52 UTC 2020 - Christopher Hofmann <c...@suse.com>
 
 - Fixed outdated rpc-svcgssd service name (bsc#972488)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-nfs-server-4.2.3/package/yast2-nfs-server.spec 
new/yast2-nfs-server-4.2.4/package/yast2-nfs-server.spec
--- old/yast2-nfs-server-4.2.3/package/yast2-nfs-server.spec    2020-01-17 
13:48:20.000000000 +0100
+++ new/yast2-nfs-server-4.2.4/package/yast2-nfs-server.spec    2020-01-24 
14:57:40.000000000 +0100
@@ -18,7 +18,7 @@
 
 Name:           yast2-nfs-server
 Summary:        YaST2 - NFS Server Configuration
-Version:        4.2.3
+Version:        4.2.4
 Release:        0
 URL:            https://github.com/yast/yast-nfs-server
 Group:          System/YaST
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-nfs-server-4.2.3/src/clients/nfs_server.rb 
new/yast2-nfs-server-4.2.4/src/clients/nfs_server.rb
--- old/yast2-nfs-server-4.2.3/src/clients/nfs_server.rb        2020-01-17 
13:48:20.000000000 +0100
+++ new/yast2-nfs-server-4.2.4/src/clients/nfs_server.rb        2020-01-24 
14:57:40.000000000 +0100
@@ -51,14 +51,15 @@
         "finish"     => fun_ref(NfsServer.method(:Write), "boolean ()"),
         "actions"    => {
           "summary" => {
-            "handler" => fun_ref(
+            "handler"  => fun_ref(
               method(:NfsServerSummaryHandler),
               "boolean (map)"
             ),
             # command line action help
-            "help"    => _(
+            "help"     => _(
               "NFS server configuration summary"
-            )
+            ),
+            "readonly" => true
           },
           "start"   => {
             "handler" => fun_ref(
@@ -115,14 +116,24 @@
             )
           },
           "enablev4"   => {
-            "type" => "string",
-            "help" => _(
-              "Yes/No option for enabling/disabling support for NFSv4."
+            "type"     => "enum",
+            "typespec" => ["yes", "no"],
+            "help"     => format(
+              # TRANSLATORS %{yes} and %{no} are not translated input values 
"yes"
+              # and "no" which is not localized.
+              _("%{yes}'/'%{no}' option for enabling/disabling support for 
NFSv4."),
+              yes: "yes", no: "no"
             )
           },
           "security"   => {
-            "type" => "string",
-            "help" => _("Yes/No option for enabling/disabling secure NFS.")
+            "type"     => "enum",
+            "typespec" => ["yes", "no"],
+            "help"     => format(
+              # TRANSLATORS %{yes} and %{no} are not translated input values 
"yes"
+              # and "no" which is not localized.
+              _("%{yes}'/'%{no}' option for enabling/disabling support for 
NFSv4."),
+              yes: "yes", no: "no"
+            )
           }
         },
         "mappings"   => {
@@ -200,7 +211,7 @@
       end
 
       CommandLine.Print(RichText.Rich2Plain(NfsServer.Summary))
-      false
+      true
     end
 
     # check if neccessary packages are installed
@@ -225,8 +236,10 @@
     # @param [Hash] options command options
     # @return whether successful
     def NfsServerStartHandler(options)
-      options = deep_copy(options)
-      return false if NfsServer.start
+      if NfsServer.start
+        CommandLine.Print(_("NFS server already running."))
+        return false
+      end
       return false if !check_packages
       NfsServer.start = true
       true
@@ -236,7 +249,10 @@
     # @param [Hash] options command options
     # @return whether successful
     def NfsServerStopHandler(options)
-      options = deep_copy(options)
+      if !NfsServer.start
+        CommandLine.Print(_("NFS server is already stopped."))
+        return false
+      end
       return false if !NfsServer.start
       NfsServer.start = false
       true
@@ -295,6 +311,11 @@
         end
       end
 
+      if !deleted
+        # TRANSLATORS %s is mountpoint that is not found in nfs server 
configuration.
+        CommandLine.Print(format(_("Mount point '%s' not found."), mountpoint))
+      end
+
       deleted
     end
 
@@ -317,7 +338,7 @@
         if !NfsServer.enable_nfsv4
           CommandLine.Print(
             _(
-              "Domain cannot be set without enabling NFSv4. Use the 'set 
enablev4' command."
+              "Domain cannot be set without enabling NFSv4. Use the 'set 
enablev4=yes' command."
             )
           )
           return false


Reply via email to