Skip to content

Commit

Permalink
Merge ca7e906 into 4196883
Browse files Browse the repository at this point in the history
  • Loading branch information
lslezak committed Mar 19, 2021
2 parents 4196883 + ca7e906 commit 7cec9a0
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 102 deletions.
12 changes: 12 additions & 0 deletions package/yast2-packager.changes
@@ -1,3 +1,15 @@
-------------------------------------------------------------------
Thu Mar 18 16:33:19 UTC 2021 - Ladislav Slezák <lslezak@suse.cz>

- Do not create zypp cache symlink when running in installed
system, it would create /var/cache/zypp -> /var/cache/zypp
loop (bsc#1183683)
- Remove the "Software Repositories" button from the YaST console,
users can easily break the installer with it. Added
"configure_repositories" command to the command line interface
for experts (bsc#1183687)
- 4.3.20

-------------------------------------------------------------------
Thu Mar 11 15:01:58 UTC 2021 - Ladislav Slezák <lslezak@suse.cz>

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


Name: yast2-packager
Version: 4.3.19
Version: 4.3.20
Release: 0
Summary: YaST2 - Package Library
License: GPL-2.0-or-later
Expand Down
25 changes: 16 additions & 9 deletions src/clients/inst_kickoff.rb
Expand Up @@ -46,15 +46,7 @@ def main
)
end

# copy the credential files (libzypp loads them from target)
# and the repository cache to the target system
Pkg.SourceCacheCopyTo(Installation.destdir)

# symlink the cache from inst-sys to save same space (RAM!)
cache_path = Pkg.ZConfig()["repo_cache_path"] || "/var/cache/zypp"
log.info("Zypp cache size: #{`du -h -s #{cache_path.shellescape}`}")
::FileUtils.rm_rf(cache_path)
File.symlink(File.join(Installation.destdir, cache_path), cache_path)
copy_zypp_cache

# installation, for instance...
if !Mode.update
Expand Down Expand Up @@ -139,6 +131,21 @@ def main
:next
end

# copy the zypp cache to the target system (only when running in inst-sys!)
def copy_zypp_cache
return unless Stage.initial

# copy the credential files (libzypp loads them from target)
# and the repository cache to the target system
Pkg.SourceCacheCopyTo(Installation.destdir)

# symlink the cache from inst-sys to save same space (RAM!)
cache_path = Pkg.ZConfig()["repo_cache_path"] || "/var/cache/zypp"
log.info("Zypp cache size: #{`du -h -s #{cache_path.shellescape}`}")
::FileUtils.rm_rf(cache_path)
File.symlink(File.join(Installation.destdir, cache_path), cache_path)
end

# Handle the backup.
def backup_stuff
if Installation.update_backup_modified
Expand Down
@@ -0,0 +1,30 @@
# ------------------------------------------------------------------------------
# Copyright (c) 2021 SUSE LLC, All Rights Reserved.
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of version 2 of the GNU General Public License as published by the
# Free Software Foundation.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# ------------------------------------------------------------------------------

module Installation
module Console
# define the "configure_repositories" command in the expert console
class Commands
def configure_repositories
run_yast_module("repositories")
end

private

def configure_repositories_description
"Run the repository manager. Be careful when using it,\n" \
"you might easily break the installer when wrongly used!"
end
end
end
end
52 changes: 0 additions & 52 deletions src/lib/installation/console/plugins/repositories_button.rb

This file was deleted.

40 changes: 0 additions & 40 deletions test/lib/installation/plugins/repositories_button_test.rb

This file was deleted.

0 comments on commit 7cec9a0

Please sign in to comment.