Skip to content

Commit

Permalink
Save the used repositories at the end of installation (bsc#953522)
Browse files Browse the repository at this point in the history
to not offer the driver packages again

- 4.1.36
  • Loading branch information
lslezak committed Feb 14, 2019
1 parent 595a11a commit 435fe69
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
7 changes: 7 additions & 0 deletions package/yast2-installation.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Thu Feb 14 12:23:31 UTC 2019 - lslezak@suse.cz

- Save the used repositories at the end of installation to not
offer the driver packages again (bsc#953522)
- 4.1.36

-------------------------------------------------------------------
Fri Feb 1 13:13:31 CET 2019 - schubi@suse.de

Expand Down
6 changes: 3 additions & 3 deletions package/yast2-installation.spec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#

Name: yast2-installation
Version: 4.1.35
Version: 4.1.36
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
Expand Down Expand Up @@ -63,8 +63,8 @@ Requires: yast2-pkg-bindings >= 3.1.33
# Mouse-related scripts moved to yast2-mouse
Conflicts: yast2-mouse < 2.18.0

# Y2Packager::SelfUpdateAddonRepo
Requires: yast2-packager >= 4.1.5
# Y2Packager::KnownRepositories
Requires: yast2-packager >= 4.1.27

# use in startup scripts
Requires: initviocons
Expand Down
14 changes: 14 additions & 0 deletions src/lib/installation/clients/inst_extrasources.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
# current contact information at www.novell.com.
# ------------------------------------------------------------------------------

require "y2packager/known_repositories"

Yast.import "UI"
Yast.import "Pkg"
Yast.import "GetInstArgs"
Expand Down Expand Up @@ -69,6 +71,9 @@ def main
return :auto
end

# save the list of installation repositories before adding the extra repos
save_system_packages_repos

@already_registered = RegisteredUrls()

@register_url = GetURLsToRegister(@already_registered)
Expand Down Expand Up @@ -521,5 +526,14 @@ def InstallPackages(msg, details)

r == :yes
end

# save the known repositories to not offer again installing the driver packages
# (they should be already installed in the initial installation, if user deselected
# them they should not be offered again)
def save_system_packages_repos
known_repos = Y2Packager::KnownRepositories.new
known_repos.update
known_repos.write
end
end
end

0 comments on commit 435fe69

Please sign in to comment.