Hello community,
here is the log from the commit of package yast2-installation for
openSUSE:Factory checked in at 2014-06-06 14:36:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-installation (Old)
and /work/SRC/openSUSE:Factory/.yast2-installation.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-installation"
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-installation/yast2-installation.changes
2014-06-02 07:04:31.000000000 +0200
+++
/work/SRC/openSUSE:Factory/.yast2-installation.new/yast2-installation.changes
2014-06-06 14:36:34.000000000 +0200
@@ -1,0 +2,12 @@
+Tue Jun 3 13:53:15 UTC 2014 - [email protected]
+
+- inst_upgrade_urls.rb client:
+ - remove old repositories (repo files) to avoid loading old
+ SLE11 repositories when refreshing a registered service
+ (bnc#880971)
+ - remove old services to get rid of the old NCC service
+ (Note: everything is backed up into /var/adm/backup/upgrade/zypp
+ directory)
+- 3.1.88
+
+-------------------------------------------------------------------
Old:
----
yast2-installation-3.1.87.tar.bz2
New:
----
yast2-installation-3.1.88.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-installation.spec ++++++
--- /var/tmp/diff_new_pack.aja9g4/_old 2014-06-06 14:36:35.000000000 +0200
+++ /var/tmp/diff_new_pack.aja9g4/_new 2014-06-06 14:36:35.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-installation
-Version: 3.1.87
+Version: 3.1.88
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
++++++ yast2-installation-3.1.87.tar.bz2 -> yast2-installation-3.1.88.tar.bz2
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-installation-3.1.87/package/yast2-installation.changes
new/yast2-installation-3.1.88/package/yast2-installation.changes
--- old/yast2-installation-3.1.87/package/yast2-installation.changes
2014-05-29 10:25:43.000000000 +0200
+++ new/yast2-installation-3.1.88/package/yast2-installation.changes
2014-06-03 17:10:28.000000000 +0200
@@ -1,4 +1,16 @@
-------------------------------------------------------------------
+Tue Jun 3 13:53:15 UTC 2014 - [email protected]
+
+- inst_upgrade_urls.rb client:
+ - remove old repositories (repo files) to avoid loading old
+ SLE11 repositories when refreshing a registered service
+ (bnc#880971)
+ - remove old services to get rid of the old NCC service
+ (Note: everything is backed up into /var/adm/backup/upgrade/zypp
+ directory)
+- 3.1.88
+
+-------------------------------------------------------------------
Thu May 29 08:23:21 UTC 2014 - [email protected]
- better error message for accepting the license (bnc#875183)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-installation-3.1.87/package/yast2-installation.spec
new/yast2-installation-3.1.88/package/yast2-installation.spec
--- old/yast2-installation-3.1.87/package/yast2-installation.spec
2014-05-29 10:25:43.000000000 +0200
+++ new/yast2-installation-3.1.88/package/yast2-installation.spec
2014-06-03 17:10:28.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-installation
-Version: 3.1.87
+Version: 3.1.88
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-installation-3.1.87/src/clients/inst_upgrade_urls.rb
new/yast2-installation-3.1.88/src/clients/inst_upgrade_urls.rb
--- old/yast2-installation-3.1.87/src/clients/inst_upgrade_urls.rb
2014-05-29 10:25:43.000000000 +0200
+++ new/yast2-installation-3.1.88/src/clients/inst_upgrade_urls.rb
2014-06-03 17:10:28.000000000 +0200
@@ -18,8 +18,13 @@
# To contact Novell about this file by physical or electronic mail, you may
find
# current contact information at www.novell.com.
#
------------------------------------------------------------------------------
+
+require "fileutils"
+
module Yast
class InstUpgradeUrlsClient < Client
+ include Yast::Logger
+
def main
Yast.import "Pkg"
Yast.import "UI"
@@ -80,6 +85,9 @@
@repos_to_remove = []
+ # repositories for removal (the repo files will be removed directly)
+ @repo_files_to_remove = []
+
@repos_to_add = []
@id_to_url = {}
@@ -123,6 +131,8 @@
Pkg.TargetInitialize(Installation.destdir)
# bnc #429080
Pkg.TargetLoad
+ # Note: does not work when a repository is already registered
+ # in pkg-bindings!
Pkg.SourceStartManager(false)
@current_repos_list = Pkg.SourceGetCurrent(
@@ -561,7 +571,7 @@
if status == @REPO_REMOVED
status = @REPO_ENABLED
elsif status == @REPO_ENABLED
- status = @REPO_DISABLED
+ status = @REPO_DISABLED
# disabled
else
status = @REPO_REMOVED
@@ -808,6 +818,41 @@
# Removes selected repositories
def IUU_RemoveRepositories
+ if !@repo_files_to_remove.empty?
+ backup_dir = File.join(Installation.destdir,
"var/adm/backup/upgrade/zypp/repos.d")
+
+ ::FileUtils.mkdir_p(backup_dir)
+
+ @repo_files_to_remove.each do |repo|
+ log.info "Removing repository: #{repo}"
+ repo_alias_regexp = /^\s*\[#{Regexp.escape(repo["alias"])}\]\s*$/
+
+ path = File.join(Installation.destdir, "etc/zypp/repos.d",
"#{repo["alias"]}.repo")
+ # quick search: check if the <alias>.repo file exists with the
repository
+ if File.exist?(path) && File.read(path).match(repo_alias_regexp)
+ log.info "Removing file #{path} (backed up in #{backup_dir})"
+ ::FileUtils.mv(path, backup_dir)
+ else
+ # do a full search: find the appropriate repo file
+ repo_file = Dir[File.join(Installation.destdir,
"etc/zypp/repos.d/*.repo")].find do |file|
+ File.read(file).match(repo_alias_regexp)
+ end
+
+ if repo_file
+ log.info "Removing file #{repo_file} (backed up in
#{backup_dir})"
+ ::FileUtils.mv(repo_file, backup_dir)
+ else
+ log.warn "Repofile for repository #{repo["alias"]} was not
found, not removing"
+ end
+ end
+ end
+
+ # force reloading the libzypp repomanager to notice the removed files
+ Pkg.TargetFinish
+ Pkg.TargetInitialize(Installation.destdir)
+ Pkg.TargetLoad
+ end
+
return if Builtins.size(@repos_to_remove) == 0
Progress.Title(_("Removing unused repositories..."))
@@ -829,6 +874,18 @@
nil
end
+ def remove_services
+ service_files = Dir[File.join(Installation.destdir,
"/etc/zypp/services.d/*.service")]
+
+ if !service_files.empty?
+ backup_dir = File.join(Installation.destdir,
"var/adm/backup/upgrade/zypp/services.d")
+ ::FileUtils.mkdir_p(backup_dir)
+
+ log.info "Moving #{service_files} to #{backup_dir}"
+ ::FileUtils.mv(service_files, backup_dir)
+ end
+ end
+
def InsertCorrectMediaHandler(url, name)
if !Builtins.regexpmatch(url, "^cd:/") &&
!Builtins.regexpmatch(url, "^dvd:/")
@@ -1113,6 +1170,7 @@
@repos_to_add = []
@id_to_url = {}
@repos_to_add_disabled = []
+ @repo_files_to_remove = []
# bnc #400823
@do_not_remove = Ops.get(Pkg.SourceGetCurrent(false), 0, 0)
@@ -1151,16 +1209,18 @@
@repos_to_remove = Builtins.add(@repos_to_remove,
current_medianr)
Builtins.y2milestone("Repository to remove: %1", current_medianr)
end
- end
+ end
# Repository should be removed (not added)
elsif Ops.get_string(one_source, "new_status", "") == @REPO_REMOVED
if Ops.get_string(one_source, "initial_url_status", "") ==
@REPO_REMOVED
- Builtins.y2milestone("Repository has been already removed")
+ log.info "Repository not loaded or already removed"
+ # repository is not known to pkg-bindings, remove the repo file
directly
+ @repo_files_to_remove << one_source
else
@repos_to_remove = Builtins.add(@repos_to_remove, current_medianr)
Builtins.y2milestone("Repository to remove: %1", current_medianr)
- end
+ end
# Repositry will be added in disabled state
# BNC #583155
@@ -1220,6 +1280,10 @@
PackageCallbacks.RegisterEmptyProgressCallbacks
+ # (re)move old services - there is no UI for services,
+ # but we really need to get rid of the old NCC service...
+ remove_services
+
IUU_RemoveRepositories()
# Add repositories in enabled state
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]