Hello community,
here is the log from the commit of package yast2-installation for openSUSE:Factory checked in at 2015-02-22 17:25: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 2015-02-13 08:34:12.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.yast2-installation.new/yast2-installation.changes 2015-02-22 17:25:23.000000000 +0100
@@ -1,0 +2,13 @@
+Tue Feb 17 14:24:19 CET 2015 - aschnell@suse.de
+
+- get list of mounts from /proc/mounts in umount_finish (for
+ fate#318392)
+- 3.1.134
+
+-------------------------------------------------------------------
+Mon Feb 16 12:44:16 UTC 2015 - cwh@suse.com
+
+- Delete or copy install.inf as applicable (bnc#897066)
+- 3.1.133
+
+-------------------------------------------------------------------
Old:
----
yast2-installation-3.1.132.tar.bz2
New:
----
yast2-installation-3.1.134.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-installation.spec ++++++
--- /var/tmp/diff_new_pack.7pyICr/_old 2015-02-22 17:25:24.000000000 +0100
+++ /var/tmp/diff_new_pack.7pyICr/_new 2015-02-22 17:25:24.000000000 +0100
@@ -17,7 +17,7 @@
Name: yast2-installation
-Version: 3.1.132
+Version: 3.1.134
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
++++++ yast2-installation-3.1.132.tar.bz2 -> yast2-installation-3.1.134.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-3.1.132/package/yast2-installation.changes new/yast2-installation-3.1.134/package/yast2-installation.changes
--- old/yast2-installation-3.1.132/package/yast2-installation.changes 2015-02-11 10:34:11.000000000 +0100
+++ new/yast2-installation-3.1.134/package/yast2-installation.changes 2015-02-19 12:14:12.000000000 +0100
@@ -1,4 +1,17 @@
-------------------------------------------------------------------
+Tue Feb 17 14:24:19 CET 2015 - aschnell@suse.de
+
+- get list of mounts from /proc/mounts in umount_finish (for
+ fate#318392)
+- 3.1.134
+
+-------------------------------------------------------------------
+Mon Feb 16 12:44:16 UTC 2015 - cwh@suse.com
+
+- Delete or copy install.inf as applicable (bnc#897066)
+- 3.1.133
+
+-------------------------------------------------------------------
Wed Feb 11 09:03:38 UTC 2015 - lslezak@suse.cz
- removed redundant initialization label (bnc#878538)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-3.1.132/package/yast2-installation.spec new/yast2-installation-3.1.134/package/yast2-installation.spec
--- old/yast2-installation-3.1.132/package/yast2-installation.spec 2015-02-11 10:34:11.000000000 +0100
+++ new/yast2-installation-3.1.134/package/yast2-installation.spec 2015-02-19 12:14:12.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package yast2-installation
#
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
Name: yast2-installation
-Version: 3.1.132
+Version: 3.1.134
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-3.1.132/src/clients/copy_files_finish.rb new/yast2-installation-3.1.134/src/clients/copy_files_finish.rb
--- old/yast2-installation-3.1.132/src/clients/copy_files_finish.rb 2015-02-11 10:34:11.000000000 +0100
+++ new/yast2-installation-3.1.134/src/clients/copy_files_finish.rb 2015-02-19 12:14:12.000000000 +0100
@@ -127,7 +127,11 @@
# --------------------------------------------------------------
# Copy /etc/install.inf into built system so that the
# second phase of the installation can find it.
- Linuxrc.SaveInstallInf(Installation.destdir)
+ if second_stage_required?
+ Linuxrc.SaveInstallInf(Installation.destdir)
+ else
+ SCR.Execute(path(".target.remove"), "/etc/install.inf")
+ end
# Copy control.xml so it can be read once again during continue mode
Builtins.y2milestone("Copying YaST control file")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-3.1.132/src/clients/umount_finish.rb new/yast2-installation-3.1.134/src/clients/umount_finish.rb
--- old/yast2-installation-3.1.132/src/clients/umount_finish.rb 2015-02-11 10:34:11.000000000 +0100
+++ new/yast2-installation-3.1.134/src/clients/umount_finish.rb 2015-02-19 12:14:12.000000000 +0100
@@ -20,18 +20,18 @@
# ------------------------------------------------------------------------------
# File:
-# umount_finish.ycp
+# umount_finish.rb
#
# Module:
# Step of base installation finish
#
# Authors:
# Jiri Srain
-#
-# $Id$
-#
+
module Yast
class UmountFinishClient < Client
+ include Yast::Logger
+
def main
Yast.import "Pkg"
@@ -82,13 +82,6 @@
Pkg.SourceSaveAll
Pkg.TargetFinish
- # loop over all filesystems
- @mountPoints = Convert.convert(
- Storage.GetMountPoints,
- from: "map",
- to: "map "
- )
- Builtins.y2milestone("Known mount points: %1", @mountPoints)
Builtins.y2milestone(
"/proc/mounts:\n%1",
WFM.Read(path(".local.string"), "/proc/mounts")
@@ -98,16 +91,19 @@
WFM.Read(path(".local.string"), "/proc/partitions")
)
- @umountList = []
-
- # go through mountPoints collecting paths in umountList
- # *** umountList is lexically ordered !
-
- Builtins.foreach(@mountPoints) do |mountpoint, _mountval|
- if mountpoint != "swap"
- @umountList = Builtins.add(@umountList, mountpoint)
+ # get mounts at and in the target from /proc/mounts - do not use
+ # Storage here since Storage does not know whether other processes,
+ # e.g. snapper, mounted filesystems in the target
+
+ umount_list = []
+ SCR.Read(path(".proc.mounts")).each do |entry|
+ mountpoint = entry["file"]
+ if mountpoint.start_with?(Installation.destdir)
+ umount_list << mountpoint[Installation.destdir.length, mountpoint.length]
end
end
+ umount_list.sort!
+ log.info("umount_list:#{umount_list}")
# symlink points to /proc, keep it (bnc#665437)
if !FileUtils.IsLink("/etc/mtab")
@@ -187,33 +183,33 @@
# first umount all file based crypto fs since they potentially
# could mess up umounting of normale filesystems if the crypt
# file is not on the root fs
- Builtins.y2milestone("umount list %1", @umountList)
+ Builtins.y2milestone("umount list %1", umount_list)
Builtins.foreach(
Ops.get_list(@targetMap, ["/dev/loop", "partitions"], [])
) do |e|
if Ops.greater_than(Builtins.size(Ops.get_string(e, "mount", "")), 0)
Storage.Umount(Ops.get_string(e, "device", ""), true)
- @umountList = Builtins.filter(@umountList) do |m|
+ umount_list = Builtins.filter(umount_list) do |m|
m != Ops.get_string(e, "mount", "")
end
Builtins.y2milestone(
"loop umount %1 new list %2",
Ops.get_string(e, "mount", ""),
- @umountList
+ umount_list
)
end
end
- # *** umountList is lexically ordered !
+ # *** umount_list is lexically ordered !
# now umount in reverse order (guarantees "/" as last umount)
- @umountLength = Builtins.size(@umountList)
+ @umountLength = Builtins.size(umount_list)
while Ops.greater_than(@umountLength, 0)
@umountLength = Ops.subtract(@umountLength, 1)
@tmp = Ops.add(
Installation.destdir,
- Ops.get(@umountList, @umountLength, "")
+ Ops.get(umount_list, @umountLength, "")
)
Builtins.y2milestone(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-3.1.132/src/include/installation/inst_inc_first.rb new/yast2-installation-3.1.134/src/include/installation/inst_inc_first.rb
--- old/yast2-installation-3.1.132/src/include/installation/inst_inc_first.rb 2015-02-11 10:34:11.000000000 +0100
+++ new/yast2-installation-3.1.134/src/include/installation/inst_inc_first.rb 2015-02-19 12:14:12.000000000 +0100
@@ -172,45 +172,18 @@
end
def HandleSecondStageRequired
- if Stage.initial
- # the current one is 'initial'
- run_second_stage = true
- if (Mode.autoinst || Mode.autoupgrade) && !AutoinstConfig.second_stage
- run_second_stage = false
- Builtins.y2milestone("Autoyast: second stage is disabled")
- else
- # after reboot/kexec it would be 'continue'
- stage_to_check = "continue"
+ # file name
+ run_yast_at_boot = "#{Installation.destdir}/#{Installation.run_yast_at_boot}"
- # for matching the control file
- mode_to_check = Mode.mode
-
- # file name
- run_yast_at_boot = Builtins.sformat(
- "%1/%2",
- Installation.destdir,
- Installation.run_yast_at_boot
- )
-
- Builtins.y2milestone(
- "Checking RunRequired (%1, %2)",
- stage_to_check,
- mode_to_check
- )
- run_second_stage = ProductControl.RunRequired(stage_to_check, mode_to_check)
- end
-
- if run_second_stage
- Builtins.y2milestone("Running the second stage is required")
- WFM.Write(path(".local.string"), run_yast_at_boot, "")
- WriteSecondStageRequired(true)
- else
- Builtins.y2milestone("It is not required to run the second stage")
- WFM.Execute(path(".local.remove"), run_yast_at_boot)
- WriteSecondStageRequired(false)
- end
+ if second_stage_required?
+ Builtins.y2milestone("Running the second stage is required")
+ WFM.Write(path(".local.string"), run_yast_at_boot, "")
+ WriteSecondStageRequired(true)
+ else
+ Builtins.y2milestone("It is not required to run the second stage")
+ WFM.Execute(path(".local.remove"), run_yast_at_boot)
+ WriteSecondStageRequired(false)
end
-
nil
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-3.1.132/src/include/installation/misc.rb new/yast2-installation-3.1.134/src/include/installation/misc.rb
--- old/yast2-installation-3.1.132/src/include/installation/misc.rb 2015-02-11 10:34:11.000000000 +0100
+++ new/yast2-installation-3.1.134/src/include/installation/misc.rb 2015-02-19 12:14:12.000000000 +0100
@@ -365,5 +365,30 @@
nil
end
+
+ def second_stage_required?
+ return false unless Stage.initial
+
+ # the current one is 'initial'
+ if (Mode.autoinst || Mode.autoupgrade) && !AutoinstConfig.second_stage
+ run_second_stage = false
+ Builtins.y2milestone("Autoyast: second stage is disabled")
+ else
+ # after reboot/kexec it would be 'continue'
+ stage_to_check = "continue"
+
+ # for matching the control file
+ mode_to_check = Mode.mode
+
+ Builtins.y2milestone(
+ "Checking RunRequired (%1, %2)",
+ stage_to_check,
+ mode_to_check
+ )
+ run_second_stage = ProductControl.RunRequired(stage_to_check, mode_to_check)
+ end
+
+ run_second_stage
+ end
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-3.1.132/test/installation_misc_test.rb new/yast2-installation-3.1.134/test/installation_misc_test.rb
--- old/yast2-installation-3.1.132/test/installation_misc_test.rb 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-installation-3.1.134/test/installation_misc_test.rb 2015-02-19 12:14:12.000000000 +0100
@@ -0,0 +1,97 @@
+#! /usr/bin/env rspec
+
+require_relative "./test_helper"
+require_relative "../src/include/installation/misc"
+
+# a testing class for includign the "misc" include
+class InstallationMiscIncludeTest
+ include Yast::InstallationMiscInclude
+end
+
+# we need to mock these modules
+Yast.import "Stage"
+Yast.import "Mode"
+Yast.import "AutoinstConfig"
+Yast.import "ProductControl"
+
+def stub_initialstage(bool)
+ allow(Yast::Stage).to receive(:initial).and_return(bool)
+end
+
+def stub_autoinst(bool)
+ allow(Yast::Mode).to receive(:autoinst).and_return(bool)
+end
+
+def stub_autoupgrade(bool)
+ allow(Yast::Mode).to receive(:autoupgrade).and_return(bool)
+end
+
+def stub_secondstage(bool)
+ allow(Yast::AutoinstConfig).to receive(:second_stage).and_return(bool)
+end
+
+describe Yast::InstallationMiscInclude do
+ subject { InstallationMiscIncludeTest.new }
+ describe "#second_stage_required?" do
+ before { allow(Yast::ProductControl).to receive(:RunRequired).and_return(true) }
+
+ it "returns false when in initial stage" do
+ stub_initialstage(false)
+ expect(subject.second_stage_required?).to eq false
+ end
+
+ context "when in autoinst mode" do
+ before do
+ stub_autoinst(true)
+ stub_autoupgrade(false)
+ stub_initialstage(true)
+ end
+
+ it "returns true when second stage is defined in autoinst configuration" do
+ stub_secondstage(true)
+ expect(subject.second_stage_required?).to eq true
+ end
+
+ it "returns false when second stage is not defined in autoinst configuration" do
+ stub_secondstage(false)
+ expect(subject.second_stage_required?).to eq false
+ end
+ end
+
+ context "when in autoupgrade mode" do
+ before do
+ stub_autoinst(false)
+ stub_autoupgrade(true)
+ stub_initialstage(true)
+ end
+
+ it "returns true when second stage is defined in autoinst configuration" do
+ stub_secondstage(true)
+ expect(subject.second_stage_required?).to eq true
+ end
+
+ it "returns false when second stage is not defined in autoinst configuration" do
+ stub_secondstage(false)
+ expect(subject.second_stage_required?).to eq false
+ end
+ end
+
+ context "when in neiter in autoinst nor in autoupgrade mode" do
+ before do
+ stub_autoinst(false)
+ stub_autoupgrade(false)
+ stub_initialstage(true)
+ end
+
+ it "returns true when second stage is defined in autoinst configuration" do
+ stub_secondstage(true)
+ expect(subject.second_stage_required?).to eq true
+ end
+
+ it "returns true when second stage is not defined in autoinst configuration" do
+ stub_secondstage(false)
+ expect(subject.second_stage_required?).to eq true
+ end
+ end
+ end
+end
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org