Skip to content

Commit

Permalink
Merge 4b0f997 into 02e4bf0
Browse files Browse the repository at this point in the history
  • Loading branch information
joseivanlopez committed Feb 9, 2018
2 parents 02e4bf0 + 4b0f997 commit f9c1a8e
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 12 deletions.
6 changes: 6 additions & 0 deletions package/yast2-update.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Feb 9 14:52:57 UTC 2018 - jlopez@suse.com

- Adapt to new MountPoint API (part of fate#318196).
- 4.0.9

-------------------------------------------------------------------
Mon Jan 15 09:56:47 UTC 2018 - jreidinger@suse.com

Expand Down
6 changes: 3 additions & 3 deletions package/yast2-update.spec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


Name: yast2-update
Version: 4.0.8
Version: 4.0.9
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
Expand All @@ -42,8 +42,8 @@ BuildRequires: yast2-installation-control
BuildRequires: rubygem(rspec)

BuildRequires: yast2-storage-ng >= 3.3.4
# Y2Storage::Devicegraph#find_by_any_name
Requires: yast2-storage-ng >= 4.0.67
# Y2Storage::Mountable#mount_path
Requires: yast2-storage-ng >= 4.0.90
# FSSnapshotStore
Requires: yast2 >= 3.1.126
Requires: yast2-installation
Expand Down
27 changes: 18 additions & 9 deletions src/modules/RootPart.rb
Original file line number Diff line number Diff line change
Expand Up @@ -142,15 +142,15 @@ def GetInfoOfSelected(what)
if what == :name
# Name is known
if Ops.get_string(i, what, "") != ""
return Ops.get_string(i, what, "")
return Ops.get_string(i, what, "")

# Linux partition, but no root FS found
elsif Builtins.contains(
FileSystems.possible_root_fs,
Ops.get_symbol(i, :fs, :nil)
)
# label - name of sustem to update
return _("Unknown Linux System")
return _("Unknown Linux System")

# Non-Linux
else
Expand Down Expand Up @@ -259,7 +259,7 @@ def UnmountPartitions(keep_in_target)
end

# now remove the mount points in the target system
staging.filesystems.map { |f| f.mountpoint = nil } if !keep_in_target
remove_mount_points(staging) unless keep_in_target

# clear activated list
@activated = []
Expand Down Expand Up @@ -451,7 +451,7 @@ def RunFSCKonJFS(mount_type, device, error_message)
# button
_("&Skip Mounting"),
details
)
)
# succeeded
else
# add device into the list of already checked partitions (with exit status 0);
Expand Down Expand Up @@ -494,7 +494,7 @@ def MountPartition(mount_point, device, mount_type, fsopts = "")

# #223878, do not call modprobe with empty mount_type
if mount_type == ""
Builtins.y2warning("Unknown filesystem, skipping modprobe...")
Builtins.y2warning("Unknown filesystem, skipping modprobe...")
# #211916, sysfs, proc are not modular
elsif !NON_MODULAR_FS.include?(mount_type)
# #167976, was broken with "-t ", modprobe before adding it
Expand Down Expand Up @@ -1077,7 +1077,7 @@ def CheckBootSize(bootpart)

# Size of the /boot partition is satisfactory
if Ops.greater_or_equal(bootsize, min_suggested_bootsize)
return true
return true

# Less than a hero
else
Expand Down Expand Up @@ -1465,7 +1465,7 @@ def MountUserDefinedVarPartition
Builtins.y2milestone("Manual mount (/var) successful")
manual_mount_successful = true
break
end
end
# `cancel
else
Builtins.y2warning(
Expand Down Expand Up @@ -2164,6 +2164,15 @@ def staging
Y2Storage::StorageManager.instance.staging
end

# Remove mount point from all filesystems
#
# @param devicegraph [Y2Storage::Devicegraph]
def remove_mount_points(devicegraph)
devicegraph.filesystems.each do |filesystem|
filesystem.remove_mount_point unless filesystem.mount_point.nil?
end
end

# It returns true if the given fstab entry matches with the given device
# filesystem or false if not.
#
Expand Down Expand Up @@ -2254,8 +2263,8 @@ def update_staging_filesystem!(name, mountpoint)
filesystem = fs_by_devicename(staging, name)

if filesystem
filesystem.mountpoint = mountpoint
filesystem.mount_by = mount_by
filesystem.mount_path = mountpoint
filesystem.mount_point.mount_by = mount_by
end

end
Expand Down

0 comments on commit f9c1a8e

Please sign in to comment.