Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package yast2-nfs-client for
openSUSE:Factory checked in at 2022-04-08 00:27:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-nfs-client (Old)
and /work/SRC/openSUSE:Factory/.yast2-nfs-client.new.1900 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-nfs-client"
Fri Apr 8 00:27:27 2022 rev:93 rq:967342 version:4.5.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-nfs-client/yast2-nfs-client.changes
2022-02-06 23:53:23.155178863 +0100
+++
/work/SRC/openSUSE:Factory/.yast2-nfs-client.new.1900/yast2-nfs-client.changes
2022-04-08 00:27:57.234163921 +0200
@@ -1,0 +2,10 @@
+Wed Apr 06 13:24:58 UTC 2022 - Ladislav Slez??k <[email protected]>
+
+- Bump version to 4.5.0 (#bsc1198109)
+
+-------------------------------------------------------------------
+Fri Feb 4 13:54:00 UTC 2022 - Jos?? Iv??n L??pez Gonz??lez <[email protected]>
+
+- Recover hosts caching (related to fate#318196).
+
+-------------------------------------------------------------------
Old:
----
yast2-nfs-client-4.4.4.tar.bz2
New:
----
yast2-nfs-client-4.5.0.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-nfs-client.spec ++++++
--- /var/tmp/diff_new_pack.2lp5ct/_old 2022-04-08 00:27:57.866156827 +0200
+++ /var/tmp/diff_new_pack.2lp5ct/_new 2022-04-08 00:27:57.870156782 +0200
@@ -17,7 +17,7 @@
Name: yast2-nfs-client
-Version: 4.4.4
+Version: 4.5.0
Release: 0
URL: https://github.com/yast/yast-nfs-client
Summary: YaST2 - NFS Configuration
++++++ yast2-nfs-client-4.4.4.tar.bz2 -> yast2-nfs-client-4.5.0.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-nfs-client-4.4.4/package/yast2-nfs-client.changes
new/yast2-nfs-client-4.5.0/package/yast2-nfs-client.changes
--- old/yast2-nfs-client-4.4.4/package/yast2-nfs-client.changes 2022-02-03
01:39:06.000000000 +0100
+++ new/yast2-nfs-client-4.5.0/package/yast2-nfs-client.changes 2022-04-06
15:34:59.000000000 +0200
@@ -1,4 +1,14 @@
-------------------------------------------------------------------
+Wed Apr 06 13:24:58 UTC 2022 - Ladislav Slez??k <[email protected]>
+
+- Bump version to 4.5.0 (#bsc1198109)
+
+-------------------------------------------------------------------
+Fri Feb 4 13:54:00 UTC 2022 - Jos?? Iv??n L??pez Gonz??lez <[email protected]>
+
+- Recover hosts caching (related to fate#318196).
+
+-------------------------------------------------------------------
Wed Feb 2 17:06:10 UTC 2022 - Jos?? Iv??n L??pez Gonz??lez <[email protected]>
- Adapt code for a better integration with the storage Expert
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-nfs-client-4.4.4/package/yast2-nfs-client.spec
new/yast2-nfs-client-4.5.0/package/yast2-nfs-client.spec
--- old/yast2-nfs-client-4.4.4/package/yast2-nfs-client.spec 2022-02-03
01:39:06.000000000 +0100
+++ new/yast2-nfs-client-4.5.0/package/yast2-nfs-client.spec 2022-04-06
15:34:59.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-nfs-client
-Version: 4.4.4
+Version: 4.5.0
Release: 0
Url: https://github.com/yast/yast-nfs-client
Summary: YaST2 - NFS Configuration
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-nfs-client-4.4.4/src/include/nfs/ui.rb
new/yast2-nfs-client-4.5.0/src/include/nfs/ui.rb
--- old/yast2-nfs-client-4.4.4/src/include/nfs/ui.rb 2022-02-03
01:39:06.000000000 +0100
+++ new/yast2-nfs-client-4.5.0/src/include/nfs/ui.rb 2022-04-06
15:34:59.000000000 +0200
@@ -47,7 +47,6 @@
Yast.include include_target, "nfs/routines.rb"
# Caches names of nfs servers for GetFstabEntry
-
@hosts = nil
# List of already defined nfs mount points
@@ -124,7 +123,7 @@
nfs.fstopt = "defaults"
end
- form = Y2NfsClient::Widgets::NfsForm.new(nfs, nfs_entries)
+ form = Y2NfsClient::Widgets::NfsForm.new(nfs, nfs_entries, hosts: @hosts)
return nil unless form.run?
UI.OpenDialog(
@@ -167,6 +166,8 @@
break if [:ok, :cancel].include?(ret)
end
+ @hosts = form.hosts
+
UI.CloseDialog
Wizard.RestoreScreenShotName
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-nfs-client-4.4.4/src/lib/y2nfs_client/widgets/nfs_form.rb
new/yast2-nfs-client-4.5.0/src/lib/y2nfs_client/widgets/nfs_form.rb
--- old/yast2-nfs-client-4.4.4/src/lib/y2nfs_client/widgets/nfs_form.rb
2022-02-03 01:39:06.000000000 +0100
+++ new/yast2-nfs-client-4.5.0/src/lib/y2nfs_client/widgets/nfs_form.rb
2022-04-06 15:34:59.000000000 +0200
@@ -32,12 +32,19 @@
class NfsForm < CWM::CustomWidget
Yast.import "NfsOptions"
+ # List of cached hosts
+ #
+ # @return [Array<String>, nil]
+ attr_reader :hosts
+
# Constructor
#
# @param nfs [Y2Storage::Filesystems::LegacyNfs] Object representing a
nfs entry. This object is
# modified in #store method.
# @param nfs_entries [Array<Y2Storage::Filesystems::LegacyNfs>] The rest
of entries
- def initialize(nfs, nfs_entries)
+ # @param hosts [Array<String>, nil] List of cached hosts. Passing a list
avoids to perform a new
+ # search.
+ def initialize(nfs, nfs_entries, hosts: nil)
super()
Yast.import "Nfs"
@@ -56,6 +63,7 @@
@mount_options = nfs.fstopt || ""
@nfs_entries = nfs_entries
+ @hosts = hosts
end
# NFS being created or edited
@@ -305,8 +313,8 @@
Yast::UI.QueryWidget(Id(:optionsent), :Value).strip
end
+ # FIXME: Hosts are not correctly found, see bsc#1167589
def handle_choose
- # FIXME: @hosts is supposed to be a cache for the whole module
execution
if @hosts.nil?
# label message
Yast::UI.OpenDialog(Label(_("Scanning for hosts on this LAN...")))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-nfs-client-4.4.4/test/y2nfs_client/widgets/nfs_form_test.rb
new/yast2-nfs-client-4.5.0/test/y2nfs_client/widgets/nfs_form_test.rb
--- old/yast2-nfs-client-4.4.4/test/y2nfs_client/widgets/nfs_form_test.rb
2022-02-03 01:39:06.000000000 +0100
+++ new/yast2-nfs-client-4.5.0/test/y2nfs_client/widgets/nfs_form_test.rb
2022-04-06 15:34:59.000000000 +0200
@@ -29,7 +29,7 @@
Yast.import "Nfs"
describe Y2NfsClient::Widgets::NfsForm do
- subject { described_class.new(nfs, nfs_entries) }
+ subject { described_class.new(nfs, nfs_entries, hosts: hosts) }
let(:entry) do
{
@@ -40,6 +40,7 @@
let(:nfs) { Y2Storage::Filesystems::LegacyNfs.new_from_hash(entry) }
let(:nfs_entries) { [] }
+ let(:hosts) { nil }
before do
allow(Yast::UI).to receive(:QueryWidget).and_return("")
@@ -133,49 +134,64 @@
let(:servers) { ["nfs.example.com"] }
- it "scans servers" do
- expect(Yast::Nfs).to receive(:ProbeServers)
+ context "if the list of hosts is unknown" do
+ let(:hosts) { nil }
- subject.handle(event)
- end
+ it "scans servers" do
+ expect(Yast::Nfs).to receive(:ProbeServers)
- context "when scan succeeds" do
- let(:servers) { ["nfs1.example.com", "nfs2.example.com"] }
+ subject.handle(event)
+ end
- context "and the user selects a server" do
- let(:input) { :ok }
+ context "when scan succeeds" do
+ let(:servers) { ["nfs1.example.com", "nfs2.example.com"] }
- let(:server) { servers.first }
+ context "and the user selects a server" do
+ let(:input) { :ok }
- before do
- allow(Yast::UI).to receive(:QueryWidget).with(Id(:items),
:CurrentItem).and_return(server)
+ let(:server) { servers.first }
+
+ before do
+ allow(Yast::UI).to receive(:QueryWidget).with(Id(:items),
:CurrentItem).and_return(server)
+ end
+
+ it "sets the server selected by the user" do
+ expect(Yast::UI).to receive(:ChangeWidget).with(Id(:serverent),
:Value, server)
+
+ subject.handle(event)
+ end
end
- it "sets the server selected by the user" do
- expect(Yast::UI).to receive(:ChangeWidget).with(Id(:serverent),
:Value, server)
+ context "and the user cancels the selection" do
+ let(:input) { :cancel }
- subject.handle(event)
+ it "does not change server" do
+ expect(Yast::UI).to_not
receive(:ChangeWidget).with(Id(:serverent), any_args)
+
+ subject.handle(event)
+ end
end
end
- context "and the user cancels the selection" do
- let(:input) { :cancel }
+ context "when scan fails" do
+ let(:servers) { [] }
- it "does not change server" do
- expect(Yast::UI).to_not
receive(:ChangeWidget).with(Id(:serverent), any_args)
+ it "reports an error" do
+ expect(Yast::Report).to receive(:Error).with(/No NFS server/)
subject.handle(event)
end
end
- end
- context "when scan fails" do
- let(:servers) { [] }
+ context "if the list of hosts is already known" do
+ let(:hosts) { ["nfs.example.com"] }
- it "reports an error" do
- expect(Yast::Report).to receive(:Error).with(/No NFS server/)
+ it "does not scan servers" do
+ expect(Yast::Nfs).to_not receive(:ProbeServers)
+
+ subject.handle(event)
+ end
- subject.handle(event)
end
end
end