Skip to content

Commit

Permalink
remove all repositories to allow unmounting the target (bnc#876677)
Browse files Browse the repository at this point in the history
(keep the initial installation repository)

- 3.1.18
  • Loading branch information
lslezak committed Jul 1, 2014
1 parent 187bb52 commit 67c32e9
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
8 changes: 8 additions & 0 deletions package/yast2-update.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
-------------------------------------------------------------------
Tue Jul 1 06:38:02 UTC 2014 - lslezak@suse.cz

- remove all repositories when going back to close the open solv
files and allow successful unmount when changing the target
partition to update (bnc#876677)
- 3.1.18

-------------------------------------------------------------------
Mon Jun 30 14:32:39 UTC 2014 - jreidinger@suse.cz

Expand Down
2 changes: 1 addition & 1 deletion package/yast2-update.spec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


Name: yast2-update
Version: 3.1.17
Version: 3.1.18
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
Expand Down
13 changes: 13 additions & 0 deletions src/modules/Update.rb
Original file line number Diff line number Diff line change
Expand Up @@ -802,6 +802,19 @@ def SetDesktopPattern

#
def Detach
# release mounted devices
Pkg.SourceReleaseAll

# remove all repos except the initial installation repository
# to close the solv files and allow unmounting the target
repos_to_delete = Pkg.SourceGetCurrent(false)
repos_to_delete.delete(0)
log.info "Removing repositories: #{repos_to_delete}"

repos_to_delete.each do |repo_to_delete|
Pkg.SourceDelete(repo_to_delete)
end

Pkg.TargetFinish
@did_init1 = false
@did_init2 = false
Expand Down

0 comments on commit 67c32e9

Please sign in to comment.