Skip to content

Commit

Permalink
Merge pull request #295 from yast/testing_client
Browse files Browse the repository at this point in the history
  • Loading branch information
lslezak committed Oct 27, 2017
2 parents 688fb8c + 087428a commit fbc396d
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 1 deletion.
4 changes: 4 additions & 0 deletions devel/README.md
@@ -0,0 +1,4 @@
# Development Code

This directory contains code examples which can be useful for development.
They are not intented for regular use by end users.
29 changes: 29 additions & 0 deletions devel/test_addon_selector.rb
@@ -0,0 +1,29 @@
# This is a testing client for the addon product dialog which is displayed
# after adding a multi-repository medium.
#
# Run it using "yast2 ./test_addon_selector.rb" command

require "y2packager/product_location"
require "y2packager/dialogs/addon_selector"

new_repos = [
["Basesystem-Module 15-0", "/Basesystem"],
["Desktop-Applications-Module 15-0", "/Desktop-Applications"],
["Desktop-Productivity-Module 15-0", "/Desktop-Productivity"],
["Development-Tools-Module 15-0", "/Development-Tools"],
["HA-Module 15-0", "/HA"],
["HPC-Module 15-0", "/HPC"],
["Legacy-Module 15-0", "/Legacy"],
["Public-Cloud-Module 15-0", "/Public-Cloud"],
["SAP-Applications-Module 15-0", "/SAP-Applications"],
["Scripting-Module 15-0", "/Scripting"],
["Server-Applications-Module 15-0", "/Server-Applications"]
]

puts "Repositories to select: " + new_repos.inspect

products = new_repos.map { |r| Y2Packager::ProductLocation.new(r[0], r[1]) }
dialog = Y2Packager::Dialogs::AddonSelector.new(products)

puts "Dialog result: " + dialog.run.inspect
puts "Selected products: " + dialog.selected_products.inspect
7 changes: 7 additions & 0 deletions package/yast2-packager.changes
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Fri Oct 27 15:28:29 UTC 2017 - lslezak@suse.cz

- Do not install all available products (like SLED on SLES) during
upgrade (bsc#1065485)
- 4.0.16

-------------------------------------------------------------------
Thu Oct 26 16:11:50 CEST 2017 - schubi@suse.de

Expand Down
2 changes: 1 addition & 1 deletion package/yast2-packager.spec
Expand Up @@ -17,7 +17,7 @@


Name: yast2-packager
Version: 4.0.15
Version: 4.0.16
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
Expand Down
5 changes: 5 additions & 0 deletions src/modules/Packages.rb
Expand Up @@ -1902,6 +1902,11 @@ def SelectProduct
return true
end

if Mode.update
log.info("Update mode - skipping product selection")
return true
end

products = Pkg.ResolvableProperties("", :product, "")

if !products || products.empty?
Expand Down

0 comments on commit fbc396d

Please sign in to comment.