-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into master-bsc-1168342
- Loading branch information
Showing
31 changed files
with
556 additions
and
50 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
src/lib/installation/console/plugins/configure_repositories_command.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# ------------------------------------------------------------------------------ | ||
# Copyright (c) 2021 SUSE LLC, All Rights Reserved. | ||
# | ||
# This program is free software; you can redistribute it and/or modify it under | ||
# the terms of version 2 of the GNU General Public License as published by the | ||
# Free Software Foundation. | ||
# | ||
# This program is distributed in the hope that it will be useful, but WITHOUT | ||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | ||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. | ||
# | ||
# ------------------------------------------------------------------------------ | ||
|
||
module Installation | ||
module Console | ||
# define the "configure_repositories" command in the expert console | ||
class Commands | ||
def configure_repositories | ||
run_yast_module("repositories") | ||
end | ||
|
||
private | ||
|
||
def configure_repositories_description | ||
"Run the repository manager. Be careful when using it,\n" \ | ||
"you might easily break the installer when wrongly used!" | ||
end | ||
end | ||
end | ||
end |
38 changes: 38 additions & 0 deletions
38
src/lib/installation/console/plugins/repositories_command.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# ------------------------------------------------------------------------------ | ||
# Copyright (c) 2021 SUSE LLC, All Rights Reserved. | ||
# | ||
# This program is free software; you can redistribute it and/or modify it under | ||
# the terms of version 2 of the GNU General Public License as published by the | ||
# Free Software Foundation. | ||
# | ||
# This program is distributed in the hope that it will be useful, but WITHOUT | ||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | ||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. | ||
# | ||
# ------------------------------------------------------------------------------ | ||
|
||
require "pp" | ||
require "yast" | ||
|
||
module Installation | ||
module Console | ||
# define the "repositories" command in the expert console | ||
class Commands | ||
def repositories | ||
Yast.import "Pkg" | ||
|
||
repos = Yast::Pkg.SourceGetCurrent(false).map do |repo| | ||
Yast::Pkg.SourceGeneralData(repo) | ||
end | ||
|
||
pp repos | ||
end | ||
|
||
private | ||
|
||
def repositories_description | ||
"Dump the details of the currently defined software repositories" | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
require "cfa/base_model" | ||
require "cfa/augeas_parser" | ||
require "cfa/matcher" | ||
|
||
module Yast | ||
module Packager | ||
module CFA | ||
# Represents a dnf configuration file. | ||
class DnfConf < ::CFA::BaseModel | ||
# Configuration parser | ||
PARSER = ::CFA::AugeasParser.new("puppet.lns") | ||
# Path to configuration file | ||
PATH = "/etc/dnf/dnf.conf".freeze | ||
|
||
def initialize(file_handler: nil) | ||
super(PARSER, PATH, file_handler: file_handler) | ||
end | ||
|
||
# Set options to keep a minimalistic package selection | ||
def set_minimalistic! | ||
tree = data["main"] | ||
if !tree | ||
tree = ::CFA::AugeasTree.new | ||
data["main"] = tree | ||
end | ||
generic_set("install_weak_deps", "False", tree) | ||
generic_set("tsflags", "nodocs", tree) | ||
end | ||
|
||
def section(name) | ||
data[name] | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.