Skip to content

Commit

Permalink
removes missing product section in software section
Browse files Browse the repository at this point in the history
  • Loading branch information
schubi2 committed May 2, 2018
1 parent e90bc77 commit 03e2dc0
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 24 deletions.
14 changes: 0 additions & 14 deletions src/modules/AutoinstSoftware.rb
Expand Up @@ -105,8 +105,6 @@ def GetModified
# @param [Hash] settings settings to be imported
# @return true on success
def Import(settings)
check_profile_for_errors(settings)

settings = deep_copy(settings)
@Software = deep_copy(settings)
@patterns = settings.fetch("patterns",[])
Expand Down Expand Up @@ -1201,18 +1199,6 @@ def SelectPackagesForInstallation

private

# Semantic AutoYaST profile check
#
# Problems will be stored in AutoInstall.issues_list.
# @param settings [Hash] AutoYaST software section
def check_profile_for_errors(settings)
# Checking if a product has been defined
if !settings["products"] || settings["products"].empty?
AutoInstall.issues_list.add(:missing_value, "software", "products",
_("The installer is trying to evaluate the product."))
end
end

# Get user transacted packages, include only the packages in the requested state
# @param status [Symbol] package status (:available, :selected, :installed,
# :removed)
Expand Down
10 changes: 0 additions & 10 deletions test/AutoinstSoftware_test.rb
Expand Up @@ -82,16 +82,6 @@
expect(Yast::Report).to_not receive(:Error)
subject.SelectPackagesForInstallation()
end

it "adds a problem to issue_list if products have not been defined" do
expect(Yast::AutoInstall.issues_list).to receive(:add)
.with(:missing_value, "software", "products",
"The installer is trying to evaluate the product.")
subject.Import({})
expect(Yast::Pkg).to receive(:DoProvide).with(["a2","a3","a4"]).and_return({"a4" => "not found"})
expect(Yast::Report).to_not receive(:Error)
subject.SelectPackagesForInstallation()
end
end

describe "#locked_packages" do
Expand Down

0 comments on commit 03e2dc0

Please sign in to comment.