Skip to content

Commit

Permalink
Fixed unmounting /mnt/dev when going back (related to bsc#1089643)
Browse files Browse the repository at this point in the history
- 4.0.14
  • Loading branch information
lslezak committed May 9, 2018
1 parent c141465 commit c9674a1
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
7 changes: 7 additions & 0 deletions package/yast2-update.changes
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Wed May 9 10:20:03 UTC 2018 - lslezak@suse.cz

- Fixed unmounting /mnt/dev when going back to the partition
selection dialog (fix up for the bsc#1089643)
- 4.0.14

-------------------------------------------------------------------
Fri Apr 27 13:45:41 UTC 2018 - lslezak@suse.cz

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


Name: yast2-update
Version: 4.0.13
Version: 4.0.14
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
Expand Down
13 changes: 8 additions & 5 deletions src/modules/RootPart.rb
Expand Up @@ -36,7 +36,7 @@
module Yast
class RootPartClass < Module
include Logger
NON_MODULAR_FS = ["proc", "sysfs"]
NON_MODULAR_FS = ["devtmpfs", "proc", "sysfs"]

def main
Yast.import "UI"
Expand Down Expand Up @@ -1097,6 +1097,13 @@ def MountFSTab(fstab, message)
)
end

# to have devices like /dev/cdrom and /dev/urandom in the chroot
if MountPartition("/dev", "devtmpfs", "devtmpfs") == nil
AddMountedPartition(
{ :type => "mount", :device => "devtmpfs", :mntpt => "/dev" }
)
end

success = true

Builtins.foreach(fstab) do |mounts|
Expand Down Expand Up @@ -1713,10 +1720,6 @@ def create_backup
def inject_intsys_files
# the original file is backed up and restored later
::FileUtils.cp(RESOLV_CONF, File.join(Installation.destdir, RESOLV_CONF)) if File.exist?(RESOLV_CONF)

# make the /dev files available in the chroot so the scripts work correctly there
target = File.join(Installation.destdir, "dev")
system("mount --bind /dev #{Shellwords.escape(target)}")
end

# Get architecture of an elf file.
Expand Down

0 comments on commit c9674a1

Please sign in to comment.