Hello community,
here is the log from the commit of package yast2-bootloader for openSUSE:Factory checked in at 2014-06-18 10:59:36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-bootloader (Old)
and /work/SRC/openSUSE:Factory/.yast2-bootloader.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-bootloader"
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-bootloader/yast2-bootloader.changes 2014-06-01 18:57:11.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-bootloader.new/yast2-bootloader.changes 2014-06-18 10:59:42.000000000 +0200
@@ -1,0 +2,57 @@
+Mon Jun 16 09:22:43 UTC 2014 - jreidinger@suse.com
+
+- Allow in autoyast only supported bootloaders (bnc#882210)
+- 3.1.55
+
+-------------------------------------------------------------------
+Fri Jun 13 12:03:40 UTC 2014 - jreidinger@suse.com
+
+- fix crash with invalid partition to activate (bnc#882592)
+- 3.1.54
+
+-------------------------------------------------------------------
+Fri Jun 13 11:46:09 UTC 2014 - jsrain@suse.cz
+
+- don't prevent installation because of BIOS IDs not detected if
+ disks order reviewed by user (bnc#880439)
+- 3.1.53
+
+-------------------------------------------------------------------
+Wed Jun 11 14:24:22 UTC 2014 - jreidinger@suse.com
+
+- do not crash in autoyast (bnc#882210)
+- 3.1.52
+
+-------------------------------------------------------------------
+Mon Jun 9 08:32:44 UTC 2014 - jreidinger@suse.com
+
+- Fix reinstallation of secure boot stage 1 (bnc#875235)
+- 3.1.51
+
+-------------------------------------------------------------------
+Thu Jun 5 11:00:35 UTC 2014 - jsrain@suse.cz
+
+- adjusted wording if disk order could not be detected (bnc#880439)
+- 3.1.50
+
+-------------------------------------------------------------------
+Wed Jun 4 09:10:42 UTC 2014 - jreidinger@suse.com
+
+- remove translation of section as it is generated in GRUB2 and
+ never work reliably fro GRUB1 (bnc#875819)
+- 3.1.49
+
+-------------------------------------------------------------------
+Mon Jun 3 18:13:05 UTC 2014 - dvaleev@suse.com
+
+- Setting boot flag on GPT PReP resets prep flag which leads to
+ grub2-install unable to install a bootloader (bnc#880094)
+- 3.1.48
+
+-------------------------------------------------------------------
+Mon Jun 2 09:07:14 UTC 2014 - jreidinger@suse.com
+
+- fix typo causing crash when writing pmbr flag (bnc#880893)
+- 3.1.47
+
+-------------------------------------------------------------------
Old:
----
yast2-bootloader-3.1.46.tar.bz2
New:
----
yast2-bootloader-3.1.55.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-bootloader.spec ++++++
--- /var/tmp/diff_new_pack.2Jc6uy/_old 2014-06-18 10:59:43.000000000 +0200
+++ /var/tmp/diff_new_pack.2Jc6uy/_new 2014-06-18 10:59:43.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-bootloader
-Version: 3.1.46
+Version: 3.1.55
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
++++++ yast2-bootloader-3.1.46.tar.bz2 -> yast2-bootloader-3.1.55.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.46/package/yast2-bootloader.changes new/yast2-bootloader-3.1.55/package/yast2-bootloader.changes
--- old/yast2-bootloader-3.1.46/package/yast2-bootloader.changes 2014-05-29 16:18:44.000000000 +0200
+++ new/yast2-bootloader-3.1.55/package/yast2-bootloader.changes 2014-06-16 13:23:49.000000000 +0200
@@ -1,4 +1,61 @@
-------------------------------------------------------------------
+Mon Jun 16 09:22:43 UTC 2014 - jreidinger@suse.com
+
+- Allow in autoyast only supported bootloaders (bnc#882210)
+- 3.1.55
+
+-------------------------------------------------------------------
+Fri Jun 13 12:03:40 UTC 2014 - jreidinger@suse.com
+
+- fix crash with invalid partition to activate (bnc#882592)
+- 3.1.54
+
+-------------------------------------------------------------------
+Fri Jun 13 11:46:09 UTC 2014 - jsrain@suse.cz
+
+- don't prevent installation because of BIOS IDs not detected if
+ disks order reviewed by user (bnc#880439)
+- 3.1.53
+
+-------------------------------------------------------------------
+Wed Jun 11 14:24:22 UTC 2014 - jreidinger@suse.com
+
+- do not crash in autoyast (bnc#882210)
+- 3.1.52
+
+-------------------------------------------------------------------
+Mon Jun 9 08:32:44 UTC 2014 - jreidinger@suse.com
+
+- Fix reinstallation of secure boot stage 1 (bnc#875235)
+- 3.1.51
+
+-------------------------------------------------------------------
+Thu Jun 5 11:00:35 UTC 2014 - jsrain@suse.cz
+
+- adjusted wording if disk order could not be detected (bnc#880439)
+- 3.1.50
+
+-------------------------------------------------------------------
+Wed Jun 4 09:10:42 UTC 2014 - jreidinger@suse.com
+
+- remove translation of section as it is generated in GRUB2 and
+ never work reliably fro GRUB1 (bnc#875819)
+- 3.1.49
+
+-------------------------------------------------------------------
+Mon Jun 3 18:13:05 UTC 2014 - dvaleev@suse.com
+
+- Setting boot flag on GPT PReP resets prep flag which leads to
+ grub2-install unable to install a bootloader (bnc#880094)
+- 3.1.48
+
+-------------------------------------------------------------------
+Mon Jun 2 09:07:14 UTC 2014 - jreidinger@suse.com
+
+- fix typo causing crash when writing pmbr flag (bnc#880893)
+- 3.1.47
+
+-------------------------------------------------------------------
Thu May 29 13:47:40 UTC 2014 - jreidinger@suse.com
- Fix crash in upgrade from SLE11
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.46/package/yast2-bootloader.spec new/yast2-bootloader-3.1.55/package/yast2-bootloader.spec
--- old/yast2-bootloader-3.1.46/package/yast2-bootloader.spec 2014-05-29 16:18:44.000000000 +0200
+++ new/yast2-bootloader-3.1.55/package/yast2-bootloader.spec 2014-06-16 13:23:49.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-bootloader
-Version: 3.1.46
+Version: 3.1.55
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.46/src/clients/bootloader_auto.rb new/yast2-bootloader-3.1.55/src/clients/bootloader_auto.rb
--- old/yast2-bootloader-3.1.46/src/clients/bootloader_auto.rb 2014-05-29 16:18:44.000000000 +0200
+++ new/yast2-bootloader-3.1.55/src/clients/bootloader_auto.rb 2014-06-16 13:23:49.000000000 +0200
@@ -52,11 +52,12 @@
Builtins.y2debug("param=%1", @param)
if @func == "Import"
- @ret = Bootloader.Import(
- AI2Export(
- Convert.convert(@param, :from => "map", :to => "map ")
- )
- )
+ data = AI2Export(@param)
+ if data
+ @ret = Bootloader.Import(data)
+ else
+ @ret = false
+ end
# Create a summary
# return string
elsif @func == "Summary"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.46/src/include/bootloader/grub/options.rb new/yast2-bootloader-3.1.55/src/include/bootloader/grub/options.rb
--- old/yast2-bootloader-3.1.46/src/include/bootloader/grub/options.rb 2014-05-29 16:18:44.000000000 +0200
+++ new/yast2-bootloader-3.1.55/src/include/bootloader/grub/options.rb 2014-06-16 13:23:49.000000000 +0200
@@ -442,6 +442,8 @@
index = Ops.add(index, 1)
{ d => Builtins.sformat("hd%1", indexs) }
end
+ # once order is reviewed by user, BIOS IDs don't matter (bnc#880439)
+ BootStorage.bois_id_missing = false
nil
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.46/src/include/bootloader/grub2/misc.rb new/yast2-bootloader-3.1.55/src/include/bootloader/grub2/misc.rb
--- old/yast2-bootloader-3.1.46/src/include/bootloader/grub2/misc.rb 2014-05-29 16:18:44.000000000 +0200
+++ new/yast2-bootloader-3.1.55/src/include/bootloader/grub2/misc.rb 2014-06-16 13:23:49.000000000 +0200
@@ -28,6 +28,7 @@
Yast.import "BootCommon"
Yast.import "PackageSystem"
Yast.import "Map"
+ Yast.import "Arch"
end
# --------------------------------------------------------------
@@ -109,6 +110,9 @@
Builtins.y2milestone("loader_device is disk device")
p_dev = Storage.GetDiskPartition(BootStorage.BootPartitionDevice)
num = BootCommon.myToInteger(Ops.get(p_dev, "nr"))
+ # handle situation when we have md raid and boot from md0 and sda and md0 is boot device (bnc#882592)
+ # This also prevents mess when we can potentially have mix of different number and device
+ return {} if p_dev["disk"] != mbr_dev
end
if Ops.greater_than(num, 4)
@@ -172,6 +176,8 @@
ret = Builtins.maplist(bootloader_base_devices) do |partition|
grub_getPartitionToActivate(partition)
end
+ ret.delete({})
+
Builtins.toset(ret)
end
@@ -435,7 +441,8 @@
gpt_disk = Storage.GetTargetMap[BootCommon.mbrDisk]["label"] == "gpt"
# if primary partition on old DOS MBR table, GPT do not have such limit
- if gpt_disk || num <= 4
+
+ if !(Arch.ppc && gpt_disk) && (gpt_disk || num <= 4)
Builtins.y2milestone("Activating partition %1 on %2", num, mbr_dev)
# FIXME: this is the most rotten code since molded sliced bread
# move to bootloader/Core/GRUB.pm or similar
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.46/src/include/bootloader/routines/autoinstall.rb new/yast2-bootloader-3.1.55/src/include/bootloader/routines/autoinstall.rb
--- old/yast2-bootloader-3.1.46/src/include/bootloader/routines/autoinstall.rb 2014-05-29 16:18:44.000000000 +0200
+++ new/yast2-bootloader-3.1.55/src/include/bootloader/routines/autoinstall.rb 2014-06-16 13:23:49.000000000 +0200
@@ -109,6 +109,7 @@
Yast.import "Initrd"
Yast.import "Kernel"
Yast.import "Mode"
+ Yast.import "Popup"
end
# Add missing data (eg. root filesystem) to sections imported from profile
@@ -154,6 +155,15 @@
# @return a map the export map
def AI2Export(ai)
ai = deep_copy(ai)
+ unsupported_bootloaders = ["grub", "zipl", "plilo", "lilo", "elilo"]
+ if ai["loader_type"] && unsupported_bootloaders.include?(exp["loader_type"].downcase)
+ # FIXME this should be better handled by exception and show it properly, but it require too big change now
+ Popup.Error(_("Unsupported bootloader '%s'. Adapt your AutoYaST profile accordingly."),
+ exp["loader_type"])
+ return nil
+ end
+
+
BootCommon.DetectDisks if Mode.autoinst
# prepare settings for default bootloader if not specified in the
# profile
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.46/src/include/bootloader/routines/misc.rb new/yast2-bootloader-3.1.55/src/include/bootloader/routines/misc.rb
--- old/yast2-bootloader-3.1.46/src/include/bootloader/routines/misc.rb 2014-05-29 16:18:44.000000000 +0200
+++ new/yast2-bootloader-3.1.55/src/include/bootloader/routines/misc.rb 2014-06-16 13:23:49.000000000 +0200
@@ -753,13 +753,6 @@
- # Create translated name of a section
- # @param [String] orig string original section name
- # @return translated section name
- def translateSectionTitle(orig)
- GfxMenu.translateSectionTitle(orig, getLoaderType(false))
- end
-
# Check if device is MBR of a disk
# @param [String] device string device to check
# @return [Boolean] true if is MBR
@@ -1242,7 +1235,7 @@
comment
)
- grub1_extended_sysconfig(sysagent) if lt == "grub"
+ grub1_extended_sysconfig(sys_agent) if lt == "grub"
nil
end
@@ -1250,7 +1243,7 @@
# extended sysconfig options to be used only for grub1 as grub2 store it
# in its config (bnc#870890)
# @note remove when grub1 support will be removed
- def grub1_extended_sysconfig(sysagent)
+ def grub1_extended_sysconfig(sys_agent)
default_boot_section_name = ""
# fix for bnc #440125 - default boot section with failsafe args
# it is not possible create exact algoritmus but I hope it helps in
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.46/src/modules/BootCommon.rb new/yast2-bootloader-3.1.55/src/modules/BootCommon.rb
--- old/yast2-bootloader-3.1.46/src/modules/BootCommon.rb 2014-05-29 16:18:44.000000000 +0200
+++ new/yast2-bootloader-3.1.55/src/modules/BootCommon.rb 2014-06-16 13:23:49.000000000 +0200
@@ -250,7 +250,7 @@
# @return a map describing the section
def CreateLinuxSection(title)
ret = {
- "name" => translateSectionTitle(title),
+ "name" => title,
"original_name" => title,
"type" => "image",
"__auto" => true,
@@ -932,21 +932,8 @@
end
def setSystemSecureBootStatus(enable)
- # if (enable && enable != secure_boot)
- # {
- # // don't configure package manager during autoinstallation preparing
- # if (Mode::normal () && (! (Mode::config () || Mode::repair ())))
- # {
- # y2milestone ("Install shim");
- # PackageSystem::InstallAll (["shim"]);
- # }
- # else if (Stage::initial () )
- # {
- # y2milestone ("AddResolvables shim");
- # PackagesProposal::AddResolvables ("yast2-bootloader", `package, ["shim"]);
- # }
- # }
Builtins.y2milestone("Set secure boot: %2 => %1", enable, @secure_boot)
+ location_changed = true if @secure_boot != enable # secure boot require reinstall of stage 1
@secure_boot = enable
nil
@@ -1086,7 +1073,6 @@
publish :function => :restoreMBR, :type => "boolean (string)"
publish :function => :UpdateKernelParams, :type => "string (string)"
publish :function => :getSwapPartitions, :type => "map ()"
- publish :function => :translateSectionTitle, :type => "string (string)"
publish :function => :UpdateInstallationKernelParameters, :type => "void ()"
publish :function => :GetAdditionalFailsafeParams, :type => "string ()"
publish :function => :UpdateGfxMenuContents, :type => "boolean ()"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.46/src/modules/BootGRUB.rb new/yast2-bootloader-3.1.55/src/modules/BootGRUB.rb
--- old/yast2-bootloader-3.1.46/src/modules/BootGRUB.rb 2014-05-29 16:18:44.000000000 +0200
+++ new/yast2-bootloader-3.1.55/src/modules/BootGRUB.rb 2014-06-16 13:23:49.000000000 +0200
@@ -421,7 +421,7 @@
label != "Vendor diagnostics" && # <- should probably be '&&' => not Thinkpad MBR AND not "Vendor diagnostics" partition type
label != "Vendor diagnostic")
m = {
- "name" => BootCommon.translateSectionTitle(label),
+ "name" => label,
"type" => "other",
"original_name" => label,
"chainloader" => BootStorage.Dev2MountByDev(dev),
@@ -440,7 +440,7 @@
out = Builtins.add(
out,
{
- "name" => BootCommon.translateSectionTitle("hard disk"),
+ "name" => "hard disk",
"original_name" => "hard_disk",
"type" => "other",
"chainloader" => BootStorage.Dev2MountByDev(BootCommon.mbrDisk),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.46/src/modules/BootGRUB2.rb new/yast2-bootloader-3.1.55/src/modules/BootGRUB2.rb
--- old/yast2-bootloader-3.1.46/src/modules/BootGRUB2.rb 2014-05-29 16:18:44.000000000 +0200
+++ new/yast2-bootloader-3.1.55/src/modules/BootGRUB2.rb 2014-06-16 13:23:49.000000000 +0200
@@ -120,7 +120,7 @@
# something with PMBR needed
if BootCommon.pmbr_action
boot_devices = BootCommon.GetBootloaderDevices
- boot_discs = targets.map {|d| Storage.GetDisk(Storage.GetTargetMap, d)}
+ boot_discs = boot_devices.map {|d| Storage.GetDisk(Storage.GetTargetMap, d)}
boot_discs.uniq!
gpt_disks = boot_discs.select {|d| d["label"] == "gpt" }
gpt_disks_devices = gpt_disks.map {|d| d["device"] }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.46/src/modules/BootSupportCheck.rb new/yast2-bootloader-3.1.55/src/modules/BootSupportCheck.rb
--- old/yast2-bootloader-3.1.46/src/modules/BootSupportCheck.rb 2014-05-29 16:18:44.000000000 +0200
+++ new/yast2-bootloader-3.1.55/src/modules/BootSupportCheck.rb 2014-06-16 13:23:49.000000000 +0200
@@ -231,9 +231,7 @@
if BootStorage.bois_id_missing
AddNewProblem(
- _(
- "It was not possible to determine the exact order of disks for device map. The order of disks can be changed in \"Boot Loader Installation Details\""
- )
+ _("YaST could not determine the exact boot order of disks needed for the device map. Review and possibly adjust the boot order of disks in \"Boot Loader Installation Details\"")
)
return false
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.46/src/modules/GfxMenu.rb new/yast2-bootloader-3.1.55/src/modules/GfxMenu.rb
--- old/yast2-bootloader-3.1.46/src/modules/GfxMenu.rb 2014-05-29 16:18:44.000000000 +0200
+++ new/yast2-bootloader-3.1.55/src/modules/GfxMenu.rb 2014-06-16 13:23:49.000000000 +0200
@@ -30,293 +30,10 @@
@enable_sound_signals = false
end
- # Replace every match of given regular expression in a string with a
- # replacement string
- #
- # e.g. ReplaceRegexMatch( "abcdef12ef34gh000", "[0-9]+", "_A_" ) -> "abcdef_A_ef_A_gh_A_"
- #
- # @param [String] input string that may contain substrings matching regex
- # @param [String] regex regular expression to search for, must not contain brackets
- # @param [String] repl string that replaces every substring matching the regex
- # @return [String] that has matches replaced
- def ReplaceRegexMatch(input, regex, repl)
- return "" if input == nil || Ops.less_than(Builtins.size(input), 1)
- rest = input
- output = ""
- if Builtins.regexpmatch(rest, regex)
- p = Builtins.regexppos(rest, regex)
- begin
- output = Ops.add(
- Ops.add(
- output,
- Builtins.substring(rest, 0, Ops.get_integer(p, 0, 0))
- ),
- repl
- )
- rest = Builtins.substring(
- rest,
- Ops.add(Ops.get_integer(p, 0, 0), Ops.get_integer(p, 1, 0))
- )
- p = Builtins.regexppos(rest, regex)
- end while Ops.greater_than(Builtins.size(p), 0)
- end
- Ops.add(output, rest)
- end
-
- # Create translated name of a section
- # @param [String] orig string original section name
- # @param [String] loader string bootloader type
- # @return translated section name
- def translateSectionTitle(orig, loader)
- #
- # FIXME: handling of bootloader-specific restrictions should be done
- # in perl-Bootloader
- #
- trans = {
- # entry of bootloader menu - only a-z, A-Z, 0-9, _ and blank space
- # are allowed, otherwise translartion won't be used
- # try to keep short, may be shortened due to bootloader limitations
- "linux" => _(
- "Linux"
- ),
- # entry of bootloader menu - only a-z, A-Z, 0-9, _ and blank space
- # are allowed, otherwise translartion won't be used
- # try to keep short, may be shortened due to bootloader limitations
- "failsafe" => _(
- "Failsafe"
- ),
- # entry of bootloader menu - only a-z, A-Z, 0-9, _ and blank space
- # are allowed, otherwise translartion won't be used
- # try to keep short, may be shortened due to bootloader limitations
- "floppy" => _(
- "Floppy"
- ),
- # entry of bootloader menu - only a-z, A-Z, 0-9, _ and blank space
- # are allowed, otherwise translartion won't be used
- # try to keep short, may be shortened due to bootloader limitations
- "hard disk" => _(
- "Hard Disk"
- ),
- # entry of bootloader menu - only a-z, A-Z, 0-9, _ and blank space
- # are allowed, otherwise translartion won't be used
- # try to keep short, may be shortened due to bootloader limitations
- "memtest86" => _(
- "Memory Test"
- ),
- # entry of bootloader menu - only a-z, A-Z, 0-9, _ and blank space
- # are allowed, otherwise translartion won't be used
- # try to keep short, may be shortened due to bootloader limitations
- "original MBR" => _(
- "MBR before Installation"
- ),
- # entry of bootloader menu - only a-z, A-Z, 0-9, _ and blank space
- # are allowed, otherwise translartion won't be used
- # try to keep short, may be shortened due to bootloader limitations
- "previous" => _(
- "Previous Kernel"
- ),
- # entry of bootloader menu - only a-z, A-Z, 0-9, _ and blank space
- # are allowed, otherwise translartion won't be used
- # try to keep short, may be shortened due to bootloader limitations
- "Vendor diagnostics" => _(
- "Vendor Diagnostics"
- )
- }
- not_trans = {
- "linux" => "Linux",
- "failsafe" => "Failsafe",
- "floppy" => "Floppy",
- "hard disk" => "Hard Disk",
- "memtest86" => "Memory Test",
- "original MBR" => "MBR before Installation",
- "windows" => "Windows",
- "xen" => "XEN"
- }
- translated = Ops.get_string(trans, orig, "\n") # not allowed character
- # not_translated version will be used
- filtered = Builtins.filterchars(
- translated,
- "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 _"
- )
- if Builtins.size(filtered) != Builtins.size(translated)
- Builtins.y2warning("Incorrect translation %1 -> %2", orig, translated)
- return Ops.get_string(not_trans, orig, orig)
- end
- if loader != "grub"
- # This may become an alternative setup for grub in the future
- # (requiring a separate menu.lst on an extra partition for the
- # first level, along with the changes in several parts of the
- # BootGRUB code for this).
- # AI: rw/od should discuss this with the grub maintainer and
- # create a feature for this.
- if orig == "linux"
- Yast.import "Product"
- product = Product.short_name
- prod_filtered = Builtins.filterchars(
- product,
- "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 _."
- )
- filtered = prod_filtered if product == prod_filtered && product != " "
- end
- Builtins.y2milestone("adapting section title: %1", filtered)
- # label tag for lilo.conf has a restricted valid character set and
- # limited allowed string length
- cutoff = ""
-
- # Limit length to 11 characters, but keep it "nice"
- # 1. cut off linux- prefix if found
- if Ops.greater_than(Builtins.size(filtered), 11)
- cutoff = Builtins.regexpsub(filtered, "^[Ll][Ii][Nn][Uu][Xx]-", "")
- filtered = cutoff if cutoff != nil
- end
-
- while Ops.greater_than(Builtins.size(filtered), 11)
- # 2. cut off last word, break if no more found
- cutoff = Builtins.regexpsub(filtered, "^(.*) [^ ]*$", "\\1")
- Builtins.y2milestone("cutoff is: %1", cutoff)
- if cutoff == nil || Builtins.size(cutoff) == Builtins.size(filtered)
- break
- end
- filtered = cutoff
- end
- Builtins.y2milestone("section title without excess words: %1", filtered)
-
- # 3. last resort: cutoff excess characters
- filtered = Builtins.substring(filtered, 0, 11)
- Builtins.y2milestone("section title limited to 11 chars: %1", filtered)
-
- # 4. convert not allowed chars to "_"
- # (NOTE: this converts according to lilo requirements, ATM we do
- # not allow ".-" above already; so ATM this converts only " ")
- filtered = ReplaceRegexMatch(
- filtered,
- "[^abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890.-]",
- "_"
- )
- Builtins.y2milestone(
- "section title: filtered unallowed characters: %1",
- filtered
- )
- elsif Builtins.contains(["linux", "failsafe", "previous", "xen"], orig) &&
- !Mode.test
- # for bootloaders that support long section names, like grub:
- Yast.import "Product"
- product = Product.name
- prod_filtered = Builtins.filterchars(
- product,
- "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 _."
- )
- if product != nil && product == prod_filtered && product != " " &&
- product != ""
- if orig == "linux"
- filtered = prod_filtered
- else
- filtered = Builtins.sformat("%1 -- %2", filtered, prod_filtered)
- end
- end
- end
- filtered
- end
-
- # Get translated section names, including diacritics
- # @param [String] loader string bootloader type
- # @return a map section names translations
- def getTranslationsToDiacritics(loader)
- trans = {
- # entry of bootloader menu - only ISO 8859-1, -2 and -15 characters
- # are allowed. Always remove the leading '_', its just to
- # be able to have translations with and without diacritics
- # please use diacritics here
- "linux" => _(
- "_Linux"
- ),
- # entry of bootloader menu - only ISO 8859-1, -2 and -15 characters
- # are allowed. Always remove the leading '_', its just to
- # be able to have translations with and without diacritics
- # please use diacritics here
- "failsafe" => _(
- "_Failsafe"
- ),
- # entry of bootloader menu - only ISO 8859-1, -2 and -15 characters
- # are allowed. Always remove the leading '_', its just to
- # be able to have translations with and without diacritics
- # please use diacritics here
- "floppy" => _(
- "_Floppy"
- ),
- # entry of bootloader menu - only ISO 8859-1, -2 and -15 characters
- # are allowed. Always remove the leading '_', its just to
- # be able to have translations with and without diacritics
- # please use diacritics here
- "hard disk" => _(
- "_Hard Disk"
- ),
- # entry of bootloader menu - only ISO 8859-1, -2 and -15 characters
- # are allowed. Always remove the leading '_', its just to
- # be able to have translations with and without diacritics
- # please use diacritics here
- "memtest86" => _(
- "_Memory Test"
- ),
- # entry of bootloader menu - only ISO 8859-1, -2 and -15 characters
- # are allowed. Always remove the leading '_', its just to
- # be able to have translations with and without diacritics
- # please use diacritics here
- "original MBR" => _(
- "_MBR before Installation"
- ),
- # entry of bootloader menu - only ISO 8859-1, -2 and -15 characters
- # are allowed. Always remove the leading '_', its just to
- # be able to have translations with and without diacritics
- # please use diacritics here
- "previous" => _(
- "_Previous Kernel"
- ),
- # entry of bootloader menu - only ISO 8859-1, -2 and -15 characters
- # are allowed. Always remove the leading '_', its just to
- # be able to have translations with and without diacritics
- # please use diacritics here
- "Vendor diagnostics" => _(
- "_Vendor Diagnostics"
- ),
- "xen" => "XEN"
- }
- # trans = filter (string k, string v, trans, {
- # if (substring (v, 0, 1) == "_")
- # {
- # y2warning ("Translation %1 contains leading underscore", v);
- # return false;
- # }
- # return true;
- # });
- trans = Builtins.mapmap(trans) do |k, v|
- v = Builtins.substring(v, 1) if Builtins.substring(v, 0, 1) == "_"
- { k => v }
- end
- ret = Builtins.mapmap(trans) do |k, v|
- il1 = translateSectionTitle(k, loader)
- if Builtins.contains(["linux", "failsafe", "previous", "xen"], k) &&
- !Mode.test
- Yast.import "Product"
- product = Product.name
- if product != " " && product != "" && product != nil
- if k == "linux"
- v = product
- else
- v = Builtins.sformat("%1 (%2)", product, v)
- end
- end
- end
- { il1 => v }
- end
- deep_copy(ret)
- end
-
# FATE#305403: Bootloader beep configuration
# Read status of acoustic signals
# set global variable enable_sound_signals
#
-
def ReadStatusAcousticSignal
ret = -1 # off
@@ -469,20 +186,9 @@
end
end
- # create translation map (in temp file) for the currently active language
- # for gettext (AFAICT), i.e. whatever is found in LANG or LC_MESSAGES --
- # this should be RC_LANG
- trans_file = Builtins.sformat("%1/boot_translations", tmpdir)
- trans_map = getTranslationsToDiacritics(loader)
- trans_list = Builtins.maplist(trans_map) do |k, v|
- Builtins.sformat("%1\n%2", k, v)
- end
- trans_str = Builtins.mergestring(trans_list, "\n")
- trans_str = Ops.add(trans_str, "\n")
- if !lang_supported
- Builtins.y2milestone("Avoiding providing bootloader menu translations")
- trans_str = ""
- end
+ trans_file = tmpdir + "/boot_translations"
+ # do not create translation of section (bnc#875819)
+ trans_str = ""
SCR.Write(path(".target.string"), trans_file, trans_str)
lang_params = "en_EN en" if lang_params == ""
@@ -522,9 +228,6 @@
end
publish :variable => :enable_sound_signals, :type => "boolean"
- publish :function => :ReplaceRegexMatch, :type => "string (string, string, string)"
- publish :function => :translateSectionTitle, :type => "string (string, string)"
- publish :function => :getTranslationsToDiacritics, :type => "map (string)"
publish :function => :ReadStatusAcousticSignal, :type => "void ()"
publish :function => :UpdateGfxMenuContents, :type => "boolean (string)"
publish :function => :Update, :type => "boolean ()"
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org