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

yast / yast-kdump / 9611059066

21 Jun 2024 09:00AM UTC coverage: 40.556% (+0.4%) from 40.11%
9611059066

Pull #138

github

schubi2
removed frozen_string_literal
Pull Request #138: kdump is currently not compatible with Systemd Boot

40 of 159 new or added lines in 8 files covered. (25.16%)

22 existing lines in 5 files now uncovered.

730 of 1800 relevant lines covered (40.56%)

4.03 hits per line

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

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

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

31
      textdomain "kdump"
14✔
32

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

45
      Yast.include include_target, "kdump/helps.rb"
14✔
46
    end
47

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

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

58
    def PollAbort
1✔
59
      UI.PollInput == :abort
×
60
    end
61

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

75
      true
×
76
    end
77

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

UNCOV
86
      InstallPackages() or return :abort
×
87

88
      ret = Kdump.Read
×
89
      ret ? :next : :abort
×
90
    end
91

92
    # Write settings dialog
93
    # @return `abort if aborted and `next otherwise
94
    def WriteDialog
1✔
95
      Wizard.RestoreHelp(Ops.get_string(@HELPS, "write", ""))
×
96
      # Kdump::AbortFunction = PollAbort;
97
      ret = Kdump.Write
×
98
      ret ? :next : :abort
×
99
    end
100
  end
101
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

© 2026 Coveralls, Inc