Skip to content

Commit

Permalink
Display Bugzilla URL depending on release name
Browse files Browse the repository at this point in the history
In case of an error, the error dialog will request user to file a report
on https://bugzilla.opensuse.org when the release name in
/etc/os-release contains "openSUSE". For any other release name, the
bugzilla URL displayed would be https://bugzilla.suse.com.
  • Loading branch information
srinidhibs committed Apr 15, 2020
1 parent 90d517f commit 7f1e2f4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion library/control/src/modules/InstError.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ def main
Yast.import "Label"
Yast.import "String"
Yast.import "Report"
Yast.import "OSRelease"
end

def SaveLogs
Expand Down Expand Up @@ -107,6 +108,8 @@ def SaveLogs
# @param [String] error_text
# @param [String] details (displayed as a plain text, can contain multiple lines)
def ShowErrorPopUp(heading, error_text, details)
bugzilla_url = "http://bugzilla.suse.com/"
bugzilla_url = "http://bugzilla.opensuse.org" if OSRelease.ReleaseName.include? 'openSUSE'
success = UI.OpenDialog(
Opt(:decorated, :warncolor),
VBox(
Expand Down Expand Up @@ -146,7 +149,7 @@ def ShowErrorPopUp(heading, error_text, details)
"Please, attach also all YaST logs stored in the '%2' directory.\n" \
"See %3 for more information about YaST logs."
),
"http://bugzilla.suse.com/",
bugzilla_url,
"/var/log/YaST2/",
# link to the Yast Bug Reporting HOWTO
# for translators: use the localized page for your language if it exists,
Expand Down

0 comments on commit 7f1e2f4

Please sign in to comment.