commit yast2 for openSUSE:Factory
Hello community,
here is the log from the commit of package yast2 for openSUSE:Factory checked in at 2016-04-28 20:30:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2 (Old)
and /work/SRC/openSUSE:Factory/.yast2.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2"
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2/yast2.changes 2016-04-22 16:18:41.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.yast2.new/yast2.changes 2016-04-28 20:30:26.000000000 +0200
@@ -1,0 +2,8 @@
+Fri Apr 22 14:37:28 UTC 2016 - knut.anderssen@suse.com
+
+- Added restarting state to Installation to for example recover
+ data or skip dialogs until the one wich restarted yast.
+ (related to bsc#974409)
+- 3.1.186
+
+-------------------------------------------------------------------
Old:
----
yast2-3.1.185.tar.bz2
New:
----
yast2-3.1.186.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2.spec ++++++
--- /var/tmp/diff_new_pack.fFH4CH/_old 2016-04-28 20:30:27.000000000 +0200
+++ /var/tmp/diff_new_pack.fFH4CH/_new 2016-04-28 20:30:27.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2
-Version: 3.1.185
+Version: 3.1.186
Release: 0
Summary: YaST2 - Main Package
License: GPL-2.0
++++++ yast2-3.1.185.tar.bz2 -> yast2-3.1.186.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.185/library/control/src/modules/Installation.rb new/yast2-3.1.186/library/control/src/modules/Installation.rb
--- old/yast2-3.1.185/library/control/src/modules/Installation.rb 2016-04-21 18:07:51.000000000 +0200
+++ new/yast2-3.1.186/library/control/src/modules/Installation.rb 2016-04-25 08:53:55.000000000 +0200
@@ -36,6 +36,7 @@
#
# $Id$
require "yast"
+require "fileutils"
module Yast
class InstallationClass < Module
@@ -108,6 +109,10 @@
# Running YaST in upgrade mode (initiated from running system)
@run_update_file = Ops.add(Directory.vardir, "/run_system_update")
+ # A flag to know if current installation is restarting skipping dialogs or
+ # recovering values until the step just before the yast restart was done
+ @restarting_file = Ops.add(Directory.vardir, "/restarting_yast")
+
# Network should be started before the installation starts (continues)
# bugzilla #258742
#
@@ -244,6 +249,20 @@
Linuxrc.InstallInf("InstMode") || "cd"
end
+ def restart!
+ ::FileUtils.touch(@restart_file)
+ ::FileUtils.touch(@restarting_file)
+ :restart_yast
+ end
+
+ def restarting?
+ ::File.exist?(@restarting_file)
+ end
+
+ def finish_restarting!
+ ::FileUtils.remove_file(@restarting_file, true) if restarting?
+ end
+
# run X11 configuration after inital boot
# this is false in case of:
# installation via serial console
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.185/library/network/src/modules/SuSEFirewallServices.rb new/yast2-3.1.186/library/network/src/modules/SuSEFirewallServices.rb
--- old/yast2-3.1.185/library/network/src/modules/SuSEFirewallServices.rb 2016-04-21 18:07:51.000000000 +0200
+++ new/yast2-3.1.186/library/network/src/modules/SuSEFirewallServices.rb 2016-04-25 08:53:55.000000000 +0200
@@ -272,8 +272,8 @@
# @return [Boolean] whether service is defined by package
#
# @example
- # ServiceDefinedByPackage ("http-server") -> false
- # ServiceDefinedByPackage ("service:http-server") -> true
+ # ServiceDefinedByPackage ("http-server") -> false
+ # ServiceDefinedByPackage ("service:http-server") -> true
def ServiceDefinedByPackage(service)
service.start_with? DEFINED_BY_PKG_PREFIX
end
@@ -285,8 +285,8 @@
# @return [String] file name (e.g., 'abc')
#
# @example
- # GetFilenameFromServiceDefinedByPackage ("service:abc") -> "abc"
- # GetFilenameFromServiceDefinedByPackage ("abc") -> nil
+ # GetFilenameFromServiceDefinedByPackage ("service:abc") -> "abc"
+ # GetFilenameFromServiceDefinedByPackage ("abc") -> nil
def GetFilenameFromServiceDefinedByPackage(service)
if !ServiceDefinedByPackage(service)
log.error "Service #{service} is not defined by package"
@@ -299,7 +299,8 @@
# Returns SCR Agent definition.
#
# @return [Yast::Term] with agent definition
- # @param string full filename path (to read by this agent)
+ # @param filefullpath [String] full filename path (to read by this agent)
+ # @api private
def GetMetadataAgent(filefullpath)
term(
:IniAgent,
@@ -337,12 +338,13 @@
# Returns service definition.
# See @services for the format.
- # If `silent` is not defined or set to `true`, function throws an exception
- # SuSEFirewalServiceNotFound if service is not found on disk.
+ # If *silent* is `false` (the default), the method throws an exception
+ # {Yast::SuSEFirewalServiceNotFound} if service is not found on disk.
#
- # @param [String] service name
+ # @param [String] service name (including the "service:" prefix)
# @param [String] (optional) whether to silently return nil
# when service is not found (default false)
+ # @api private
def service_details(service_name, silent = false)
service = all_services[service_name]
if service.nil? && !silent
@@ -359,6 +361,7 @@
end
# Returns all known services loaded from disk on-the-fly
+ # @api private
def all_services
ReadServicesDefinedByRPMPackages() if @services.nil?
@services
@@ -368,6 +371,7 @@
# in SuSEfirewall2.
#
# @return [Boolean] if successful
+ # @api private
def ReadServicesDefinedByRPMPackages
log.info "Reading SuSEfirewall2 services from #{SERVICES_DIR}"
@services ||= {}
@@ -470,7 +474,7 @@
# Function returns if the service_id is a known (defined) service
#
- # @param [String] service_id
+ # @param [String] service_id (including the "service:" prefix)
# @return [Boolean] if is known (defined)
def IsKnownService(service_id)
!service_details(service_id, true).nil?
@@ -480,15 +484,13 @@
#
# @return [Hash{String => String}] supported services
#
- #
# **Structure:**
#
- #
- # $[ service_id : localized_service_name ]
- # $[
- # "dns-server" : "DNS Server",
- # "vnc" : "Remote Administration",
- # ]
+ # { service_id => localized_service_name }
+ # {
+ # "service:dns-server" => "DNS Server",
+ # "service:vnc" => "Remote Administration",
+ # }
def GetSupportedServices
supported_services = {}
@@ -509,6 +511,7 @@
end
# Returns list of service-ids defined by packages.
+ # (including the "service:" prefix)
#
# @return [Array<String>] service ids
def GetListOfServicesAddedByPackage
@@ -517,7 +520,7 @@
# Function returns needed TCP ports for service
#
- # @param [String] service
+ # @param [String] service (including the "service:" prefix)
# @return [Array<String>] of needed TCP ports
def GetNeededTCPPorts(service)
service_details(service)["tcp_ports"] || []
@@ -525,7 +528,7 @@
# Function returns needed UDP ports for service
#
- # @param [String] service
+ # @param [String] service (including the "service:" prefix)
# @return [Array<String>] of needed UDP ports
def GetNeededUDPPorts(service)
service_details(service)["udp_ports"] || []
@@ -533,7 +536,7 @@
# Function returns needed RPC ports for service
#
- # @param [String] service
+ # @param [String] service (including the "service:" prefix)
# @return [Array<String>] of needed RPC ports
def GetNeededRPCPorts(service)
service_details(service)["rpc_ports"] || []
@@ -541,7 +544,7 @@
# Function returns needed IP protocols for service
#
- # @param [String] service
+ # @param [String] service (including the "service:" prefix)
# @return [Array<String>] of needed IP protocols
def GetNeededIPProtocols(service)
service_details(service)["ip_protocols"] || []
@@ -549,7 +552,7 @@
# Function returns description of a firewall service
#
- # @param [String] service
+ # @param [String] service (including the "service:" prefix)
# @return [String] service description
def GetDescription(service)
service_details(service)["description"] || []
@@ -578,7 +581,7 @@
# Function returns needed ports allowing broadcast
#
- # @param [String] service
+ # @param [String] service (including the "service:" prefix)
# @return [Array<String>] of needed broadcast ports
def GetNeededBroadcastPorts(service)
service_details(service)["broadcast_ports"] || []
@@ -589,17 +592,17 @@
# Function throws an exception SuSEFirewalServiceNotFound
# if service is not known (undefined).
#
- # @param [String] service
+ # @param [String] service (including the "service:" prefix)
# @return [Hash{String => Array<String>}] of needed ports and protocols
#
# @example
- # GetNeededPortsAndProtocols ("service:aaa") -> $[
- # "tcp_ports" : [ "122", "ftp-data" ],
- # "udp_ports" : [ "427" ],
- # "rpc_ports" : [ "portmap", "ypbind" ],
- # "ip_protocols" : [],
- # "broadcast_ports" : [ "427" ],
- # ];
+ # GetNeededPortsAndProtocols ("service:aaa") -> {
+ # "tcp_ports" => [ "122", "ftp-data" ],
+ # "udp_ports" => [ "427" ],
+ # "rpc_ports" => [ "portmap", "ypbind" ],
+ # "ip_protocols" => [],
+ # "broadcast_ports"=> [ "427" ],
+ # }
def GetNeededPortsAndProtocols(service)
DEFAULT_SERVICE.merge(service_details(service))
end
@@ -607,28 +610,28 @@
# Immediately writes the configuration of service defined by package to the
# service definition file. Service must be defined by package, this function
# doesn't work for hard-coded services (SuSEFirewallServices).
- # Function throws an exception SuSEFirewalServiceNotFound
+ # Function throws an exception {Yast::SuSEFirewalServiceNotFound}
# if service is not known (undefined) or it is not a service
# defined by package.
#
# @param [String] service ID (e.g., "service:ssh")
- # @param map
participants (1)
-
root@hilbert.suse.de