Hello community,
here is the log from the commit of package yast2 for openSUSE:Factory checked in at 2014-04-13 13:13:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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 2014-04-05 14:43:02.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.yast2.new/yast2.changes 2014-04-13 13:13:31.000000000 +0200
@@ -1,0 +2,49 @@
+Thu Apr 10 11:07:13 CEST 2014 - locilka@suse.com
+
+- Prefering os-release file to content file (which is used only as
+ a fallback now) both in installation and on a running system
+ (bnc#871261)
+- 3.1.44
+
+-------------------------------------------------------------------
+Thu Apr 10 09:06:02 UTC 2014 - mvidner@suse.com
+
+- Enable wizard title on the left instead of on top during the
+ installation (bnc#868859).
+- 3.1.43
+
+-------------------------------------------------------------------
+Thu Apr 10 08:04:42 UTC 2014 - jsrain@suse.cz
+
+- adjusted Product.FindBaseProducts to be usable during
+ installation (needed for fix of bnc#871158)
+- 3.1.42
+
+-------------------------------------------------------------------
+Wed Apr 9 07:09:37 UTC 2014 - jsrain@suse.cz
+
+- added tabs for release notes into slide show dialog (bnc#871158)
+- 3.1.41
+
+-------------------------------------------------------------------
+Wed Apr 9 06:35:54 UTC 2014 - jreidinger@suse.com
+
+- save_y2logs: save also log from perl-Bootloader (bnc#872486)
+- 3.1.40
+
+-------------------------------------------------------------------
+Tue Apr 8 15:01:00 CEST 2014 - locilka@suse.com
+
+- Changed way of reading the product information: Reads it from
+ /content file if it exists, then from /etc/os-release, then it
+ throws exception if there is no other place to read (bnc#871261)
+- 3.1.39
+
+-------------------------------------------------------------------
+Tue Apr 8 11:40:15 UTC 2014 - lslezak@suse.cz
+
+- fixed "uninitialized constant Yast2::HwDetection::SCR" error
+ (bnc#871783), fixed testsuite
+- 3.1.38
+
+-------------------------------------------------------------------
Old:
----
yast2-3.1.37.tar.bz2
New:
----
yast2-3.1.44.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2.spec ++++++
--- /var/tmp/diff_new_pack.05cyk5/_old 2014-04-13 13:13:33.000000000 +0200
+++ /var/tmp/diff_new_pack.05cyk5/_new 2014-04-13 13:13:33.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2
-Version: 3.1.37
+Version: 3.1.44
Release: 0
Url: https://github.com/yast/yast-yast2
++++++ yast2-3.1.37.tar.bz2 -> yast2-3.1.44.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.37/library/general/src/modules/OSRelease.rb new/yast2-3.1.44/library/general/src/modules/OSRelease.rb
--- old/yast2-3.1.37/library/general/src/modules/OSRelease.rb 2014-04-02 11:26:46.000000000 +0200
+++ new/yast2-3.1.44/library/general/src/modules/OSRelease.rb 2014-04-10 13:17:41.000000000 +0200
@@ -41,9 +41,7 @@
class OSReleaseClass < Module
include Yast::Logger
- def initialize
- @file_path = "/etc/os-release"
- end
+ OS_RELEASE_PATH = "/etc/os-release"
# Get information about the OS release
# Throws exception Yast::OSReleaseFileMissingError if release file
@@ -52,9 +50,9 @@
# @param [String] directory containing the installed system (/ in installed system)
# @return [String] the release information
def ReleaseInformation(directory)
- release_file = File.join(directory, @file_path)
+ release_file = File.join(directory, OS_RELEASE_PATH)
- if !FileUtils.Exists(release_file)
+ if !os_release_exists?(directory)
log.info "Release file #{release_file} not found"
raise(
OSReleaseFileMissingError,
@@ -73,7 +71,7 @@
return SCR.Read(path(".content.PRODUCT"))
end
directory = "/" # TODO make this optional argument
- Misc.CustomSysconfigRead("NAME", "SUSE LINUX", directory + @file_path)
+ Misc.CustomSysconfigRead("NAME", "SUSE LINUX", directory + OS_RELEASE_PATH)
end
# Get information about the OS version
@@ -84,9 +82,18 @@
return SCR.Read(path(".content.VERSION"))
end
directory = "/"
- Misc.CustomSysconfigRead("VERSION_ID", "", directory + @file_path)
+ Misc.CustomSysconfigRead("VERSION_ID", "", directory + OS_RELEASE_PATH)
end
+ # Returns whether os-release file exists in the given directory
+ #
+ # @param [String] (optional) directory, defaults to "/"
+ # @return [Boolean] whether exists
+ def os_release_exists?(directory = "/")
+ FileUtils.Exists(
+ File.join(directory, OS_RELEASE_PATH)
+ )
+ end
publish :function => :ReleaseInformation, :type => "string (string)"
publish :function => :ReleaseName, :type => "string ()"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.37/library/packages/Makefile.am new/yast2-3.1.44/library/packages/Makefile.am
--- old/yast2-3.1.37/library/packages/Makefile.am 2014-04-02 11:26:46.000000000 +0200
+++ new/yast2-3.1.44/library/packages/Makefile.am 2014-04-10 13:17:41.000000000 +0200
@@ -1,3 +1,3 @@
# Makefile.am for yast2/library/packages
-SUBDIRS = src testsuite doc
+SUBDIRS = src testsuite doc test
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.37/library/packages/src/modules/Product.rb new/yast2-3.1.44/library/packages/src/modules/Product.rb
--- old/yast2-3.1.37/library/packages/src/modules/Product.rb 2014-04-02 11:26:46.000000000 +0200
+++ new/yast2-3.1.44/library/packages/src/modules/Product.rb 2014-04-10 13:17:41.000000000 +0200
@@ -32,6 +32,9 @@
module Yast
class ProductClass < Module
+
+ CONTENT_FILE = "/content"
+
def main
Yast.import "Pkg"
@@ -40,6 +43,7 @@
Yast.import "OSRelease"
Yast.import "PackageLock"
Yast.import "PackageSystem"
+ Yast.import "FileUtils"
# General product name and version
@name = "" # "SuSE Linux 8.1"
@@ -89,8 +93,9 @@
Builtins.y2milestone("Looking for base products")
products = Pkg.ResolvableProperties("", :product, "")
- products = Builtins.filter(products) do |p|
- Ops.get_symbol(p, "status", :none) == :installed
+ expected_status = Stage.initial ? :selected : :installed
+ products = products.select do |p|
+ p["status"] == expected_status
end
Builtins.y2milestone("All found products: %1", products)
@@ -107,7 +112,7 @@
Ops.get_string(p, "display_name", "")
)
end
- Ops.get_string(p, "category", "") == "base"
+ Stage.initial ? (p["source"] == 0) : (p["category"] == "base")
end
Builtins.y2milestone("Found base products: %1", products)
@@ -157,63 +162,29 @@
nil
end
+ def can_use_content_file?
+ FileUtils.Exists(CONTENT_FILE) && !Mode.live_installation
+ end
+
+ def can_use_os_release_file?
+ OSRelease.os_release_exists?
+ end
# -----------------------------------------------
# Constructor
def Product
- if Stage.initial && !Mode.live_installation
- # it should use the same mechanism as running system. But it would
- # mean to initialize package manager from constructor, which is
- # not reasonable
- @name = Convert.to_string(SCR.Read(path(".content.LABEL")))
- @short_name = Convert.to_string(SCR.Read(path(".content.SHORTLABEL")))
- @short_name = @name if @short_name == nil
- @version = Convert.to_string(SCR.Read(path(".content.VERSION")))
- @vendor = Convert.to_string(SCR.Read(path(".content.VENDOR")))
-
- @distproduct = Convert.to_string(SCR.Read(path(".content.DISTPRODUCT")))
- @distversion = Convert.to_string(SCR.Read(path(".content.DISTVERSION")))
-
- @baseproduct = Convert.to_string(SCR.Read(path(".content.BASEPRODUCT")))
- @baseproduct = @name if @baseproduct == ""
- @baseversion = Convert.to_string(SCR.Read(path(".content.BASEVERSION")))
-
- @relnotesurl = Convert.to_string(SCR.Read(path(".content.RELNOTESURL")))
- @shortlabel = Convert.to_string(SCR.Read(path(".content.SHORTLABEL")))
-
- tmp1 = SCR.Read(path(".content.FLAGS"))
- if tmp1 != nil
- @flags = Builtins.splitstring(Convert.to_string(tmp1), " ")
- end
- tmp1 = SCR.Read(path(".content.PATTERNS"))
- if tmp1 != nil
- @patterns = Builtins.splitstring(Convert.to_string(tmp1), " ")
- end
-
- # bugzilla #252122, since openSUSE 10.3
- # deprecated:
- # content.PATTERNS: abc cba bac
- # should re replaced with (and/or)
- # content.REQUIRES: pattern:abc pattern:cba pattern:bac
- # content.RECOMMENDS: pattern:abc pattern:cba pattern:bac
- if @patterns != []
- Builtins.y2warning(
- "Product content file contains deprecated PATTERNS tag, use REQUIRES and/or RECOMMENDS instead"
- )
- Builtins.y2milestone("PATTERNS: %1", @patterns)
- end
- # not during testing: Misc::CustomSysconfigRead used by OSRelease creates agent in runtime,
- # mocking IniParser not possible
- elsif !Mode.config && !Mode.test
- @short_name = OSRelease.ReleaseName
- @version = OSRelease.ReleaseVersion
- @name = Ops.add(Ops.add(@short_name, " "), @version)
+ if can_use_os_release_file?
+ read_os_release_file
+ elsif can_use_content_file?
+ read_content_file
+ else
+ raise "Cannot determine the product. Neither from the content, nor the os-relese file"
end
@distproduct = "" if @distproduct == nil
- @dist = Ops.get(Builtins.splitstring(@distproduct, "-"), 2, "")
+ @dist = @distproduct.split("-")[2] || ""
- @run_you = !Builtins.contains(@flags, "no_you")
+ @run_you = !@flags.include?("no_you")
# set the product name for UI
Yast.import "Wizard"
@@ -225,6 +196,52 @@
nil
end
+ private
+
+ def read_content_file
+ # it should use the same mechanism as running system. But it would
+ # mean to initialize package manager from constructor, which is
+ # not reasonable
+ @name = SCR.Read(path(".content.LABEL"))
+ @short_name = SCR.Read(path(".content.SHORTLABEL"))
+ @short_name ||= @name
+
+ @version = SCR.Read(path(".content.VERSION"))
+ @vendor = SCR.Read(path(".content.VENDOR"))
+
+ @distproduct = SCR.Read(path(".content.DISTPRODUCT"))
+ @distversion = SCR.Read(path(".content.DISTVERSION"))
+
+ @baseproduct = SCR.Read(path(".content.BASEPRODUCT"))
+ @baseproduct = @name if @baseproduct == ""
+ @baseversion = SCR.Read(path(".content.BASEVERSION"))
+
+ @relnotesurl = SCR.Read(path(".content.RELNOTESURL"))
+ @shortlabel = SCR.Read(path(".content.SHORTLABEL"))
+
+ @flags = (SCR.Read(path(".content.FLAGS")) || "").split
+ @patterns = (SCR.Read(path(".content.PATTERNS")) || "").split
+
+ # bugzilla #252122, since openSUSE 10.3
+ # deprecated:
+ # content.PATTERNS: abc cba bac
+ # should re replaced with (and/or)
+ # content.REQUIRES: pattern:abc pattern:cba pattern:bac
+ # content.RECOMMENDS: pattern:abc pattern:cba pattern:bac
+ if @patterns != []
+ Builtins.y2warning(
+ "Product content file contains deprecated PATTERNS tag, use REQUIRES and/or RECOMMENDS instead"
+ )
+ Builtins.y2milestone("PATTERNS: %1", @patterns)
+ end
+ end
+
+ def read_os_release_file
+ @short_name = OSRelease.ReleaseName
+ @version = OSRelease.ReleaseVersion
+ @name = "#{@short_name} #{@version}"
+ end
+
publish :variable => :name, :type => "string"
publish :variable => :short_name, :type => "string"
publish :variable => :version, :type => "string"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.37/library/packages/src/modules/SlideShow.rb new/yast2-3.1.44/library/packages/src/modules/SlideShow.rb
--- old/yast2-3.1.37/library/packages/src/modules/SlideShow.rb 2014-04-02 11:26:46.000000000 +0200
+++ new/yast2-3.1.44/library/packages/src/modules/SlideShow.rb 2014-04-10 13:17:41.000000000 +0200
@@ -158,6 +158,10 @@
@_stages = {} # list of the configured stages
@_current_stage = nil # current stage
+
+ @_rn_tabs = {} #tabs with release notes
+ @_relnotes = {} #texts with release notes, product -> text
+ @_base_product = "" #base product for release notes ordering
end
# Set the flag that user requested abort of the installation
@@ -232,8 +236,12 @@
# Check if currently the "Release Notes" page is shown
# @return true if showing details, false otherwise
#
- def ShowingRelNotes
- @widgets_created && UI.WidgetExists(:relNotesPage)
+ def ShowingRelNotes(id)
+ @widgets_created && UI.WidgetExists(id)
+ end
+
+ def ProductRelNotesID(product)
+ ("rn_" + product).to_sym
end
# Restart the subprogress of the slideshow. This means the
@@ -573,8 +581,8 @@
#
# @return A term describing the widgets
#
- def RelNotesPageWidgets
- widgets = AddProgressWidgets(:relNotesPage, RichText(@relnotes))
+ def RelNotesPageWidgets(id)
+ widgets = AddProgressWidgets(:relNotesPage, RichText(@_rn_tabs[id]))
Builtins.y2debug("widget term: \n%1", widgets)
deep_copy(widgets)
end
@@ -623,12 +631,12 @@
# Switch to the 'release notes' view.
#
- def SwitchToReleaseNotesView
- return if ShowingRelNotes()
+ def SwitchToReleaseNotesView(id)
+ return if ShowingRelNotes(id)
if UI.WidgetExists(:tabContents)
- UI.ChangeWidget(:dumbTab, :CurrentItem, :showRelNotes)
- UI.ReplaceWidget(:tabContents, RelNotesPageWidgets())
+ UI.ChangeWidget(:dumbTab, :CurrentItem, id)
+ UI.ReplaceWidget(:tabContents, RelNotesPageWidgets(id))
# UpdateTotalProgress(false);
end
@@ -647,6 +655,20 @@
help_text
end
+ #set the release notes for slide show
+ # @param [map] map product name -> release notes text
+ # @param [string] base product name
+ def SetReleaseNotes(relnotes, base_product)
+ @_relnotes = relnotes
+ @_base_product = base_product
+ end
+
+ def add_relnotes_for_product product, relnotes, tabs
+ id = ProductRelNotesID product
+ #Translators: Tab name, keep short, %s is product name, e.g. SLES
+ tabs << Item(Id(id), _("%s Release Notes") % product)
+ @_rn_tabs[id] = relnotes
+ end
# Rebuild the dialog. Useful if slides become available post-creating the dialog.
def RebuildDialog
@@ -660,12 +682,15 @@
# tab
Item(Id(:showDetails), _("&Details"))
]
- if @relnotes != nil && @relnotes != ""
- # tab
- tabs = Builtins.add(
- tabs,
- Item(Id(:showRelNotes), _("Release &Notes"))
- )
+
+ @_rn_tabs = {}
+ if @_relnotes.key?(@_base_product)
+ add_relnotes_for_product @_base_product, @_relnotes[@_base_product], tabs
+ end
+ @_relnotes.each do | product, relnotes |
+ if @_base_product != product
+ add_releasenotes_for_product product, relnotes, tabs
+ end
end
contents = DumbTab(
@@ -778,9 +803,9 @@
else
UI.ChangeWidget(:dumbTab, :CurrentItem, :showDetails)
end
- elsif button == :showRelNotes && !ShowingRelNotes()
+ elsif @_rn_tabs.key?(button) && !ShowingRelNotes(button)
@user_switched_to_details = false
- SwitchToReleaseNotesView()
+ SwitchToReleaseNotesView(button)
elsif button == :debugHotkey
@debug = !@debug
Builtins.y2milestone("Debug mode: %1", @debug)
@@ -1021,7 +1046,7 @@
publish :function => :StopTimer, :type => "void ()"
publish :function => :ShowingDetails, :type => "boolean ()"
publish :function => :ShowingSlide, :type => "boolean ()"
- publish :function => :ShowingRelNotes, :type => "boolean ()"
+ publish :function => :ShowingRelNotes, :type => "boolean (symbol)"
publish :function => :SubProgressStart, :type => "void (string)"
publish :function => :SubProgress, :type => "void (integer, string)"
publish :function => :GlobalProgressStart, :type => "void (string)"
@@ -1036,7 +1061,7 @@
publish :function => :TableItem, :type => "term (string, string, string, string, string)"
publish :function => :SwitchToSlideView, :type => "void ()"
publish :function => :SwitchToDetailsView, :type => "void ()"
- publish :function => :SwitchToReleaseNotesView, :type => "void ()"
+ publish :function => :SwitchToReleaseNotesView, :type => "void (symbol)"
publish :function => :RebuildDialog, :type => "void ()"
publish :function => :Reset, :type => "void ()"
publish :function => :HandleInput, :type => "void (any)"
@@ -1048,6 +1073,7 @@
publish :function => :UpdateTable, :type => "void (list <term>)"
publish :function => :Setup, :type => "void (list