Hello community,

here is the log from the commit of package autoyast2 for openSUSE:Factory 
checked in at 2017-04-12 17:10:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/autoyast2 (Old)
 and      /work/SRC/openSUSE:Factory/.autoyast2.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "autoyast2"

Wed Apr 12 17:10:49 2017 rev:221 rq:487563 version:3.2.13

Changes:
--------
--- /work/SRC/openSUSE:Factory/autoyast2/autoyast2.changes      2017-02-18 
03:15:21.424062373 +0100
+++ /work/SRC/openSUSE:Factory/.autoyast2.new/autoyast2.changes 2017-04-12 
17:10:50.612894879 +0200
@@ -1,0 +2,27 @@
+Thu Apr  6 11:27:01 UTC 2017 - [email protected]
+
+- Fix subvolumes schema definition (bsc#1013047)
+- 3.2.13
+
+-------------------------------------------------------------------
+Thu Apr  6 09:39:06 UTC 2017 - [email protected]
+
+- bnc#1026027
+  - removed dependency on insserv
+- 3.2.12
+
+-------------------------------------------------------------------
+Wed Apr  5 10:34:17 CEST 2017 - [email protected]
+
+- Added configuration-management to first installation step.
+  (FATE#319830)
+- 3.2.11
+
+-------------------------------------------------------------------
+Tue Mar  7 09:39:12 CET 2017 - [email protected]
+
+- Update: Product selection will be done by Packages.SelectProduct
+  now (bnc#1014861).
+- 3.2.10
+
+-------------------------------------------------------------------

Old:
----
  autoyast2-3.2.9.tar.bz2

New:
----
  autoyast2-3.2.13.tar.bz2

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

Other differences:
------------------
++++++ autoyast2.spec ++++++
--- /var/tmp/diff_new_pack.OHtSGu/_old  2017-04-12 17:10:51.220808823 +0200
+++ /var/tmp/diff_new_pack.OHtSGu/_new  2017-04-12 17:10:51.228807691 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           autoyast2
-Version:        3.2.9
+Version:        3.2.13
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
@@ -70,8 +70,6 @@
 Provides:       yast2-lib-autoinst
 Obsoletes:      yast2-lib-autoinst
 
-PreReq:         %insserv_prereq %fillup_prereq
-
 BuildArch:      noarch
 
 Requires:       yast2-ruby-bindings >= 1.0.0

++++++ autoyast2-3.2.9.tar.bz2 -> autoyast2-3.2.13.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/autoyast2-3.2.9/README.md 
new/autoyast2-3.2.13/README.md
--- old/autoyast2-3.2.9/README.md       2017-02-15 16:46:33.769183717 +0100
+++ new/autoyast2-3.2.13/README.md      2017-04-12 14:45:30.534433241 +0200
@@ -3,6 +3,7 @@
 
 [![Travis 
Build](https://travis-ci.org/yast/yast-autoinstallation.svg?branch=master)](https://travis-ci.org/yast/yast-autoinstallation)
 [![Jenkins 
Build](http://img.shields.io/jenkins/s/https/ci.opensuse.org/yast-autoinstallation-master.svg)](https://ci.opensuse.org/view/Yast/job/yast-autoinstallation-master/)
+[![Coverage 
Status](https://coveralls.io/repos/github/yast/yast-autoinstallation/badge.svg?branch=master)](https://coveralls.io/github/yast/yast-autoinstallation?branch=master)
 
 
 Development
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/autoyast2-3.2.9/doc/network_scenarios.md 
new/autoyast2-3.2.13/doc/network_scenarios.md
--- old/autoyast2-3.2.9/doc/network_scenarios.md        1970-01-01 
01:00:00.000000000 +0100
+++ new/autoyast2-3.2.13/doc/network_scenarios.md       2017-04-12 
14:45:30.534433241 +0200
@@ -0,0 +1,415 @@
+Introduction
+============
+
+This document tries to clarify some doubts and expectations related to 
AutoYaST network
+configuration, specially regarding the `keep_install_network` option.
+
+We put special attemption to that flag because there was a bug in SP1 which 
caused the
+ network configuration being saved always even with 
`keep_install_network=false`. After
+ the bug was fixed, users who were using a SP1 profile started reporting bugs 
for SP2.
+
+The current documentation explains that the network configuration is done 
during the second
+stage (imported from the profile) as it can be seen in the image below.
+
+<p align="center">
+  <img 
src="https://www.suse.com/documentation/sles-12/singlehtml/book_autoyast/images/autoyast-oview.png";
 />
+</p>
+
+Nevertheless, during the first stage the network would be required. The 
configuration 
+can be copied to the installed system if `keep_install_network` is set to true.
+
+Let's go with some scenarios and examples...
+
+Scenarios
+=========
+
+First of all, what happens during the **first stage** will be explained, and 
then what 
+happens during the **second stage** if not skipped. 
+
+For the examples below consider this linuxrc options if not mentioned 
different ones:
+
+**Linuxrc options:** autoyast=http://....sle12_minimal.xml ifcfg=eth0=dhcp
+
+First Stage
+-----------
+
+The network configuration for the first stage currently defined in the control 
+file takes part in these clients (**inst_autoinit**, **inst_autosetup** and 
+**inst_finish**).
+
+- **inst_autoinit:** Autoinit will call iSCSI or FCOE clients if they are 
+  enabled in Linuxrc and will try to fetch and process the profile.
+
+- **inst_autosetup:** This client checks the profile and writes the network 
+  configuration files only if there is a network section defined 'and' (the
+  setup_before_proposal flag is true 'or' if there is a semi-automatic section)
+
+- **inst_finish:** At the end it will call **save_network** client which copies
+  udev rules and ifcfg files from the running system and is also responsible 
+  for writing several proposals like virtualization, dns and network service.
+
+Enough theory by now, it's time to the examples:
+
+1. **Autoinstallation without network section. (minimal configuration)**
+
+  Just consider the profile below as the used for this scenario.
+
+  ```xml
+<profile xmlns="http://www.suse.com/1.0/yast2ns"; 
xmlns:config="http://www.suse.com/1.0/configns";>
+  <general>
+    <mode>
+      <confirm config:type="boolean">false</confirm>
+    </mode>
+  </general>
+  <software>
+    <install_recommended config:type="boolean">true</install_recommended>
+    <patterns config:type="list">
+      <pattern>Minimal</pattern>
+      <pattern>base</pattern>
+    </patterns>
+  </software>
+</profile>
+```
+
+  **Results:**
+
+  With this configuration autoinit won't write anything because there is no 
networking section,
+  but as linuxrc network configuration was given the ifcfg-file exists in the 
running system.
+
+  ```xml
+# /etc/sysconfig/network/ifcfg-eth0 
+BOOTPROTO='dhcp'
+STARTMODE='auto'
+DHCLIENT_SET_HOSTNAME='yes' ## THIS IS NOT PRESENT IN SP3 or SP2 versions with 
last yast2-network package
+```
+
+  Therefore, when `save_network` is called by `inst_finish` it will copy the 
+  udev rules and sysconfig network configuration files because by default 
`keep_net_config?` is
+  considered as **true**.
+
+  And about DNS, as no network section is provided, it will write the 
configuration proposed by 
+  NetworkAutoconfiguration. It's important to point it out because in case of 
exists it won't
+  be written.
+  
+2. **Autoinstallation with `keep_install_network = true`**
+
+  In case that the networking section contains the `keep_install_network=true` 
the result should be 
+  the same as previously. The profile has been modified with a static 
configuration for the `eth0`
+  interface, a default route and with the addition of DNS configuration.
+  
+   ```xml
+<profile xmlns="http://www.suse.com/1.0/yast2ns"; 
xmlns:config="http://www.suse.com/1.0/configns";>
+  <networking>
+    <keep_install_network config:type="boolean">true</keep_install_network>
+    <interfaces config:type="list">
+      <interface>
+        <bootproto>static</bootproto>
+        <device>eth0</device>
+        <ipaddr>192.168.122.69</ipaddr>
+             <netmask>255.255.255.0</netmask>
+             <startmode>auto</startmode>
+      </interface>
+    </interfaces>
+    <routing>
+      <routes config:type="list">
+        <route>
+          <destination>default</destination>
+          <device>-</device>
+          <gateway>192.168.122.1</gateway>
+          <netmask>-</netmask>
+        </route>
+      </routes>
+    </routing>
+  </networking>
+</profile>
+```
+
+  **Results**
+  
+  As commented in the introduction of the present documentation, the network 
configuration is
+  mainly done during the `Second Stage`, and the configuration of the 
interfaces is the linuxrc
+  one, this is again:
+  
+   ```bash
+# /etc/sysconfig/network/ifcfg-eth0 
+BOOTPROTO='dhcp'
+STARTMODE='auto'
+DHCLIENT
+```
+
+  But there is a difference in case of DNS. If the DNS subsection is present 
then it will not be 
+  configured with the proposed one, wich means that for example `resolv.conf` 
does not exists yet.
+  
+  Of course there is two special cases permitted, the most common is with 
`setup_before_proposal` used
+  to run the network configuration before the registration during the 1st 
stage and the other one
+  is with a semi-automatic configuration but I will let it out of the scope of 
this document anyway
+  you can see more about both 
[here](https://www.suse.com/documentation/sles-12/singlehtml/book_autoyast/book_autoyast.html#CreateProfile.Register).
+  
+  **With `setup_before_proposal=true`**
+  
+   ```bash
+# /etc/sysconfig/network/ifcfg-eth0 
+BOOTPROTO='static'
+STARTMODE='auto'
+DHCLIENT_SET_HOSTNAME='yes'
+IPADDR=192.168.122.69
+NETMASK=255.255.255.0
+PREXIXLEN=24
+
+# /etc/sysconfig/network/routes 
+default 192.168.122.1 - - 
+
+# /etc/hostname 
+vikingo.suse.com
+```
+
+  But it will not create the resolv.conf 
+  
+  In case of no **Second Stage** the configuration could be written from the 
profile as 
+  it is done with the `setup_before_proposal` flag 
([code](https://github.com/yast/yast-autoinstallation/blob/fd73e52db5d6574351ac4596bfea4836e143ae8a/src/clients/inst_autosetup.rb#L165)]
+  and also write the DNS configuration (it was already commented in the 
[code](https://github.com/yast/yast-autoinstallation/blob/fd73e52db5d6574351ac4596bfea4836e143ae8a/src/clients/inst_autosetup.rb#L165)).
+  
+3. **Autoinstallation with `keep_install_network = false`**
+
+  The profile used will be the same that above just modifying 
`keep_install_network` setting it as **false**.
+  
+  ```xml
+<profile xmlns="http://www.suse.com/1.0/yast2ns"; 
xmlns:config="http://www.suse.com/1.0/configns";>
+  <networking>
+    <keep_install_network config:type="boolean">false</keep_install_network>
+    <interfaces config:type="list">
+      <interface>
+        <bootproto>static</bootproto>
+        <device>eth0</device>
+        <ipaddr>192.168.122.69</ipaddr>
+             <netmask>255.255.255.0</netmask>
+             <startmode>auto</startmode>
+      </interface>
+    </interfaces>
+    <routing>
+      <routes config:type="list">
+        <route>
+          <destination>default</destination>
+          <device>-</device>
+          <gateway>192.168.122.1</gateway>
+          <netmask>-</netmask>
+        </route>
+      </routes>
+    </routing>
+  </networking>
+</profile>
+```
+
+  And as expected after the 1st stage installation the configuration will not 
be copied from the 
+  inst-sys, 
https://github.com/yast/yast-network/blob/SLE-12-SP2/src/clients/save_network.rb#L87
+  
+  ```bash
+  ls /mnt/etc/sysconfig/network/
+config  dhcp  ifcfg-lo  ifcfg.template  if-down.d  if-up.d  providers  scripts
+  
+  cat /mnt/etc/resolv.conf
+cat: /mnt/etc/resolv.conf: No such file or directory
+
+  cat /mnt/etc/hostname 
+linux.suse
+```
+
+  About this comment in the PBI that this document was for:
+
+  <quote>The user has the option that the installation network can be 
available until YAST has been 
+  finished completely (AFTER the second stage) and will be removed if 
keep_install_network has been
+  set to false. Currently it will be removed before booting into system and 
starting the second 
+  installation stage.</quote>
+  
+  It is currently documented in the [network 
section](https://www.suse.com/documentation/sles-12/singlehtml/book_autoyast/book_autoyast.html#CreateProfile.Network)
 
+  and has been updated recently clarifying some aspects.
+  
+  This is the paragraph explaining exactly that issue.
+  
+  <quote>During the second stage, installation of additional packages will 
take place before the 
+  network, as described in the profile, is configured. keep_install_network is 
set by default to 
+  true to ensure that a network is available in case it is needed to install 
those packages. If 
+  all packages are installed during the first stage and the network is not 
needed early during the
+  second one, setting keep_install_network to false will avoid copying the 
configuration.</quote>
+
+  And regarding to post scripts (see this bug 
https://bugzilla.suse.com/show_bug.cgi?id=1014859), 
+  the download part has been moved from second stage to the first stage in 
this [PR](https://github.com/yast/yast-autoinstallation/pull/274),
+  fixing the problem with post scripts and no network configuration during the 
earlier part of 
+  the `second stage`.
+  
+Second Stage
+-----------------
+
+In this stage is where most of the system configuration take place, it is the 
default and most
+commonly used for SLE and openSUSE (but not for CaaSP). 
+
+The network configuration is done by the `inst_autoconfigure` client.
+
+From the autoyast network documentation:
+<quote>
+This client will read the desktop configuration files of all the installed 
modules and will 
+parse the section as well will launch the corresponding client based on what 
was defined in 
+the file.
+
+Concerning to networking the most important one is the lan.desktop file which 
defines the 
+networking profile's resource to be parsed and as it does not define a 
specific client to 
+be called it will use the default value lan_auto.
+
+And finally lan_auto will write our network config.</quote>
+
+1. **Without network section. (minimal configuration)**
+
+  If no network section is defined then the `inst_autoconfigure` client will 
remove all the 
+  interfaces configuration and lan_auto will not be called.
+
+  ** profile **
+  ```xml
+<profile xmlns="http://www.suse.com/1.0/yast2ns"; 
xmlns:config="http://www.suse.com/1.0/configns";>
+  <general>
+    <mode>
+      <confirm config:type="boolean">false</confirm>
+    </mode>
+  </general>
+</profile>
+```
+  
+  This could be an alternative to **keep_install_network=false** and 
installing  packages during
+  the second stage (needing networking).
+  
+2. **With `keep_install_network = true` (default)**
+
+   Taking in account that the installation was launched with this profile:
+   
+   ```xml
+<profile xmlns="http://www.suse.com/1.0/yast2ns"; 
xmlns:config="http://www.suse.com/1.0/configns";>
+  <networking>
+    <keep_install_network config:type="boolean">true</keep_install_network>
+    <interfaces config:type="list">
+      <interface>
+        <bootproto>static</bootproto>
+        <device>eth0</device>
+        <ipaddr>192.168.122.69</ipaddr>
+             <netmask>255.255.255.0</netmask>
+             <startmode>auto</startmode>
+      </interface>
+    </interfaces>
+    <routing>
+      <routes config:type="list">
+        <route>
+          <destination>default</destination>
+          <device>-</device>
+          <gateway>192.168.122.1</gateway>
+          <netmask>-</netmask>
+        </route>
+      </routes>
+    </routing>
+  </networking>
+</profile>
+```
+  **Results**
+  
+  At the end of the the first stage the configuration was copied from the 
inst-sys. 
+  
+  And that will be the network configuration for installing extra packages 
during the 
+  second stage, after that, `inst_autoconfigure` will call `lan_auto` which 
will configure
+  the network and DNS replacing the linuxrc config.
+  
+  ```bash
+  # /etc/sysconfig/network/ifcfg-eth0
+  BOOTPROTO='static'
+  STARTMODE='auto'
+  DHCLIENT_SET_HOSTNAME='yes'
+  IPADDR=192.168.122.69
+  NETMASK=255.255.255.0
+  PREXIXLEN=24
+
+  # /etc/sysconfig/network/routes 
+  default 192.168.122.1 - - 
+
+  # /etc/hostname 
+  vikingo.suse.com
+  ```
+  
+3. **With `keep_install_network = false`**
+
+  The profile used in the **First Stage** scenario was:
+  
+  ```xml
+<profile xmlns="http://www.suse.com/1.0/yast2ns"; 
xmlns:config="http://www.suse.com/1.0/configns";>
+  <networking>
+    <keep_install_network config:type="boolean">false</keep_install_network>
+    <interfaces config:type="list">
+      <interface>
+        <bootproto>static</bootproto>
+        <device>eth0</device>
+        <ipaddr>192.168.122.69</ipaddr>
+             <netmask>255.255.255.0</netmask>
+             <startmode>auto</startmode>
+      </interface>
+    </interfaces>
+    <routing>
+      <routes config:type="list">
+        <route>
+          <destination>default</destination>
+          <device>-</device>
+          <gateway>192.168.122.1</gateway>
+          <netmask>-</netmask>
+        </route>
+      </routes>
+    </routing>
+  </networking>
+</profile>
+```
+
+  And the state after first installation (no config copyed from inst-sys):
+  
+  ```bash
+  ls /mnt/etc/sysconfig/network/
+config  dhcp  ifcfg-lo  ifcfg.template  if-down.d  if-up.d  providers  scripts
+  
+  cat /mnt/etc/resolv.conf
+cat: /mnt/etc/resolv.conf: No such file or directory
+
+  cat /mnt/etc/hostname 
+linux.suse
+```
+
+  Which means that the network will not be available at the beggining of the 
**Second stage**.
+  
+  For this test I used 
+  
+  **LinuxRC options:** autoyast=http://..sle12_minimal.xml ifcfg=eth0=dhcp 
install=http://dist.suse.de/install/SLP/SLE-12-SP2-Server-LATEST/x86_64/DVD1
+  
+  and added to the profile:
+  ```xml
+  <software>
+    <post-patterns config:type="list">
+      <pattern>apparmor</pattern>
+    </post-patterns>
+  </software>
+  ```
+  
+  which reports an error not being able to fetch the packages for **apparmor** 
pattern.
+  
+  Then `inst_autoconfigure` will remove all the interfaces configuration not 
configured in the profile
+  and finally, `lan_auto` will configure our network.
+  
+  ```bash
+# /etc/sysconfig/network/ifcfg-eth0 
+BOOTPROTO='static'
+STARTMODE='auto'
+DHCLIENT_SET_HOSTNAME='yes'
+IPADDR=192.168.122.69
+NETMASK=255.255.255.0
+PREXIXLEN=24
+
+# /etc/sysconfig/network/routes 
+default 192.168.122.1 - - 
+
+# /etc/hostname 
+vikingo.suse.com
+  ```
+  
+  In the case of additional packages or extra packages that needs network 
before
+  the network is configured in the second stage then `setup_before_proposal` 
flag
+  could be used .
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/autoyast2-3.2.9/package/autoyast2.changes 
new/autoyast2-3.2.13/package/autoyast2.changes
--- old/autoyast2-3.2.9/package/autoyast2.changes       2017-02-15 
16:46:33.813183717 +0100
+++ new/autoyast2-3.2.13/package/autoyast2.changes      2017-04-12 
14:45:30.538433241 +0200
@@ -1,4 +1,31 @@
 -------------------------------------------------------------------
+Thu Apr  6 11:27:01 UTC 2017 - [email protected]
+
+- Fix subvolumes schema definition (bsc#1013047)
+- 3.2.13
+
+-------------------------------------------------------------------
+Thu Apr  6 09:39:06 UTC 2017 - [email protected]
+
+- bnc#1026027
+  - removed dependency on insserv
+- 3.2.12
+
+-------------------------------------------------------------------
+Wed Apr  5 10:34:17 CEST 2017 - [email protected]
+
+- Added configuration-management to first installation step.
+  (FATE#319830)
+- 3.2.11
+
+-------------------------------------------------------------------
+Tue Mar  7 09:39:12 CET 2017 - [email protected]
+
+- Update: Product selection will be done by Packages.SelectProduct
+  now (bnc#1014861).
+- 3.2.10
+
+-------------------------------------------------------------------
 Wed Feb 15 16:27:53 CET 2017 - [email protected]
 
 - Moved services-manager to first installation stage (FATE#321738).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/autoyast2-3.2.9/package/autoyast2.spec 
new/autoyast2-3.2.13/package/autoyast2.spec
--- old/autoyast2-3.2.9/package/autoyast2.spec  2017-02-15 16:46:33.813183717 
+0100
+++ new/autoyast2-3.2.13/package/autoyast2.spec 2017-04-12 14:45:30.538433241 
+0200
@@ -17,7 +17,7 @@
 
 
 Name:           autoyast2
-Version:        3.2.9
+Version:        3.2.13
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
@@ -70,8 +70,6 @@
 Provides:       yast2-lib-autoinst
 Obsoletes:      yast2-lib-autoinst
 
-PreReq:         %insserv_prereq %fillup_prereq
-
 BuildArch:      noarch
 
 Requires:       yast2-ruby-bindings >= 1.0.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/autoyast2-3.2.9/src/autoyast-rnc/partitioning.rnc 
new/autoyast2-3.2.13/src/autoyast-rnc/partitioning.rnc
--- old/autoyast2-3.2.9/src/autoyast-rnc/partitioning.rnc       2017-02-15 
16:46:33.917183717 +0100
+++ new/autoyast2-3.2.13/src/autoyast-rnc/partitioning.rnc      2017-04-12 
14:45:30.542433241 +0200
@@ -115,10 +115,10 @@
 
 # by default, AutoYaST exports list entries as 'listentry'
 subvolume =
-  element subvolume { text } | element listentry { text } | subvolume_full
+  element (subvolume | listentry ) { text } | subvolume_full
 
 subvolume_full =
-  element subvolume {
+  element (subvolume | listentry) {
     element path { text } &
     # FATE#320342: add support to enable copy-on-write for Btrfs subvolumes
     element copy_on_write { BOOLEAN }?
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/autoyast2-3.2.9/src/clients/inst_autosetup.rb 
new/autoyast2-3.2.13/src/clients/inst_autosetup.rb
--- old/autoyast2-3.2.9/src/clients/inst_autosetup.rb   2017-02-15 
16:46:33.949183717 +0100
+++ new/autoyast2-3.2.13/src/clients/inst_autosetup.rb  2017-04-12 
14:45:30.546433241 +0200
@@ -383,6 +383,16 @@
         )
       end
 
+      if Profile.current["configuration_management"]
+        return :abort unless WFM.CallFunction(
+          "configuration_management_auto",
+          ["Import", Profile.current["configuration_management"]]
+        )
+        # Do not start it in second installation stage again.
+        # Provisioning will already be called in the first stage.
+        Profile.remove_sections("configuration_management")
+      end
+
       Progress.NextStage
 
       if Profile.current.has_key? ('runlevel')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/autoyast2-3.2.9/src/clients/inst_autosetup_upgrade.rb 
new/autoyast2-3.2.13/src/clients/inst_autosetup_upgrade.rb
--- old/autoyast2-3.2.9/src/clients/inst_autosetup_upgrade.rb   2017-02-15 
16:46:33.953183717 +0100
+++ new/autoyast2-3.2.13/src/clients/inst_autosetup_upgrade.rb  2017-04-12 
14:45:30.546433241 +0200
@@ -299,12 +299,6 @@
       if !Update.did_init1
         Update.did_init1 = true
 
-        @restore = []
-        @selected = Pkg.ResolvableProperties("", :product, "")
-        Builtins.foreach(@selected) do |s|
-          @restore = Builtins.add(@restore, Ops.get_string(s, "name", ""))
-        end
-
         Pkg.PkgApplReset
 
         # bnc #300540
@@ -312,7 +306,6 @@
         # Drops packages after PkgApplReset, not before (that would null that)
         Update.DropObsoletePackages
 
-        Builtins.foreach(@restore) { |res| Pkg.ResolvableInstall(res, 
:product) }
         Update.SetDesktopPattern if !Update.onlyUpdateInstalled
 
         # make sure the packages needed for accessing the installation 
repository
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/autoyast2-3.2.9/test/AutoinstPartPlan_test.rb 
new/autoyast2-3.2.13/test/AutoinstPartPlan_test.rb
--- old/autoyast2-3.2.9/test/AutoinstPartPlan_test.rb   2017-02-15 
16:46:34.137183717 +0100
+++ new/autoyast2-3.2.13/test/AutoinstPartPlan_test.rb  2017-04-12 
14:45:30.562433241 +0200
@@ -3,13 +3,31 @@
 require_relative "test_helper"
 require "yaml"
 
-Yast.import "AutoinstPartPlan"
 Yast.import "Profile"
 Yast.import "ProductFeatures"
+Yast.import "Storage"
+
+describe "Yast::AutoinstPartPlan" do
+  subject do
+    # Postpone AutoinstPartPlan.main until it is needed.
+    Yast.import "AutoinstPartPlan"
+    Yast::AutoinstPartPlan
+  end
 
-describe Yast::AutoinstPartPlan do
   let(:target_map_path) { File.join(FIXTURES_PATH, "storage", "nfs_root.yml") }
   let(:target_map_clone) { File.join(FIXTURES_PATH, "storage", 
"target_clone.yml") }
+  let(:default_subvol) { "@" }
+  let(:filesystems) do
+    double("filesystems",
+      default_subvol: default_subvol, read_default_subvol_from_target: 
default_subvol,
+      GetAllFileSystems: {})
+  end
+
+  before do
+    allow(Yast).to receive(:import).with("FileSystems").and_return(nil)
+    allow(Yast).to receive(:import).and_call_original
+    stub_const("Yast::FileSystems", filesystems)
+  end
 
   describe "#read partition target" do
 
@@ -17,8 +35,8 @@
       target_map = YAML.load_file(target_map_path)
 
       expect(Yast::Storage).to receive(:GetTargetMap).and_return(target_map)
-      expect(Yast::AutoinstPartPlan.Read).to eq(true)
-      expect(Yast::AutoinstPartPlan.Export).to eq(
+      expect(subject.Read).to eq(true)
+      expect(subject.Export).to eq(
          [{"type"=>:CT_NFS,
             "partitions"=>[{"type"=>:nfs,
               "device"=>"192.168.4.1:/srv/nfsroot/sles12sp1",
@@ -33,8 +51,8 @@
       target_map = YAML.load_file(target_map_clone)
 
       expect(Yast::Storage).to receive(:GetTargetMap).and_return(target_map)
-      expect(Yast::AutoinstPartPlan.Read).to eq(true)
-      export = Yast::AutoinstPartPlan.Export.select { |d| d.key?("skip_list") }
+      expect(subject.Read).to eq(true)
+      export = subject.Export.select { |d| d.key?("skip_list") }
 
       expect(export[0]).to include("initialize" => true)
       skip_list = export[0]["skip_list"]
@@ -48,11 +66,11 @@
 
     before do
       allow(Yast::Storage).to receive(:GetTargetMap).and_return(target_map)
-      Yast::AutoinstPartPlan.Read
+      subject.Read
     end
 
     it "includes found subvolumes" do
-      exported = Yast::AutoinstPartPlan.Export
+      exported = subject.Export
       subvolumes = exported.first["partitions"].first["subvolumes"]
       expect(subvolumes).to eq([
         { "path" => "@", "copy_on_write" => true},
@@ -64,7 +82,7 @@
     end
 
     it "does not include snapshots" do
-      exported = Yast::AutoinstPartPlan.Export
+      exported = subject.Export
       subvolumes = exported.first["partitions"].first["subvolumes"]
       snapshots = subvolumes.select { |s| s.include?("snapshot") }
       expect(snapshots).to be_empty
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/autoyast2-3.2.9/test/test_helper.rb 
new/autoyast2-3.2.13/test/test_helper.rb
--- old/autoyast2-3.2.9/test/test_helper.rb     2017-02-15 16:46:34.285183717 
+0100
+++ new/autoyast2-3.2.13/test/test_helper.rb    2017-04-12 14:45:30.566433241 
+0200
@@ -6,8 +6,23 @@
 require "fileutils"
 
 if ENV["COVERAGE"]
-  STDERR.puts "COVERAGE is disabled because when requiring some modules (like 
AutoinstPartition) "\
-    "errors are raised in other YaST components."
+  require "simplecov"
+  SimpleCov.start do
+    add_filter "/test/"
+  end
+
+  src_location = File.expand_path("../../src", __FILE__)
+  # track all ruby files under src
+  SimpleCov.track_files("#{src_location}/**/*.rb")
+
+  # use coveralls for on-line code coverage reporting at Travis CI
+  if ENV["TRAVIS"]
+    require "coveralls"
+    SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
+      SimpleCov::Formatter::HTMLFormatter,
+      Coveralls::SimpleCov::Formatter
+    ]
+  end
 end
 
 FIXTURES_PATH = File.join(File.dirname(__FILE__), 'fixtures')


Reply via email to