Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do a full type detection when creating cache #527

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion library/network/src/modules/NetworkInterfaces.rb
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,7 @@ def adapt_old_config!
# @param [Hash] a map with netconfig (ifcfg) configuration
#
def add_device(device, ifcfg)
devtype = GetTypeFromIfcfg(ifcfg) || GetType(device)
devtype = GetType(device)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I want to understand the change, I look up the names in http://apitalism.herokuapp.com/?q=GetType
and get

I am still lost. What is the difference in the return value for this particular bug?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Difference is that GetTypeFromIfcfgOrName uses ifcfg file or name for device type detection. It is just a subset of whole type detection process which is implemented in GetType. GetType is the only function which should be present in public API (but it is not bcs of ycp). Particular example of collision is described in the commit message.

@Devices[devtype] ||= {}
@Devices[devtype][device] = ifcfg
end
Expand Down
8 changes: 8 additions & 0 deletions package/yast2.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
-------------------------------------------------------------------
Thu Jan 5 11:58:05 UTC 2017 - mfilka@suse.com

- bnc#956755
- Use full type detection when caching network configuration to
solve ambiguos configurations (like bridge over wlan).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ambiguous

But this is describing implementation details and tells the user nothing about the bug this is fixing or its symptoms.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an internal module which is used mainly by other yast parts. And the change is implementation detail bcs in perfect code internal sorting of NetworkInterfaces' cache would be really internal. Sadly we more or less expose it's organization, so any change in it is public as well.

- 3.2.12

-------------------------------------------------------------------
Thu Jan 5 11:35:23 UTC 2017 - mfilka@suse.com

Expand Down
2 changes: 1 addition & 1 deletion package/yast2.spec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


Name: yast2
Version: 3.2.11
Version: 3.2.12
Release: 0
Summary: YaST2 - Main Package
License: GPL-2.0
Expand Down