Skip to content

Commit

Permalink
Merge 0e91d38 into ff25b56
Browse files Browse the repository at this point in the history
  • Loading branch information
schubi2 committed Dec 9, 2019
2 parents ff25b56 + 0e91d38 commit 451dfc2
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 23 deletions.
6 changes: 6 additions & 0 deletions package/yast2-add-on.changes
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Dec 6 13:50:38 CET 2019 - schubi@suse.de

- Added needed requriments to vendor.rb (bsc#1158436).
- 4.2.13

-------------------------------------------------------------------
Thu Dec 5 08:40:08 UTC 2019 - Ladislav Slezák <lslezak@suse.cz>

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


Name: yast2-add-on
Version: 4.2.12
Version: 4.2.13
Release: 0
Summary: YaST2 - Add-On media installation code
License: GPL-2.0-only
Expand Down
36 changes: 14 additions & 22 deletions src/clients/vendor.rb
Expand Up @@ -6,6 +6,8 @@
# Authors: Klaus Kaempf <kkaempf@suse.de>
#
# $Id$

require "y2packager/resolvable"
module Yast
class VendorClient < Client
def main
Expand Down Expand Up @@ -98,13 +100,15 @@ def main
else
Pkg.TargetInit("/", false)

@products = Y2Packager::Resolvable.find(kind: :product,
status: :installed,
category: "base")
@products = [] if @products == nil
@base = deep_copy(@products) if Builtins.size(@base) == 0
@product = @base[0]
@version = @product ? @product.version_version : ""
base = Y2Packager::Resolvable.find(kind: :product,
status: :installed,
category: "base")
if base.empty?
# fallback
base = Y2Packager::Resolvable.find(kind: :product,
status: :installed)
end
version = base[0] ? base[0].version_version : ""

Builtins.y2milestone("Trying %1", @cdpath)
@dirlist2 = Convert.to_list(SCR.Read(path(".target.dir"), @cdpath))
Expand All @@ -124,32 +128,20 @@ def main

@dirlist2 = Convert.to_list(SCR.Read(path(".target.dir"), @cdpath))
if Ops.less_or_equal(Builtins.size(@dirlist2), 0) ||
!(Builtins.contains(@dirlist2, "suse") ||
Builtins.contains(@dirlist2, "unitedlinux"))
!(Builtins.contains(@dirlist2, "suse"))
# VENDOR: vendor cd contains wrong data
return wrong_cd(
_("Could not find driver data on the CD-ROM.\nAborting now."),
@is_mounted
)
end

@vendordir = "/suse/"

if Ops.greater_than(
SCR.Read(path(".target.size"), "/etc/UnitedLinux-release"),
0
)
@vendordir = "/UnitedLinux/"
@version = "ul1"
end

@cdpath = Ops.add(
Ops.add(Ops.add(Ops.add(@cdpath, @vendordir), Arch.architecture), "-"),
@version
Ops.add(Ops.add(Ops.add(@cdpath, "/suse/"), Arch.architecture), "-"),
version
)
end


Builtins.y2milestone("Trying %1", @cdpath)

@dirlist = Convert.convert(
Expand Down

0 comments on commit 451dfc2

Please sign in to comment.