Hello community,

here is the log from the commit of package nvmetcli for openSUSE:Factory 
checked in at 2017-12-01 15:54:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/nvmetcli (Old)
 and      /work/SRC/openSUSE:Factory/.nvmetcli.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "nvmetcli"

Fri Dec  1 15:54:20 2017 rev:6 rq:546971 version:0.5

Changes:
--------
--- /work/SRC/openSUSE:Factory/nvmetcli/nvmetcli.changes        2017-08-12 
20:28:01.397127014 +0200
+++ /work/SRC/openSUSE:Factory/.nvmetcli.new/nvmetcli.changes   2017-12-01 
15:54:38.197881211 +0100
@@ -1,0 +2,6 @@
+Fri Dec  1 09:34:11 UTC 2017 - jthumsh...@suse.com
+
+- Don't display bogus 'disabled' status for ports (bsc#1070533)
+  + 0001-nvmetcli-remove-status-method-for-the-uiportnode.patch
+
+-------------------------------------------------------------------

New:
----
  0001-nvmetcli-remove-status-method-for-the-uiportnode.patch

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

Other differences:
------------------
++++++ nvmetcli.spec ++++++
--- /var/tmp/diff_new_pack.D2e3aA/_old  2017-12-01 15:54:38.869857030 +0100
+++ /var/tmp/diff_new_pack.D2e3aA/_new  2017-12-01 15:54:38.877856742 +0100
@@ -24,6 +24,7 @@
 Group:          System/Management
 Url:            http://git.infradead.org/users/hch/nvmetcli.git
 Source:         nvmetcli-v%{version}.tar.gz
+Patch1:         0001-nvmetcli-remove-status-method-for-the-uiportnode.patch
 BuildRequires:  python-devel
 BuildRequires:  python-setuptools
 Requires:       python-configshell-fb
@@ -42,6 +43,7 @@
 
 %prep
 %setup -q -n nvmetcli-v%{version}
+%patch1 -p1
 
 %build
 python setup.py build

++++++ 0001-nvmetcli-remove-status-method-for-the-uiportnode.patch ++++++
From: Johannes Thumshirn <jthumsh...@suse.de>
Date: Thu, 30 Nov 2017 11:27:23 +0100
Subject: nvmetcli: remove status method for the UIPortNode
Git-commit: 69182535c1df21c8cc2d0be4e5b4229f32a057e8
Patch-mainline: v0.6
References: bsc#1070533


nvmetcli defines a status method for the UIPortNode class but there is
no corresponding 'enable' file in configfs so typing in status will
always result in nvmetcli printing disbaled if one types 'status' in
the port node:

/> cd ports/1/
/ports/1> status
Status for /ports/1: disabled
/ports/1>

There are two possible ways for fixing this issue, provide a configfs
file to enable/disable the port node in the kernel or delete the
method in nvmetcli. Having a configfs file in the kernel is pointless,
as ports get enabled when symlinked to a namespace so zap the pointless status
method in user-space.

Signed-off-by: Johannes Thumshirn <jthumsh...@suse.de>
Reported-by: Hannes Reinecke <h...@suse.de>
Signed-off-by: Christoph Hellwig <h...@lst.de>
---
 nvmetcli | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/nvmetcli b/nvmetcli
index 5378365eb91f..4fbc12ec430f 100755
--- a/nvmetcli
+++ b/nvmetcli
@@ -356,11 +356,6 @@ class UIPortNode(UINode):
         UIPortSubsystemsNode(self)
         UIReferralsNode(self)
 
-    def status(self):
-        if self.cfnode.get_enable():
-            return "enabled"
-        return "disabled"
-
 
 class UIPortSubsystemsNode(UINode):
     def __init__(self, parent):
-- 
2.13.6


Reply via email to