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

Added flag to determine if the config should be written to the target system #40

Merged
merged 5 commits into from
Jun 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Metrics/BlockNesting:
# Offense count: 1
# Configuration parameters: CountComments.
Metrics/ClassLength:
Max: 350
Max: 355

# Offense count: 8
Metrics/CyclomaticComplexity:
Expand Down
8 changes: 8 additions & 0 deletions package/yast2-proxy.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
-------------------------------------------------------------------
Wed Jun 9 08:04:48 UTC 2021 - Knut Anderssen <kanderssen@suse.com>

- Added 'to_target' variable which will determine whether the
configuration should be written to the target system at the end
of the installation or not (bsc#1185016).
- 4.3.3

-------------------------------------------------------------------
Mon Aug 10 16:55:44 CEST 2020 - schubi@suse.de

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


Name: yast2-proxy
Version: 4.3.2
Version: 4.3.3
Release: 0
Summary: YaST2 - Proxy Configuration
License: GPL-2.0-or-later
Expand Down
6 changes: 6 additions & 0 deletions src/modules/Proxy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,16 @@ module Yast
# Configures FTP and HTTP proxies via sysconfig
# and /root/.curlrc (for YOU)
class ProxyClass < Module
# @return [Boolean] Whether the configuration should be copied to the target system
attr_accessor :to_target

def main
textdomain "proxy"

Yast.import "Summary"
Yast.import "Progress"
Yast.import "Mode"
Yast.import "Stage"
Yast.import "Popup"

@proposal_valid = false
Expand All @@ -26,6 +30,7 @@ def main
@no = ""
@user = ""
@pass = ""
@to_target = false
end

# domains that should not be proxied; reader
Expand Down Expand Up @@ -209,6 +214,7 @@ def Write

# user can't relogin in installation and update, do not show the msg then (bnc#486037, bnc#543469)
ProxyFinishPopup(true) if Mode.normal
@to_target = true if Stage.initial

@modified = false

Expand Down