• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

yast / yast-kdump / 3641380154

pending completion
3641380154

push

github

Unknown Committer
Unknown Commit Message

726 of 1820 relevant lines covered (39.89%)

4.03 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

54.76
/src/include/kdump/complex.rb
1
# encoding: utf-8
2

3
# ------------------------------------------------------------------------------
4
# Copyright (c) 2006 Novell, Inc. All Rights Reserved.
5
#
6
#
7
# This program is free software; you can redistribute it and/or modify it under
8
# the terms of version 2 of the GNU General Public License as published by the
9
# Free Software Foundation.
10
#
11
# This program is distributed in the hope that it will be useful, but WITHOUT
12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13
# FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
14
#
15
# You should have received a copy of the GNU General Public License along with
16
# this program; if not, contact Novell, Inc.
17
#
18
# To contact Novell about this file by physical or electronic mail, you may find
19
# current contact information at www.novell.com.
20
# ------------------------------------------------------------------------------
21

22
# File:        include/kdump/complex.ycp
23
# Package:        Configuration of kdump
24
# Summary:        Dialogs definitions
25
# Authors:        Jozef Uhliarik <juhliarik@suse.com>
26
#
27
# $Id: complex.ycp 29363 2006-03-24 08:20:43Z mzugec $
28
module Yast
1✔
29
  module KdumpComplexInclude
1✔
30
    def initialize_kdump_complex(include_target)
1✔
31
      Yast.import "UI"
14✔
32

33
      textdomain "kdump"
14✔
34

35
      Yast.import "Label"
14✔
36
      Yast.import "Popup"
14✔
37
      Yast.import "Wizard"
14✔
38
      Yast.import "Confirm"
14✔
39
      Yast.import "Kdump"
14✔
40
      Yast.import "Package"
14✔
41
      Yast.import "Arch"
14✔
42
      Yast.import "Report"
14✔
43
      Yast.import "Mode"
14✔
44
      Yast.import "Message"
14✔
45
      Yast.import "Package"
14✔
46

47
      Yast.include include_target, "kdump/helps.rb"
14✔
48
    end
49

50
    # Return a modification status
51
    # @return true if data was modified
52
    def Modified
1✔
53
      Kdump.GetModified
×
54
    end
55

56
    def ReallyAbort
1✔
57
      !Kdump.GetModified || Popup.ReallyAbort(true)
×
58
    end
59

60
    def PollAbort
1✔
61
      UI.PollInput == :abort
×
62
    end
63

64
    # @return true if necessary packages are installed
65
    def InstallPackages
1✔
66
      # install packages
67
      package_list = KdumpClass::KDUMP_PACKAGES
×
68
      if !Package.CheckAndInstallPackages(package_list)
×
69
        Report.Error(Message.CannotContinueWithoutPackagesInstalled)
×
70
        Builtins.y2error(
×
71
          "[kdump] Installation of package list %1 failed or aborted",
72
          package_list
73
        )
74
        return false
×
75
      end
76

77
      true
×
78
    end
79

80
    # Read settings dialog
81
    # @return `abort if aborted and `next otherwise
82
    def ReadDialog
1✔
83
      Wizard.RestoreHelp(Ops.get_string(@HELPS, "read", ""))
×
84
      # Kdump::AbortFunction = PollAbort;
85
      return :abort if !Confirm.MustBeRoot
×
86
      if !Kdump.system.supports_kdump? && !unsupported_kdump_confirmation
×
87
        return :abort
×
88
      end
89
      InstallPackages() or return :abort
×
90

91
      ret = Kdump.Read
×
92
      ret ? :next : :abort
×
93
    end
94

95
    # Write settings dialog
96
    # @return `abort if aborted and `next otherwise
97
    def WriteDialog
1✔
98
      Wizard.RestoreHelp(Ops.get_string(@HELPS, "write", ""))
×
99
      # Kdump::AbortFunction = PollAbort;
100
      ret = Kdump.Write
×
101
      ret ? :next : :abort
×
102
    end
103
  end
104
end
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc