Skip to content

Commit

Permalink
Comments
Browse files Browse the repository at this point in the history
  • Loading branch information
lslezak committed Mar 23, 2017
1 parent 85cd139 commit 7a94658
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions library/control/src/modules/WorkflowManager.rb
Expand Up @@ -447,14 +447,16 @@ def GetCachedWorkflowFilename(type, src_id, _name)
# Trying to get the file from source
else
Builtins.y2milestone("File %1 not cached", disk_filename)
# using a file from source
# using a file from source, works only for SUSE tags repositories
use_filename = Pkg.SourceProvideDigestedFile(
src_id,
1,
"/installation.xml",
true
)

# The most generic way it to use the package referenced by the "installerextension()"
# provides, this works with all repository types, including the RPM-MD repositories.
use_filename = GetControlFileFromPackage(src_id) if use_filename.nil?

# File exists?
Expand Down Expand Up @@ -1486,7 +1488,8 @@ def find_product(repo_id)
products.first
end

# Find the extension package name defined by the "installerextension()"
# Find the extension package name for the specified release package.
# The extension package is defined by the "installerextension()"
# RPM "Provides" dependency.
# @return [String,nil] a package name or nil if not found
def find_control_package(release_package)
Expand Down Expand Up @@ -1534,14 +1537,17 @@ def fetch_package(repo_id, package, dir)
extract(tmp, dir)
ensure
if tmp
# the RPM package file is not needed after extracting it's content,
# remove it explicitly, do not wait for the garbage collector
# (in inst-syst it is stored in a RAM disk and eats the RAM memory)
tmp.close
tmp.unlink
end
end

# Extract an RPM package into the given directory.
# @param package_file [String] the RPM package path
# @param dir [String] A directory where the package will be extracted to
# @param dir [String] a directory where the package will be extracted to
# @raise [Packages::PackageExtractor::ExtractionFailed] if package extraction failed
def extract(package_file, dir)
log.info("Extracting file #{package_file}")
Expand Down

0 comments on commit 7a94658

Please sign in to comment.