Skip to content

Commit

Permalink
Added comments
Browse files Browse the repository at this point in the history
  • Loading branch information
lslezak committed Aug 25, 2016
1 parent 81e57d7 commit 9477683
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/lib/installation/update_repository.rb
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,11 @@ def remove_update_files
# * Mount the squashfs filesystem
# * Add files/directories to inst-sys using the /etc/adddir script
#
# @note The current implementation creates one squashfs image per package
# and mounting a squashfs image consumes one loop device (/dev/loop*).
# Inst-sys has by default 64 loop devices, but some of them already used,
# in an extreme case we might run out of loop devices.
#
# @param mount_path [Pathname] Directory to mount the update
#
# @raise UpdatesNotFetched
Expand Down Expand Up @@ -244,15 +249,15 @@ def fetch_package(package, dir)

# Extract a RPM contents to a given directory
#
# @param package_path [Pathname] RPM local path
# @param package_file [File] RPM package (local file name)
# @param dir [Pathname] Directory to extract the RPM contents
#
# @raise CouldNotExtractPackage
def extract(package_path, dir)
def extract(package_file, dir)
Dir.chdir(dir) do
cmd = format(EXTRACT_CMD, source: package_path.path)
cmd = format(EXTRACT_CMD, source: package_file.path)
out = Yast::SCR.Execute(Yast::Path.new(".target.bash_output"), cmd)
log.info("Extracting package #{package_path}: #{out}")
log.info("Extracting package #{package_file.inspect}: #{out}")
raise CouldNotExtractPackage unless out["exit"].zero?
end
end
Expand Down

0 comments on commit 9477683

Please sign in to comment.