Hello community,
here is the log from the commit of package yast2-installation for
openSUSE:Factory checked in at 2015-06-03 08:27:45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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
2015-05-23 13:00:57.000000000 +0200
+++
/work/SRC/openSUSE:Factory/.yast2-installation.new/yast2-installation.changes
2015-06-03 08:27:46.000000000 +0200
@@ -1,0 +2,14 @@
+Tue Jun 2 08:41:03 UTC 2015 - [email protected]
+
+- fix crash in Upgrade when creating post upgrade snapshot
+ (fate#317973)
+- 3.1.144
+
+-------------------------------------------------------------------
+Thu May 28 12:41:49 UTC 2015 - [email protected]
+
+- add a client to create a snapshot after installation/upgrade
+ (fate#317973)
+- 3.1.143
+
+-------------------------------------------------------------------
Old:
----
yast2-installation-3.1.142.tar.bz2
New:
----
yast2-installation-3.1.144.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-installation.spec ++++++
--- /var/tmp/diff_new_pack.VqtVPV/_old 2015-06-03 08:27:47.000000000 +0200
+++ /var/tmp/diff_new_pack.VqtVPV/_new 2015-06-03 08:27:47.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-installation
-Version: 3.1.142
+Version: 3.1.144
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -41,7 +41,7 @@
BuildRequires: rubygem(rspec)
# Base clients for inst clients
-BuildRequires: yast2 >= 3.1.112
+BuildRequires: yast2 >= 3.1.126
# Yast::Remote
BuildRequires: yast2-network
@@ -50,7 +50,7 @@
Requires: autoyast2-installation >= 3.1.5
# Wizard.OpenLeftTitleNextBackDialog
-Requires: yast2 >= 3.1.43
+Requires: yast2 >= 3.1.126
# Language::GetLanguageItems and other API
# Language::Set (handles downloading the translation extensions)
++++++ yast2-installation-3.1.142.tar.bz2 -> yast2-installation-3.1.144.tar.bz2
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-installation-3.1.142/package/yast2-installation.changes
new/yast2-installation-3.1.144/package/yast2-installation.changes
--- old/yast2-installation-3.1.142/package/yast2-installation.changes
2015-05-21 10:19:13.000000000 +0200
+++ new/yast2-installation-3.1.144/package/yast2-installation.changes
2015-06-02 10:54:08.000000000 +0200
@@ -1,4 +1,18 @@
-------------------------------------------------------------------
+Tue Jun 2 08:41:03 UTC 2015 - [email protected]
+
+- fix crash in Upgrade when creating post upgrade snapshot
+ (fate#317973)
+- 3.1.144
+
+-------------------------------------------------------------------
+Thu May 28 12:41:49 UTC 2015 - [email protected]
+
+- add a client to create a snapshot after installation/upgrade
+ (fate#317973)
+- 3.1.143
+
+-------------------------------------------------------------------
Wed May 20 19:29:48 UTC 2015 - [email protected]
- set Xvnc server resolution to 96 dpi to fix broken layout in VNC
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-installation-3.1.142/package/yast2-installation.spec
new/yast2-installation-3.1.144/package/yast2-installation.spec
--- old/yast2-installation-3.1.142/package/yast2-installation.spec
2015-05-21 10:19:13.000000000 +0200
+++ new/yast2-installation-3.1.144/package/yast2-installation.spec
2015-06-02 10:54:08.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-installation
-Version: 3.1.142
+Version: 3.1.144
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -38,7 +38,7 @@
BuildRequires: rubygem(rspec)
# Base clients for inst clients
-BuildRequires: yast2 >= 3.1.112
+BuildRequires: yast2 >= 3.1.126
# Yast::Remote
BuildRequires: yast2-network
@@ -47,7 +47,7 @@
Requires: autoyast2-installation >= 3.1.5
# Wizard.OpenLeftTitleNextBackDialog
-Requires: yast2 >= 3.1.43
+Requires: yast2 >= 3.1.126
# Language::GetLanguageItems and other API
# Language::Set (handles downloading the translation extensions)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-installation-3.1.142/src/Makefile.am
new/yast2-installation-3.1.144/src/Makefile.am
--- old/yast2-installation-3.1.142/src/Makefile.am 2015-05-21
10:19:13.000000000 +0200
+++ new/yast2-installation-3.1.144/src/Makefile.am 2015-06-02
10:54:08.000000000 +0200
@@ -65,6 +65,7 @@
clients/remote_finish.rb \
clients/save_config_finish.rb \
clients/save_hw_status_finish.rb \
+ clients/snapshots_finish.rb \
clients/ssh_settings_finish.rb \
clients/stroj-casu.rb \
clients/switch_scr_finish.rb \
@@ -112,7 +113,8 @@
lib/installation/prep_shrink.rb \
lib/installation/proposal_runner.rb \
lib/installation/proposal_store.rb \
- lib/installation/remote_finish_client.rb
+ lib/installation/remote_finish_client.rb \
+ lib/installation/snapshots_finish.rb
EXTRA_DIST = $(module_DATA) $(client_DATA) $(ynclude_DATA) $(scrconf_DATA)
$(schemafiles_DATA) $(desktop_DATA) $(fillup_DATA) $(ylib_DATA)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-installation-3.1.142/src/clients/inst_finish.rb
new/yast2-installation-3.1.144/src/clients/inst_finish.rb
--- old/yast2-installation-3.1.142/src/clients/inst_finish.rb 2015-05-21
10:19:13.000000000 +0200
+++ new/yast2-installation-3.1.144/src/clients/inst_finish.rb 2015-06-02
10:54:08.000000000 +0200
@@ -245,6 +245,7 @@
# copy logs just before 'umount'
# keeps maximum logs available after reboot
"copy_logs",
+ "snapshots",
"umount"
],
# bnc #438154
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-installation-3.1.142/src/clients/inst_upgrade_urls.rb
new/yast2-installation-3.1.144/src/clients/inst_upgrade_urls.rb
--- old/yast2-installation-3.1.142/src/clients/inst_upgrade_urls.rb
2015-05-21 10:19:13.000000000 +0200
+++ new/yast2-installation-3.1.144/src/clients/inst_upgrade_urls.rb
2015-06-02 10:54:08.000000000 +0200
@@ -71,7 +71,7 @@
return @ret
end
if !Mode.update
- Builtins.y2milestone("Not an udpate mode")
+ Builtins.y2milestone("Not an update mode")
return @ret
end
end
@@ -765,6 +765,10 @@
@repo_files_to_remove.each do |repo|
log.info "Removing repository: #{repo}"
+ if !repo["alias"]
+ log.warn "Repo alias is nil -> not removing it"
+ next
+ end
repo_alias_regexp = /^\s*\[#{Regexp.escape(repo["alias"])}\]\s*$/
path = File.join(Installation.destdir, "etc/zypp/repos.d",
"#{repo["alias"]}.repo")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-installation-3.1.142/src/clients/snapshots_finish.rb
new/yast2-installation-3.1.144/src/clients/snapshots_finish.rb
--- old/yast2-installation-3.1.142/src/clients/snapshots_finish.rb
1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-installation-3.1.144/src/clients/snapshots_finish.rb
2015-06-02 10:54:08.000000000 +0200
@@ -0,0 +1,3 @@
+require "installation/snapshots_finish"
+
+::Installation::SnapshotsFinish.run
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-installation-3.1.142/src/lib/installation/snapshots_finish.rb
new/yast2-installation-3.1.144/src/lib/installation/snapshots_finish.rb
--- old/yast2-installation-3.1.142/src/lib/installation/snapshots_finish.rb
1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-installation-3.1.144/src/lib/installation/snapshots_finish.rb
2015-06-02 10:54:08.000000000 +0200
@@ -0,0 +1,57 @@
+require "yast"
+require "yast2/fs_snapshot"
+require "yast2/fs_snapshot_store"
+require "installation/finish_client"
+
+module Installation
+ class SnapshotsFinish < ::Installation::FinishClient
+ include Yast::I18n
+
+ def initialize
+ textdomain "storage"
+
+ Yast.import "Mode"
+ Yast.import "StorageSnapper"
+ Yast.include self, "installation/misc.rb"
+ end
+
+ # Writes configuration
+ #
+ # It creates a snapshot when no second stage is required and
+ # Snapper is configured.
+ #
+ # @return [TrueClass,FalseClass] True if snapshot was created;
+ # otherwise it returns false.
+ def write
+ if !second_stage_required? && Yast2::FsSnapshot.configured?
+ log.info("Creating root filesystem snapshot")
+ if Mode.update
+ create_post_snapshot
+ else
+ create_single_snapshot
+ end
+ else
+ log.info("Skipping root filesystem snapshot creation")
+ false
+ end
+ end
+
+ def title
+ _("Creating root filesystem snapshot...")
+ end
+
+ private
+
+ def create_post_snapshot
+ pre_number = Yast2::FsSnapshotStore.load("upgrade")
+ Yast2::FsSnapshot.create_post("after upgrade", pre_number)
+ Yast2::FsSnapshotStore.clean("upgrade")
+ true
+ end
+
+ def create_single_snapshot
+ Yast2::FsSnapshot.create_single("after installation")
+ true
+ end
+ end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-installation-3.1.142/test/Makefile.am
new/yast2-installation-3.1.144/test/Makefile.am
--- old/yast2-installation-3.1.142/test/Makefile.am 2015-05-21
10:19:13.000000000 +0200
+++ new/yast2-installation-3.1.144/test/Makefile.am 2015-06-02
10:54:08.000000000 +0200
@@ -7,7 +7,8 @@
prep_shrink_test.rb \
proposal_store_test.rb \
proposal_runner_test.rb \
- remote_finish_test.rb
+ remote_finish_test.rb \
+ snapshots_finish_test.rb
TEST_EXTENSIONS = .rb
RB_LOG_COMPILER = rspec
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-installation-3.1.142/test/snapshots_finish_test.rb
new/yast2-installation-3.1.144/test/snapshots_finish_test.rb
--- old/yast2-installation-3.1.142/test/snapshots_finish_test.rb
1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-installation-3.1.144/test/snapshots_finish_test.rb
2015-06-02 10:54:08.000000000 +0200
@@ -0,0 +1,76 @@
+#!/usr/bin/env rspec
+
+require_relative "./test_helper"
+require "installation/snapshots_finish"
+
+describe ::Installation::SnapshotsFinish do
+ describe "#write" do
+ before do
+ allow(subject).to
receive(:second_stage_required?).and_return(second_stage_required)
+ allow(Yast2::FsSnapshot).to
receive(:configured?).and_return(snapper_configured)
+ end
+
+ context "when second stage is required" do
+ let(:second_stage_required) { true }
+
+ context "when snapper is configured" do
+ let(:snapper_configured) { true }
+
+ it "does not create any snapshot" do
+ expect(Yast2::FsSnapshot).to_not receive(:create_single)
+ expect(subject.write).to eq(false)
+ end
+ end
+
+ context "when snapper is not configured" do
+ let(:snapper_configured) { false }
+
+ it "does not create any snapshot" do
+ expect(Yast2::FsSnapshot).to_not receive(:create_single)
+ expect(subject.write).to eq(false)
+ end
+ end
+ end
+
+ context "when second stage isn't required" do
+ let(:second_stage_required) { false }
+
+ context "when snapper is configured" do
+ let(:snapper_configured) { true }
+
+ context "when upgrading" do
+ before do
+ allow(Yast::Mode).to receive(:update).and_return(true)
+ end
+
+ it "creates a snapshot of type 'post' with 'after upgrade' as
description and paired with 'pre' snapshot" do
+ expect(Yast2::FsSnapshotStore).to
receive(:load).with("upgrade").and_return(1)
+ expect(Yast2::FsSnapshotStore).to receive(:clean).with("upgrade")
+ expect(Yast2::FsSnapshot).to receive(:create_post).with("after
upgrade", 1).and_return(true)
+ expect(subject.write).to eq(true)
+ end
+ end
+
+ context "when installing" do
+ before do
+ allow(Yast::Mode).to receive(:update).and_return(false)
+ end
+
+ it "creates a snapshot of type 'single' with 'after installation' as
description" do
+ expect(Yast2::FsSnapshot).to receive(:create_single).with("after
installation").and_return(true)
+ expect(subject.write).to eq(true)
+ end
+ end
+ end
+
+ context "when snapper is not configured" do
+ let(:snapper_configured) { false }
+
+ it "does not create any snapshot" do
+ expect(Yast2::FsSnapshot).to_not receive(:create_single)
+ expect(subject.write).to eq(false)
+ end
+ end
+ end
+ end
+end