Hello community, here is the log from the commit of package autoyast2 for openSUSE:Factory checked in at 2018-12-31 09:41:58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/autoyast2 (Old) and /work/SRC/openSUSE:Factory/.autoyast2.new.28833 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "autoyast2" Mon Dec 31 09:41:58 2018 rev:252 rq:653575 version:4.0.70 Changes: -------- --- /work/SRC/openSUSE:Factory/autoyast2/autoyast2.changes 2018-11-18 23:01:11.219601066 +0100 +++ /work/SRC/openSUSE:Factory/.autoyast2.new.28833/autoyast2.changes 2018-12-31 09:42:01.502431019 +0100 @@ -1,0 +2,13 @@ +Sat Nov 24 00:10:55 UTC 2018 - Stasiek Michalski <[email protected]> + +- Provide icon with module (boo#1109310) +- 4.0.70 + +------------------------------------------------------------------- +Tue Nov 20 11:34:17 CET 2018 - [email protected] + +- Function SelectProduct removed in order NOT to select All + available products (bsc#1116332). +- 4.0.69 + +------------------------------------------------------------------- Old: ---- autoyast2-4.0.68.tar.bz2 New: ---- autoyast2-4.0.70.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ autoyast2.spec ++++++ --- /var/tmp/diff_new_pack.ndIkKo/_old 2018-12-31 09:42:01.902430691 +0100 +++ /var/tmp/diff_new_pack.ndIkKo/_new 2018-12-31 09:42:01.902430691 +0100 @@ -22,7 +22,7 @@ %endif Name: autoyast2 -Version: 4.0.68 +Version: 4.0.70 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -67,7 +67,7 @@ Requires: yast2-ntp-client >= 4.0.1 # Moving security module to first installation stage Requires: yast2-network >= 3.1.145 -Requires: yast2-schema +Requires: yast2-schema >= 4.0.6 Requires: yast2-security >= 4.1.1 Requires: yast2-transfer >= 2.21.0 Requires: yast2-xml @@ -219,6 +219,8 @@ %dir %{yast_moduledir} %{yast_moduledir}/AutoinstClass.rb +%{yast_icondir} + # additional files %{_fillupdir}/sysconfig.autoinstall ++++++ autoyast2-4.0.68.tar.bz2 -> autoyast2-4.0.70.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autoyast2-4.0.68/package/autoyast2.changes new/autoyast2-4.0.70/package/autoyast2.changes --- old/autoyast2-4.0.68/package/autoyast2.changes 2018-11-16 12:00:44.000000000 +0100 +++ new/autoyast2-4.0.70/package/autoyast2.changes 2018-12-03 16:46:13.000000000 +0100 @@ -1,4 +1,17 @@ ------------------------------------------------------------------- +Sat Nov 24 00:10:55 UTC 2018 - Stasiek Michalski <[email protected]> + +- Provide icon with module (boo#1109310) +- 4.0.70 + +------------------------------------------------------------------- +Tue Nov 20 11:34:17 CET 2018 - [email protected] + +- Function SelectProduct removed in order NOT to select All + available products (bsc#1116332). +- 4.0.69 + +------------------------------------------------------------------- Thu Nov 15 15:11:47 UTC 2018 - [email protected] - Fallback to English when using fbiterm on those languages diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autoyast2-4.0.68/package/autoyast2.spec new/autoyast2-4.0.70/package/autoyast2.spec --- old/autoyast2-4.0.68/package/autoyast2.spec 2018-11-16 12:00:44.000000000 +0100 +++ new/autoyast2-4.0.70/package/autoyast2.spec 2018-12-03 16:46:13.000000000 +0100 @@ -22,7 +22,7 @@ %endif Name: autoyast2 -Version: 4.0.68 +Version: 4.0.70 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -68,7 +68,7 @@ # Moving security module to first installation stage Requires: yast2-security >= 4.1.1 Requires: yast2-network >= 3.1.145 -Requires: yast2-schema +Requires: yast2-schema >= 4.0.6 Requires: yast2-transfer >= 2.21.0 Requires: yast2-xml # AutoinstIssues::NoProposal @@ -219,6 +219,8 @@ %dir %{yast_moduledir} %{yast_moduledir}/AutoinstClass.rb +%{yast_icondir} + # additional files %{_fillupdir}/sysconfig.autoinstall diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autoyast2-4.0.68/src/Makefile.am new/autoyast2-4.0.70/src/Makefile.am --- old/autoyast2-4.0.68/src/Makefile.am 2018-11-16 12:00:44.000000000 +0100 +++ new/autoyast2-4.0.70/src/Makefile.am 2018-12-03 16:46:13.000000000 +0100 @@ -125,6 +125,13 @@ fillup_DATA = \ fillup/sysconfig.autoinstall -EXTRA_DIST = $(module_DATA) $(client_DATA) $(ynclude_DATA) $(scrconf_DATA) $(schemafiles_DATA) $(ybin_SCRIPTS) $(desktop_DATA) $(fillup_DATA) $(ylib_DATA) $(ydialogs_DATA) $(yclients_DATA) +symbolicdir = @icondir@/hicolor/symbolic/apps +symbolic_DATA = \ + icons/hicolor/symbolic/apps/yast-autoyast-symbolic.svg +scalabledir = @icondir@/hicolor/scalable/apps +scalable_DATA = \ + icons/hicolor/scalable/apps/yast-autoyast.svg + +EXTRA_DIST = $(module_DATA) $(client_DATA) $(ynclude_DATA) $(scrconf_DATA) $(schemafiles_DATA) $(ybin_SCRIPTS) $(desktop_DATA) $(fillup_DATA) $(ylib_DATA) $(ydialogs_DATA) $(yclients_DATA) $(symbolic_DATA) $(scalable_DATA) include $(top_srcdir)/Makefile.am.common diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autoyast2-4.0.68/src/clients/inst_autoconfigure.rb new/autoyast2-4.0.70/src/clients/inst_autoconfigure.rb --- old/autoyast2-4.0.68/src/clients/inst_autoconfigure.rb 2018-11-16 12:00:44.000000000 +0100 +++ new/autoyast2-4.0.70/src/clients/inst_autoconfigure.rb 2018-12-03 16:46:13.000000000 +0100 @@ -87,17 +87,38 @@ unknown_sections = Y2ModuleConfig.unhandled_profile_sections - unsupported_sections if unknown_sections.any? log.error "Could not process these unknown profile sections: #{unknown_sections}" + needed_packages = Y2ModuleConfig.required_packages(unknown_sections) + unless needed_packages.empty? + schema_package_list = needed_packages.map do |section, packages| + case packages.size + when 0 + package_description = _("No needed package found.") + when 1 + # TRANSLATOR: %s is the package name + package_description = _("Needed package: %s") % packages.first + else + # TRANSLATOR: %s is the list of package names + package_description = _("Needed packages: %s") % packages.join(",") + end + + "<#{section}/> - #{package_description}" + end + else + schema_package_list = unknown_sections.map{|section| "<#{section}/>"} + end + Report.LongWarning( # TRANSLATORS: Error message, %s is replaced by newline-separated # list of unknown sections of the profile # Do not translate words in brackets _( - "These sections of AutoYaST profile cannot be processed on this " \ + "These sections of the AutoYaST profile cannot be processed on this " \ "system:<br><br>%s<br><br>" \ "Maybe they were misspelled or your profile does not contain " \ - "all the needed YaST packages in <software/> section." + "all the needed YaST packages in the <software/> section " \ + "as required for functionality provided by additional modules." ) % - unknown_sections.map{|section| "<#{section}/>"}.join("<br>") + schema_package_list.join("<br>") ) end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autoyast2-4.0.68/src/clients/inst_autosetup_upgrade.rb new/autoyast2-4.0.70/src/clients/inst_autosetup_upgrade.rb --- old/autoyast2-4.0.68/src/clients/inst_autosetup_upgrade.rb 2018-11-16 12:00:44.000000000 +0100 +++ new/autoyast2-4.0.70/src/clients/inst_autosetup_upgrade.rb 2018-12-03 16:46:13.000000000 +0100 @@ -295,8 +295,6 @@ Pkg::ResolvableInstall(package, :package) end - Packages.SelectProduct - # bnc #382208 # bnc#582702 - do not select kernel on update, leave that on dependencies like 'zypper dup' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autoyast2-4.0.68/src/icons/hicolor/scalable/apps/yast-autoyast.svg new/autoyast2-4.0.70/src/icons/hicolor/scalable/apps/yast-autoyast.svg --- old/autoyast2-4.0.68/src/icons/hicolor/scalable/apps/yast-autoyast.svg 1970-01-01 01:00:00.000000000 +0100 +++ new/autoyast2-4.0.70/src/icons/hicolor/scalable/apps/yast-autoyast.svg 2018-12-03 16:46:13.000000000 +0100 @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<svg version="1.1" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg"> +<path d="m16 20-12 20 12 4z" fill="#cdab8f" stroke-width="2"/> +<path d="m112 20 12 20-12 4z" fill="#cdab8f" stroke-width="2"/> +<rect x="16" y="20" width="96" height="88" ry="0" fill="#cdab8f" stroke-width="2"/> +<rect x="16" y="20" width="96" height="80" ry="0" fill="#dec7b4" stroke-width="2"/> +<rect x="44" y="20" width="68" height="80" fill="#3584e4" stroke-width="2"/> +<rect x="44" y="100" width="68" height="8" fill="#1a5fb4" stroke-width="2"/> +<path d="m16 20-4 32h52v-32z" fill="#dec7b4" stroke-width="2"/> +<path d="m76 38-3.1094 9.328c-0.36092 0.1355-0.71784 0.2814-1.0703 0.43752l-8.7892-4.3908-5.6564 5.6564 4.3984 8.7968c-0.16386 0.34964-0.31756 0.70394-0.46092 1.0625l-9.3124 3.1094v8l9.328 3.1094c0.1355 0.36092 0.2814 0.71784 0.43752 1.0703l-4.3908 8.7892 5.6564 5.6564 8.7968-4.3984c0.34964 0.16386 0.70394 0.31756 1.0625 0.46092l3.1094 9.3124h8l3.1094-9.328c0.36092-0.1355 0.71784-0.2814 1.0703-0.43752l8.7892 4.3908 5.6564-5.6564-4.3984-8.7968c0.1638-0.34964 0.3176-0.70394 0.46096-1.0625l9.3124-3.1094v-8l-9.328-3.1094c-0.1354-0.36092-0.2814-0.71784-0.43752-1.0703l4.3908-8.7892-5.6564-5.6564-8.7968 4.3984c-0.34964-0.16386-0.70394-0.31756-1.0625-0.46092l-3.1094-9.3124zm4.0002 16c6.6274 0 12 5.3726 12 12s-5.3726 12-12 12-12-5.3726-12-12 5.3726-12 12-12z" fill="#cdab8f" stroke-width="2"/> +<path d="m76 40-3.1094 9.328c-0.36092 0.1355-0.71784 0.2814-1.0703 0.43752l-8.7892-4.3908-5.6564 5.6564 4.3984 8.7968c-0.16386 0.34964-0.31756 0.70394-0.46092 1.0625l-9.3124 3.1094v8l9.328 3.1094c0.1355 0.36092 0.2814 0.71784 0.43752 1.0703l-4.3908 8.7892 5.6564 5.6564 8.7968-4.3984c0.34964 0.16386 0.70394 0.31756 1.0625 0.46092l3.1094 9.3124h8l3.1094-9.328c0.36092-0.1355 0.71784-0.2814 1.0703-0.43752l8.7892 4.3908 5.6564-5.6564-4.3984-8.7968c0.1638-0.34964 0.3176-0.70394 0.46096-1.0625l9.3124-3.1094v-8l-9.328-3.1094c-0.1354-0.36092-0.2814-0.71784-0.43752-1.0703l4.3908-8.7892-5.6564-5.6564-8.7968 4.3984c-0.34964-0.16386-0.70394-0.31756-1.0625-0.46092l-3.1094-9.3124zm4.0002 16c6.6274 0 12 5.3726 12 12s-5.3726 12-12 12-12-5.3726-12-12 5.3726-12 12-12z" fill="#dec7b4" stroke-width="2"/> +<path d="m40 52h76l-4-32h-68z" fill="#3584e4" stroke-width="2"/> +<rect x="12" y="52" width="52" height="2" fill="#cdab8f" stroke-width="2"/> +<rect x="40" y="52" width="76" height="2" fill="#1a5fb4" stroke-width="2"/> +</svg> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autoyast2-4.0.68/src/icons/hicolor/symbolic/apps/yast-autoyast-symbolic.svg new/autoyast2-4.0.70/src/icons/hicolor/symbolic/apps/yast-autoyast-symbolic.svg --- old/autoyast2-4.0.68/src/icons/hicolor/symbolic/apps/yast-autoyast-symbolic.svg 1970-01-01 01:00:00.000000000 +0100 +++ new/autoyast2-4.0.70/src/icons/hicolor/symbolic/apps/yast-autoyast-symbolic.svg 2018-12-03 16:46:13.000000000 +0100 @@ -0,0 +1,3 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"> + <path d="M 7 1 L 6.2226562 3.3320312 C 6.1324273 3.3659063 6.0431986 3.4023743 5.9550781 3.4414062 L 3.7578125 2.34375 L 2.34375 3.7578125 L 3.4433594 5.9570312 C 3.4023944 6.0444403 3.363963 6.1330222 3.328125 6.2226562 L 1 7 L 1 9 L 3.3320312 9.7773438 C 3.3659063 9.8675726 3.4023743 9.9568008 3.4414062 10.044922 L 2.34375 12.242188 L 3.7578125 13.65625 L 5.9570312 12.556641 C 6.0444403 12.597601 6.1330222 12.636035 6.2226562 12.671875 L 7 15 L 9 15 L 9.7773438 12.667969 C 9.8525173 12.639742 9.9262769 12.607977 10 12.576172 L 10 10.220703 C 9.4683457 10.699788 8.7720164 11 8 11 C 6.343146 11 5 9.656854 5 8 C 5 6.343146 6.343146 5 8 5 C 9.656854 5 11 6.343146 11 8 C 11 8.7720164 10.699788 9.4683456 10.220703 10 L 12.576172 10 C 12.609763 9.9265211 12.641877 9.8523686 12.671875 9.7773438 L 15 9 L 15 7 L 12.667969 6.2226562 C 12.634119 6.1324273 12.597624 6.0431986 12.558594 5.9550781 L 13.65625 3.7578125 L 12.242188 2.34375 L 10.042969 3.4433594 C 9.9555594 3.4023934 9.8669776 3.363963 9.7773438 3.328125 L 9 1 L 7 1 z M 11 11 L 11 16 L 16 16 L 16 11 L 11 11 z M 12 12 L 13 12 L 13 13 L 14 13 L 14 12 L 15 12 L 15 14 L 14 14 L 14 15 L 13 15 L 13 14 L 12 14 L 12 12 z " fill="#c0bfbc" /> +</svg> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autoyast2-4.0.68/src/modules/Y2ModuleConfig.rb new/autoyast2-4.0.70/src/modules/Y2ModuleConfig.rb --- old/autoyast2-4.0.68/src/modules/Y2ModuleConfig.rb 2018-11-16 12:00:44.000000000 +0100 +++ new/autoyast2-4.0.70/src/modules/Y2ModuleConfig.rb 2018-12-03 16:46:13.000000000 +0100 @@ -15,6 +15,8 @@ RESOURCE_NAME_MERGE_KEYS = "X-SuSE-YaST-AutoInstMerge" RESOURCE_ALIASES_NAME_KEY = "X-SuSE-YaST-AutoInstResourceAliases" MODES = %w(all configure write) + YAST_SCHEMA_DIR = "/usr/share/YaST2/schema/autoyast/rng/*.rng" + SCHEMA_PACKAGE_FILE = "/usr/share/YaST2/schema/autoyast/rnc/includes.rnc" include Yast::Logger @@ -28,6 +30,7 @@ Yast.import "Desktop" Yast.import "Wizard" Yast.import "Directory" + Yast.import "PackageSystem" # include "autoinstall/io.ycp"; @@ -67,7 +70,6 @@ Desktop.Read(_Values) configurations = deep_copy(Desktop.Modules) - #y2debug("%1", configurations ); groups = deep_copy(Desktop.Groups) confs = {} @@ -116,7 +118,6 @@ # @return [void] def CreateGroupTree(_Groups) _Groups = deep_copy(_Groups) - #y2debug("Groups: %1", Groups); grouplist = [] grouplist = SortGroups(_Groups, Builtins.maplist(_Groups) do |rawname, group| @@ -128,8 +129,6 @@ _MeunTreeEntry = { "entry" => name, "title" => title } @MenuTreeData = Builtins.add(@MenuTreeData, _MeunTreeEntry) end - - #y2debug("data: %1", MenuTreeData); nil end @@ -158,8 +157,6 @@ @MenuTreeData = Builtins.add(@MenuTreeData, menu_entry) end end - # y2debug("MenuTreeData: %1", MenuTreeData ); - nil end @@ -418,6 +415,41 @@ end end + # Returns required package names for the given AutoYaST sections. + # + # @param sections [Array<String>] Section names + # @return [Hash<String, Array<String>>] Required packages of a section. + def required_packages(sections) + package_names = {} + log.info "Evaluating needed packages for handling AY-sections #{sections}" + if PackageSystem.Installed("yast2-schema") && + PackageSystem.Installed("grep") + sections.each do |section| + # Evaluate which *rng file belongs to the given section + package_names[section] = [] + ret = SCR.Execute(path(".target.bash_output"), + "/usr/bin/grep -l \"<define name=\\\"#{section}\\\">\" #{YAST_SCHEMA_DIR}") + if ret["exit"] == 0 + ret["stdout"].split.uniq.each do |rng_file| + # Evalute package name to which this rng file belongs to. + package = package_name_of_schema(File.basename(rng_file, ".rng")) + if package + package_names[section] << package unless PackageSystem.Installed(package) + else + log.info("No package belongs to #{rng_file}.") + end + end + else + log.info("Cannot evaluate needed packages for AY section: #{section}") + end + end + else + log.info("Cannot evaluate needed packages for installation " \ + "due missing environment.") + end + return package_names + end + publish :variable => :GroupMap, :type => "map <string, map>" publish :variable => :ModuleMap, :type => "map <string, map>" publish :variable => :MenuTreeData, :type => "list <map>" @@ -426,8 +458,29 @@ publish :function => :getResourceData, :type => "any (map, string)" publish :function => :Deps, :type => "list <map> ()" publish :function => :SetDesktopIcon, :type => "boolean (string)" + publish :function => :required_packages, :type => "map <string, list> (list <string>)" publish :function => :unhandled_profile_sections, :type => "list <string> ()" publish :function => :unsupported_profile_sections, :type => "list <string> ()" + + private + + # Returns package name of a given schema. + # This information is stored in /usr/share/YaST2/schema/autoyast/rnc/includes.rnc + # which will be provided by the yast2-schema package. + # + # @param schema <String> schema name like firewall, firstboot, ... + # @return <String> package name or nil + def package_name_of_schema(schema) + if !@schema_package + @schema_package = {} + File::readlines(SCHEMA_PACKAGE_FILE).each do |line| + line_split = line.split + next if line.split.size < 4 # Old version of yast2-schema + @schema_package[File.basename(line_split[1].delete("\'"), ".rnc")] = line.split.last + end + end + @schema_package[schema] + end end Y2ModuleConfig = Y2ModuleConfigClass.new diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autoyast2-4.0.68/test/Y2ModuleConfig_test.rb new/autoyast2-4.0.70/test/Y2ModuleConfig_test.rb --- old/autoyast2-4.0.68/test/Y2ModuleConfig_test.rb 2018-11-16 12:00:44.000000000 +0100 +++ new/autoyast2-4.0.70/test/Y2ModuleConfig_test.rb 2018-12-03 16:46:13.000000000 +0100 @@ -135,4 +135,57 @@ end end end + + describe "#required_packages" do + context "packages needed for the check are not installed" do + it "returns an empty hash" do + allow(Yast::PackageSystem).to receive(:Installed).with("yast2-schema").and_return false + expect(subject.required_packages([])).to eq({}) + end + end + + context "all packages needed for the check are installed" do + before do + allow(Yast::PackageSystem).to receive(:Installed).with("yast2-schema").and_return true + allow(Yast::PackageSystem).to receive(:Installed).with("grep").and_return true + end + + context "no rng file found for the given AY section" do + it "returns a hash with an empty package array" do + expect(Yast::SCR).to receive(:Execute).with(Yast::Path.new(".target.bash_output"), + "/usr/bin/grep -l \"<define name=\\\"not-found\\\">\" /usr/share/YaST2/schema/autoyast/rng/*.rng"). + and_return({"exit"=>1, "stderr"=>"", "stdout"=>""}) + expect(subject.required_packages(["not-found"])).to eq({"not-found"=>[]}) + end + end + + context "rng file found for the given AY section" do + before do + allow(Yast::SCR).to receive(:Execute).with(Yast::Path.new(".target.bash_output"), + "/usr/bin/grep -l \"<define name=\\\"firstboot\\\">\" /usr/share/YaST2/schema/autoyast/rng/*.rng"). + and_return ( {"exit"=>0, "stderr"=>"", + "stdout"=>"/usr/share/YaST2/schema/autoyast/rng/firstboot.rng\n"} ) + allow(File).to receive(:readlines).with("/usr/share/YaST2/schema/autoyast/rnc/includes.rnc"). + and_return(["include 'firstboot.rnc' # yast2-firstboot\n", "include 'pxe.rnc' # autoyast2\n"]) + end + + context "regarding rnc files does not belong to any package" do + it "returns a hash with an empty package array" do + expect(Yast::SCR).to receive(:Execute).with(Yast::Path.new(".target.bash_output"), + "/usr/bin/grep -l \"<define name=\\\"fake\\\">\" /usr/share/YaST2/schema/autoyast/rng/*.rng"). + and_return ( {"exit"=>0, "stderr"=>"", + "stdout"=>"/usr/share/YaST2/schema/autoyast/rng/fake.rng\n"} ) + expect(subject.required_packages(["fake"])).to eq({"fake"=>[]}) + end + end + + context "regarding rnc files belongs to a package" do + it "returns a hash with needed package list" do + expect(Yast::PackageSystem).to receive(:Installed).with("yast2-firstboot").and_return false + expect(subject.required_packages(["firstboot"])).to eq({"firstboot"=>["yast2-firstboot"]}) + end + end + end + end + end end
