Hello community,

here is the log from the commit of package zypper-migration-plugin for 
openSUSE:Factory checked in at 2018-03-13 10:24:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/zypper-migration-plugin (Old)
 and      /work/SRC/openSUSE:Factory/.zypper-migration-plugin.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "zypper-migration-plugin"

Tue Mar 13 10:24:19 2018 rev:3 rq:585919 version:0.11.1520597355.bcf74ad

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/zypper-migration-plugin/zypper-migration-plugin.changes
  2018-01-26 13:39:45.192583907 +0100
+++ 
/work/SRC/openSUSE:Factory/.zypper-migration-plugin.new/zypper-migration-plugin.changes
     2018-03-13 10:24:20.337124620 +0100
@@ -1,0 +2,6 @@
+Fri Mar  9 11:37:00 UTC 2018 - nadvor...@suse.com
+
+- version 0.11.1520597355.bcf74ad
+  - more changes to get --root working
+
+-------------------------------------------------------------------
@@ -3,0 +10 @@
+- version 0.11.1516874532.fa20262
@@ -5 +11,0 @@
-- version 0.11

Old:
----
  zypper-migration-0.11.1516874532.fa20262.tar.xz

New:
----
  zypper-migration-0.11.1520597355.bcf74ad.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ zypper-migration-plugin.spec ++++++
--- /var/tmp/diff_new_pack.998nB0/_old  2018-03-13 10:24:21.521082201 +0100
+++ /var/tmp/diff_new_pack.998nB0/_new  2018-03-13 10:24:21.525082058 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           zypper-migration-plugin
-Version:        0.11.1516874532.fa20262
+Version:        0.11.1520597355.bcf74ad
 Release:        0
 Url:            https://github.com/SUSE/zypper-migration
 Requires:       zypper >= 1.11.38
@@ -27,7 +27,7 @@
 BuildRequires:  zypper >= 1.11.38
 Source:         zypper-migration-%{version}.tar.xz
 Summary:        Zypper subcommand for online migration
-License:        GPL-2.0
+License:        GPL-2.0-only
 Group:          System/Packages
 BuildArch:      noarch
 Supplements:    packageand(zypper:SUSEConnect)

++++++ zypper-migration-0.11.1516874532.fa20262.tar.xz -> 
zypper-migration-0.11.1520597355.bcf74ad.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/zypper-migration-0.11.1516874532.fa20262/zypper-migration 
new/zypper-migration-0.11.1520597355.bcf74ad/zypper-migration
--- old/zypper-migration-0.11.1516874532.fa20262/zypper-migration       
2018-01-25 11:02:12.000000000 +0100
+++ new/zypper-migration-0.11.1520597355.bcf74ad/zypper-migration       
2018-03-09 13:09:15.000000000 +0100
@@ -81,7 +81,7 @@
 end
 
 
-def zypp_backup()
+def zypp_backup(root)
   tarball_path = "/var/adm/backup/system-upgrade/repos.tar.gz"
   paths = [
             "/etc/zypp/repos.d",
@@ -89,7 +89,7 @@
             "/etc/zypp/services.d"
           ]
 
-  create_tarball(tarball_path, '/', paths)
+  create_tarball(tarball_path, root, paths)
 
   script_path = "/var/adm/backup/system-upgrade/repos.sh"
   create_restore_script(script_path, tarball_path, paths)
@@ -202,37 +202,27 @@
   opts.on("--root DIR", "Operate on a different root directory") do |r|
     options[:root] = r
     SUSE::Connect::System.filesystem_root = r
+    # if we update a chroot system, we cannot create snapshots of it
+    options[:no_snapshots] = true
   end
 
 end.parse!
 
+# Update stack can be outside of the to be updated system
 cmd = "zypper " +
       (options[:non_interactive] ? "--non-interactive " : "") +
       (options[:verbose] ? "--verbose " : "") +
       (options[:quiet] ? "--quiet " : "") +
-      " refresh"
-print "\nExecuting '#{cmd}'\n\n" unless options[:quiet]
-if !system cmd
-  print print "repository refresh failed, exiting\n"
-  exit 1
-end
-
-cmd = "zypper " +
-      (options[:root] ? "--root #{options[:root]} " : "") +
-      (options[:non_interactive] ? "--non-interactive " : "") +
-      (options[:verbose] ? "--verbose " : "") +
-      (options[:quiet] ? "--quiet " : "") +
-      " --no-refresh patch-check --updatestack-only"
+      "patch-check --updatestack-only"
 print "\nExecuting '#{cmd}'\n\n" unless options[:quiet]
 if !system cmd
   if $?.exitstatus >= 100
     # install pending updates and restart
     cmd = "zypper " +
-          (options[:root] ? "--root #{options[:root]} " : "") +
           (options[:non_interactive] ? "--non-interactive " : "") +
           (options[:verbose] ? "--verbose " : "") +
           (options[:quiet] ? "--quiet " : "") +
-          " --no-refresh patch --updatestack-only"
+          "--no-refresh patch --updatestack-only"
     print "\nExecuting '#{cmd}'\n\n" unless options[:quiet]
     system cmd
 
@@ -253,6 +243,19 @@
 end
 print "\n" unless options[:quiet]
 
+# This is only necessary, if we run with --root option
+cmd = "zypper " +
+      (options[:root] ? "--root #{options[:root]} " : "") +
+      (options[:non_interactive] ? "--non-interactive " : "") +
+      (options[:verbose] ? "--verbose " : "") +
+      (options[:quiet] ? "--quiet " : "") +
+      " refresh"
+print "\nExecuting '#{cmd}'\n\n" unless options[:quiet]
+if !system cmd
+  print print "repository refresh failed, exiting\n"
+  exit 1
+end
+
 begin
   system_products = SUSE::Connect::Migration::system_products
 
@@ -389,7 +392,7 @@
   trap('INT') { interrupted = true }
   trap('TERM') { interrupted = true }
 
-  zypp_backup
+  zypp_backup(options[:root] ? options[:root]: "/")
 
   raise "Interrupted." if interrupted
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/zypper-migration-0.11.1516874532.fa20262/zypper-migration-plugin.changes 
new/zypper-migration-0.11.1520597355.bcf74ad/zypper-migration-plugin.changes
--- 
old/zypper-migration-0.11.1516874532.fa20262/zypper-migration-plugin.changes    
    2018-01-25 11:02:12.000000000 +0100
+++ 
new/zypper-migration-0.11.1520597355.bcf74ad/zypper-migration-plugin.changes    
    2018-03-09 13:09:15.000000000 +0100
@@ -1,4 +1,9 @@
 -------------------------------------------------------------------
+Fri Mar  9 11:37:00 UTC 2018 - nadvor...@suse.com
+
+- more changes to get --root working
+
+-------------------------------------------------------------------
 Thu Jan 25 09:54:05 UTC 2018 - nadvor...@suse.com
 
 - add --no-snapshots and --root options


Reply via email to