Skip to content

Commit

Permalink
Merge pull request #120 from yast/fixes
Browse files Browse the repository at this point in the history
Export zone's name explicitly as it is not a common attribute (bsc#1130354)
  • Loading branch information
teclator committed Mar 28, 2019
2 parents 2308269 + f0a19fe commit 8d1dcfd
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 10 deletions.
8 changes: 8 additions & 0 deletions package/yast2-firewall.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
-------------------------------------------------------------------
Tue Mar 26 23:44:33 UTC 2019 - knut.anderssen@suse.com

- Autoyast: Export zone name explicitly as it has been removed from
the common attributes list (bsc#1130354)
- Fixed textdomain names
- 4.1.11

-------------------------------------------------------------------
Wed Jan 23 09:52:51 UTC 2019 - knut.anderssen@suse.com

Expand Down
10 changes: 5 additions & 5 deletions package/yast2-firewall.spec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


Name: yast2-firewall
Version: 4.1.10
Version: 4.1.11
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
Expand All @@ -28,13 +28,13 @@ License: GPL-2.0-only
BuildRequires: perl-XML-Writer update-desktop-files yast2-testsuite
BuildRequires: yast2-devtools >= 3.1.10

# reduced relations
BuildRequires: yast2 >= 4.1.51
# Removed zone name from common attributes definition
BuildRequires: yast2 >= 4.1.67
BuildRequires: rubygem(%rb_default_ruby_abi:yast-rake)
BuildRequires: rubygem(%rb_default_ruby_abi:rspec)

# reduced relations
Requires: yast2 >= 4.1.51
# Removed zone name from common attributes definition
Requires: yast2 >= 4.1.67

# ButtonBox widget
Conflicts: yast2-ycp-ui-bindings < 2.17.3
Expand Down
2 changes: 1 addition & 1 deletion src/lib/y2firewall/autoyast.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def export

def export_zone(zone)
(zone.attributes + zone.relations)
.each_with_object({}) do |field, profile|
.each_with_object("name" => zone.name) do |field, profile|
profile[field.to_s] = zone.public_send(field) unless zone.public_send(field).nil?
end
end
Expand Down
1 change: 0 additions & 1 deletion src/lib/y2firewall/widgets/pages/zones.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ def handle
result = Dialogs::Zone.run(zone, new_zone: true,
existing_names: firewall.zones.map(&:name))
if result == :ok
zone.relations.map { |r| zone.send("#{r}=", []) }
firewall.zones << zone
UIState.instance.select_row(zone.name)

Expand Down
7 changes: 4 additions & 3 deletions src/lib/y2firewall/widgets/zone.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class ShortWidget < CWM::InputField
include Yast::I18n

def initialize(zone)
textdomain "textdomain"
textdomain "firewall"
@zone = zone
end

Expand Down Expand Up @@ -99,7 +99,7 @@ class DescriptionWidget < CWM::InputField
include Yast::I18n

def initialize(zone)
textdomain "textdomain"
textdomain "firewall"
@zone = zone
end

Expand Down Expand Up @@ -127,6 +127,7 @@ def store
# target of zone
class TargetWidget < CWM::ComboBox
def initialize(zone)
textdomain "firewall"
@zone = zone
end

Expand All @@ -152,7 +153,7 @@ class MasqueradeWidget < CWM::CheckBox
include Yast::I18n

def initialize(zone)
textdomain "textdomain"
textdomain "firewall"
@zone = zone
end

Expand Down

0 comments on commit 8d1dcfd

Please sign in to comment.