openSUSE Commits
Threads by month
- ----- 2024 -----
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
June 2014
- 1 participants
- 1147 discussions
Hello community,
here is the log from the commit of package yast2-bootloader for openSUSE:Factory checked in at 2014-06-01 18:57:09
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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-05-17 22:02:04.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-bootloader.new/yast2-bootloader.changes 2014-06-01 18:57:11.000000000 +0200
@@ -1,0 +2,63 @@
+Thu May 29 13:47:40 UTC 2014 - jreidinger(a)suse.com
+
+- Fix crash in upgrade from SLE11
+- 3.1.46
+
+-------------------------------------------------------------------
+Wed May 28 14:19:36 UTC 2014 - jreidinger(a)suse.com
+
+- Remove check for iscsi boot partition (bnc#880328)
+- 3.1.45
+
+-------------------------------------------------------------------
+Wed May 28 13:23:19 UTC 2014 - jreidinger(a)suse.com
+
+- fix crash in summary page of installation for grub2 (bnc#880324)
+- 3.1.44
+
+-------------------------------------------------------------------
+Tue May 27 11:43:45 UTC 2014 - jreidinger(a)suse.com
+
+- fix crash in summary page of installation
+- 3.1.43
+
+-------------------------------------------------------------------
+Tue May 27 11:06:47 UTC 2014 - mchang(a)suse.com
+
+- reinstall bootloader if the settings requires it
+- 3.1.42
+
+-------------------------------------------------------------------
+Tue May 27 07:48:09 UTC 2014 - jreidinger(a)suse.com
+
+- Fix detection if bootloader installation failed (bnc#879883)
+- 3.1.41
+
+-------------------------------------------------------------------
+Mon May 26 15:31:16 UTC 2014 - jreidinger(a)suse.com
+
+- add support to set Protective MBR and use reasonable proposal
+ (bnc#872054)
+- 3.1.40
+
+-------------------------------------------------------------------
+Fri May 23 14:32:07 UTC 2014 - jreidinger(a)suse.com
+
+- Installation Summary: do not allow change location for grub2
+ on ppc and s390 (bnc#879107)
+- 3.1.39
+
+-------------------------------------------------------------------
+Thu May 22 13:06:25 UTC 2014 - jreidinger(a)suse.com
+
+- Report if grub2-install failed so user see quickly, that he
+ cannot boot(bnc#878664)
+- 3.1.38
+
+-------------------------------------------------------------------
+Fri May 16 17:10:26 CEST 2014 - snwint(a)suse.de
+
+- get rid of grub in loader type selection
+- 3.1.37
+
+-------------------------------------------------------------------
Old:
----
yast2-bootloader-3.1.36.tar.bz2
New:
----
yast2-bootloader-3.1.46.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-bootloader.spec ++++++
--- /var/tmp/diff_new_pack.op7PhW/_old 2014-06-01 18:57:13.000000000 +0200
+++ /var/tmp/diff_new_pack.op7PhW/_new 2014-06-01 18:57:13.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-bootloader
-Version: 3.1.36
+Version: 3.1.46
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
++++++ yast2-bootloader-3.1.36.tar.bz2 -> yast2-bootloader-3.1.46.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.36/package/yast2-bootloader.changes new/yast2-bootloader-3.1.46/package/yast2-bootloader.changes
--- old/yast2-bootloader-3.1.36/package/yast2-bootloader.changes 2014-05-16 16:13:47.000000000 +0200
+++ new/yast2-bootloader-3.1.46/package/yast2-bootloader.changes 2014-05-29 16:18:44.000000000 +0200
@@ -1,4 +1,67 @@
-------------------------------------------------------------------
+Thu May 29 13:47:40 UTC 2014 - jreidinger(a)suse.com
+
+- Fix crash in upgrade from SLE11
+- 3.1.46
+
+-------------------------------------------------------------------
+Wed May 28 14:19:36 UTC 2014 - jreidinger(a)suse.com
+
+- Remove check for iscsi boot partition (bnc#880328)
+- 3.1.45
+
+-------------------------------------------------------------------
+Wed May 28 13:23:19 UTC 2014 - jreidinger(a)suse.com
+
+- fix crash in summary page of installation for grub2 (bnc#880324)
+- 3.1.44
+
+-------------------------------------------------------------------
+Tue May 27 11:43:45 UTC 2014 - jreidinger(a)suse.com
+
+- fix crash in summary page of installation
+- 3.1.43
+
+-------------------------------------------------------------------
+Tue May 27 11:06:47 UTC 2014 - mchang(a)suse.com
+
+- reinstall bootloader if the settings requires it
+- 3.1.42
+
+-------------------------------------------------------------------
+Tue May 27 07:48:09 UTC 2014 - jreidinger(a)suse.com
+
+- Fix detection if bootloader installation failed (bnc#879883)
+- 3.1.41
+
+-------------------------------------------------------------------
+Mon May 26 15:31:16 UTC 2014 - jreidinger(a)suse.com
+
+- add support to set Protective MBR and use reasonable proposal
+ (bnc#872054)
+- 3.1.40
+
+-------------------------------------------------------------------
+Fri May 23 14:32:07 UTC 2014 - jreidinger(a)suse.com
+
+- Installation Summary: do not allow change location for grub2
+ on ppc and s390 (bnc#879107)
+- 3.1.39
+
+-------------------------------------------------------------------
+Thu May 22 13:06:25 UTC 2014 - jreidinger(a)suse.com
+
+- Report if grub2-install failed so user see quickly, that he
+ cannot boot(bnc#878664)
+- 3.1.38
+
+-------------------------------------------------------------------
+Fri May 16 17:10:26 CEST 2014 - snwint(a)suse.de
+
+- get rid of grub in loader type selection
+- 3.1.37
+
+-------------------------------------------------------------------
Fri May 16 13:44:48 UTC 2014 - jreidinger(a)suse.com
- fix progress report to not show 100% and waiting to write
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.36/package/yast2-bootloader.spec new/yast2-bootloader-3.1.46/package/yast2-bootloader.spec
--- old/yast2-bootloader-3.1.36/package/yast2-bootloader.spec 2014-05-16 16:13:47.000000000 +0200
+++ new/yast2-bootloader-3.1.46/package/yast2-bootloader.spec 2014-05-29 16:18:44.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-bootloader
-Version: 3.1.36
+Version: 3.1.46
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.36/src/include/bootloader/grub2/dialogs.rb new/yast2-bootloader-3.1.46/src/include/bootloader/grub2/dialogs.rb
--- old/yast2-bootloader-3.1.36/src/include/bootloader/grub2/dialogs.rb 2014-05-16 16:13:47.000000000 +0200
+++ new/yast2-bootloader-3.1.46/src/include/bootloader/grub2/dialogs.rb 2014-05-29 16:18:44.000000000 +0200
@@ -31,6 +31,8 @@
Yast.import "Stage"
Yast.include include_target, "bootloader/grub2/options.rb"
+ # some utils from misc are needed here
+ Yast.include include_target, "bootloader/grub2/misc.rb"
Yast.include include_target, "bootloader/grub/options.rb"
@@ -43,9 +45,11 @@
lt = BootCommon.getLoaderType(false)
legacy_intel = (Arch.x86_64 || Arch.i386) && lt != "grub2-efi"
+ pmbr_available = lt == "grub2-efi" || (legacy_intel && gpt_boot_disk?)
widget_names = ["distributor", "loader_type", "loader_location"]
widget_names << "activate" << "generic_mbr" if legacy_intel
widget_names << "inst_details" if legacy_intel || Arch.ppc
+ widget_names << "pmbr" if pmbr_available
{
"id" => "boot_code_tab",
@@ -59,6 +63,7 @@
MarginBox(1, 0.5, "distributor"),
MarginBox(1, 0.5, Left("activate")),
MarginBox(1, 0.5, Left("generic_mbr")),
+ MarginBox(1, 0.5, Left("pmbr")),
MarginBox(1, 0.5, Left("inst_details")),
VStretch()
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.36/src/include/bootloader/grub2/helps.rb new/yast2-bootloader-3.1.46/src/include/bootloader/grub2/helps.rb
--- old/yast2-bootloader-3.1.36/src/include/bootloader/grub2/helps.rb 2014-05-16 16:13:47.000000000 +0200
+++ new/yast2-bootloader-3.1.46/src/include/bootloader/grub2/helps.rb 2014-05-29 16:18:44.000000000 +0200
@@ -31,6 +31,9 @@
),
"os_prober" => _(
"<p><b>Probe Foreign OS</b> by means of os-prober for multiboot with other foreign distribution </p>"
+ ),
+ "pmbr" => _(
+ "<p><b>Protective MBR flag</b> is expert only settings, that is needed only on exotic hardware. For details see Protective MBR in GPT disks. Do not touch if you are not sure.</p>"
)
}
@@ -38,7 +41,8 @@
"append" => _("O&ptional Kernel Command Line Parameter"),
"vgamode" => _("&Vga Mode"),
"append_failsafe" => _("&Failsafe Kernel Command Line Parameter"),
- "os_prober" => _("Probe Foreign OS")
+ "os_prober" => _("Probe Foreign OS"),
+ "pmbr" => _("Protective MBR flag")
}
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.36/src/include/bootloader/grub2/misc.rb new/yast2-bootloader-3.1.46/src/include/bootloader/grub2/misc.rb
--- old/yast2-bootloader-3.1.36/src/include/bootloader/grub2/misc.rb 2014-05-16 16:13:47.000000000 +0200
+++ new/yast2-bootloader-3.1.46/src/include/bootloader/grub2/misc.rb 2014-05-29 16:18:44.000000000 +0200
@@ -733,9 +733,20 @@
SetBootloaderDevice(selected_location)
end
+ # for GPT remove protective MBR flag otherwise some systems won't boot
+ if gpt_boot_disk?
+ BootCommon.pmbr_action = :remove
+ end
+
selected_location
end
+ def gpt_boot_disk?
+ targets = BootCommon.GetBootloaderDevices
+ boot_discs = targets.map {|d| Storage.GetDisk(Storage.GetTargetMap, d)}
+ boot_discs.any? {|d| d["label"] == "gpt" }
+ end
+
# Find extended partition device (if it exists) on the same device where the
# BootPartitionDevice is located
#
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.36/src/include/bootloader/grub2/options.rb new/yast2-bootloader-3.1.46/src/include/bootloader/grub2/options.rb
--- old/yast2-bootloader-3.1.36/src/include/bootloader/grub2/options.rb 2014-05-16 16:13:47.000000000 +0200
+++ new/yast2-bootloader-3.1.46/src/include/bootloader/grub2/options.rb 2014-05-29 16:18:44.000000000 +0200
@@ -94,6 +94,32 @@
nil
end
+ # Init function of widget
+ # @param [String] widget any id of the widget
+ def PMBRInit(widget)
+ items = [
+ # TRANSLATORS: set flag on disk
+ Item(Id(:add), _("set")),
+ # TRANSLATORS: remove flag from disk
+ Item(Id(:remove), _("remove")),
+ # TRANSLATORS: do not change flag on disk
+ Item(Id(:nothing), _("do not change"))
+ ]
+ UI.ChangeWidget(Id(widget), :Items, items)
+ value = BootCommon.pmbr_action || :nothing
+ UI.ChangeWidget(Id(widget), :Value, value)
+ end
+
+ # Store function of a pmbr
+ # @param [String] widget any widget key
+ # @param [Hash] event map event description of event that occured
+ def StorePMBR(widget, event)
+ value = UI.QueryWidget(Id(widget), :Value)
+ value = nil if value == :nothing
+
+ BootCommon.pmbr_action = value
+ end
+
# Init function for console
# @param [String] widget
def ConsoleInit(widget)
@@ -355,6 +381,14 @@
"store" => fun_ref(method(:StoreGlobalStr), "void (string, map)"),
"help" => Ops.get(@grub2_help_messages, "vgamode", "")
},
+ "pmbr" => {
+ "widget" => :combobox,
+ "label" => @grub2_descriptions["pmbr"],
+ "opt" => [],
+ "init" => fun_ref(method(:PMBRInit), "void (string)"),
+ "store" => fun_ref(method(:StorePMBR), "void (string, map)"),
+ "help" => @grub2_help_messages["pmbr"]
+ },
"default" => {
"widget" => :combobox,
"label" => Ops.get(@grub_descriptions, "default", "default"),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.36/src/include/bootloader/routines/lib_iface.rb new/yast2-bootloader-3.1.46/src/include/bootloader/routines/lib_iface.rb
--- old/yast2-bootloader-3.1.36/src/include/bootloader/routines/lib_iface.rb 2014-05-16 16:13:47.000000000 +0200
+++ new/yast2-bootloader-3.1.46/src/include/bootloader/routines/lib_iface.rb 2014-05-29 16:18:44.000000000 +0200
@@ -346,9 +346,14 @@
# Initialize the boot loader (eg. modify firmware, depending on architecture)
# @return [Boolean] true on success
def InitializeBootloader
- Builtins.y2milestone("Initializing bootloader")
+ ret_data = TmpYAMLFile.new
+ run_pbl_yaml "#{ret_data.path}=InitializeBootloader()"
+ ret = ret_data.data
+ Builtins.y2milestone("Initializing bootloader ret: #{ret.inspect}")
- run_pbl_yaml "InitializeBootloader()"
+ # perl have slightly different evaluation of boolean, so lets convert it
+ ret = ![false, nil, 0, ""].include?(ret)
+ return ret
end
# Get contents of files from the library cache
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.36/src/lib/bootloader/grub2base.rb new/yast2-bootloader-3.1.46/src/lib/bootloader/grub2base.rb
--- old/yast2-bootloader-3.1.36/src/lib/bootloader/grub2base.rb 2014-05-16 16:13:47.000000000 +0200
+++ new/yast2-bootloader-3.1.46/src/lib/bootloader/grub2base.rb 2014-05-29 16:18:44.000000000 +0200
@@ -36,6 +36,21 @@
# general functions
+
+ # set pmbr flags on boot disks
+ def pmbr_setup(action, *devices)
+ action_parted = case action
+ when :add then "on"
+ when :remove then "off"
+ else raise "invalid action #{action}"
+ end
+ devices.each do |dev|
+ res = SCR.Execute(path(".target.bash_output"),
+ "parted '#{dev}' disk_set pmbr_boot #{action_parted}")
+ Builtins.y2milestone("parted disk_set pmbr: #{res}")
+ end
+ end
+
# Propose global options of bootloader
def StandardGlobals
{
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.36/src/modules/BootCommon.rb new/yast2-bootloader-3.1.46/src/modules/BootCommon.rb
--- old/yast2-bootloader-3.1.36/src/modules/BootCommon.rb 2014-05-16 16:13:47.000000000 +0200
+++ new/yast2-bootloader-3.1.46/src/modules/BootCommon.rb 2014-05-29 16:18:44.000000000 +0200
@@ -108,6 +108,10 @@
# Activate bootloader partition during installation?
@activate = false
+ # action to do with pbmr flag on boot disk
+ # values are :add, :remove or nil, means do nothing
+ @pmbr_action = nil
+
# Kernel parameters at previous detection
@kernelCmdLine = ""
@@ -961,8 +965,7 @@
]
end
ret = [
- getLoaderType(false),
- Convert.to_string(SCR.Read(path(".probe.boot_arch")))
+ getLoaderType(false)
]
if Arch.i386 || Arch.x86_64
ret = Convert.convert(
@@ -1036,6 +1039,7 @@
publish :variable => :mbrDisk, :type => "string"
publish :variable => :backup_mbr, :type => "boolean"
publish :variable => :activate, :type => "boolean"
+ publish :variable => :pmbr_action, :type => "symbol"
publish :variable => :kernelCmdLine, :type => "string"
publish :variable => :changed, :type => "boolean"
publish :variable => :del_parts, :type => "list <string>"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.36/src/modules/BootGRUB2.rb new/yast2-bootloader-3.1.46/src/modules/BootGRUB2.rb
--- old/yast2-bootloader-3.1.36/src/modules/BootGRUB2.rb 2014-05-16 16:13:47.000000000 +0200
+++ new/yast2-bootloader-3.1.46/src/modules/BootGRUB2.rb 2014-05-29 16:18:44.000000000 +0200
@@ -84,6 +84,7 @@
end
end
+ @orig_globals ||= deep_copy(BootCommon.globals)
ret
end
@@ -92,6 +93,16 @@
def Write
ret = BootCommon.UpdateBootloader
+ if @orig_globals
+ location = ["boot_mbr", "boot_boot", "boot_root", "boot_extended", "boot_custom", "boot_custom", "activate", "generic_mbr"]
+ location.each do |i|
+ BootCommon.location_changed = true if @orig_globals[i] != BootCommon.globals[i]
+ end
+ else
+ # there is no original, so we do not read config, but propose it
+ BootCommon.location_changed = true
+ end
+
#TODO: InstallingToFloppy ..
if BootCommon.location_changed
# bnc #461613 - Unable to boot after making changes to boot loader
@@ -106,6 +117,17 @@
ret = ret && BootCommon.PostUpdateMBR
end
+ # something with PMBR needed
+ if BootCommon.pmbr_action
+ boot_devices = BootCommon.GetBootloaderDevices
+ boot_discs = targets.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"] }
+
+ pmbr_setup(BootCommon.pmbr_action, *gpt_disks_devices)
+ end
+
ret
end
@@ -218,54 +240,43 @@
]
locations = []
- if Ops.get(BootCommon.globals, "boot_boot", "") == "true"
- locations = Builtins.add(
- locations,
- Ops.add(BootStorage.BootPartitionDevice, _(" (\"/boot\")"))
- )
+ if BootCommon.globals["boot_boot"] == "true"
+ locations << BootStorage.BootPartitionDevice + " (\"/boot\")"
end
- if Ops.get(BootCommon.globals, "boot_extended", "") == "true"
- locations = Builtins.add(
- locations,
- Ops.add(BootStorage.ExtendedPartitionDevice, _(" (extended)"))
- )
+ if BootCommon.globals["boot_extended"] == "true"
+ # TRANSLATORS: extended is here for extended partition. Keep translation short.
+ locations << BootStorage.ExtendedPartitionDevice + _(" (extended)")
end
- if Ops.get(BootCommon.globals, "boot_root", "") == "true"
- locations = Builtins.add(
- locations,
- Ops.add(BootStorage.RootPartitionDevice, _(" (\"/\")"))
- )
+ if BootCommon.globals["boot_root"] == "true"
+ locations << BootStorage.RootPartitionDevice + " (\"/\")"
end
- if Ops.get(BootCommon.globals, "boot_mbr", "") == "true"
- locations = Builtins.add(
- locations,
- Ops.add(BootCommon.mbrDisk, _(" (MBR)"))
- )
+ if BootCommon.globals["boot_mbr"] == "true"
+ # TRANSLATORS: MBR is acronym for Master Boot Record, if nothing locally specific
+ # is used in your language, then keep it as it is.
+ locations << BootCommon.mbrDisk + _(" (MBR)")
end
- if Builtins.haskey(BootCommon.globals, "boot_custom")
- locations = Builtins.add(
- locations,
- Ops.get(BootCommon.globals, "boot_custom", "")
- )
+ if BootCommon.globals["boot_custom"] && !BootCommon.globals["boot_custom"].empty?
+ locations << BootCommon.globals["boot_custom"]
end
- if Ops.greater_than(Builtins.size(locations), 0)
- # FIXME: should we translate all devices to names and add MBR suffixes?
- result = Builtins.add(
- result,
- Builtins.sformat(
+ if !locations.empty?
+ result << Builtins.sformat(
_("Status Location: %1"),
- Builtins.mergestring(locations, ", ")
+ locations.join(", ")
)
- )
end
# it is necessary different summary for autoyast and installation
# other mode than autoyast on running system
- result = Builtins.add(result, urlLocationSummary) if !Mode.config
+ # both ppc and s390 have special devices for stage1 so it do not make sense
+ # allow change of location to MBR or boot partition (bnc#879107)
+ if !Arch.ppc && !Arch.s390 && !Mode.config
+ result << urlLocationSummary
+ end
order_sum = BootCommon.DiskOrderSummary
- result = Builtins.add(result, order_sum) if order_sum != nil
- deep_copy(result)
+ result << order_sum if order_sum
+
+ return result
end
def Dialogs
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.36/src/modules/BootGRUB2EFI.rb new/yast2-bootloader-3.1.46/src/modules/BootGRUB2EFI.rb
--- old/yast2-bootloader-3.1.36/src/modules/BootGRUB2EFI.rb 2014-05-16 16:13:47.000000000 +0200
+++ new/yast2-bootloader-3.1.46/src/modules/BootGRUB2EFI.rb 2014-05-29 16:18:44.000000000 +0200
@@ -41,6 +41,7 @@
BootCommon.InitializeLibrary(reread, "grub2-efi")
BootCommon.ReadFiles(avoid_reading_device_map) if reread
BootCommon.Read(false, avoid_reading_device_map)
+ @orig_globals ||= deep_copy(BootCommon.globals)
end
# Write bootloader settings to disk
@@ -48,6 +49,7 @@
def Write
ret = BootCommon.UpdateBootloader
+ BootCommon.location_changed = true if @orig_globals["distributor"] != BootCommon.globals["distributor"]
if BootCommon.location_changed
grub_ret = BootCommon.InitializeBootloader
grub_ret = false if grub_ret == nil
@@ -56,9 +58,25 @@
ret = ret && grub_ret
end
+ # something with PMBR needed
+ if BootCommon.pmbr_action
+ efi_disk = Storage.GetEntryForMountpoint("/boot/efi")["device"]
+ efi_disk ||= Storage.GetEntryForMountpoint("/boot")["device"]
+ efi_disk ||= Storage.GetEntryForMountpoint("/")["device"]
+
+ pmbr_setup(BootCommon.pmbr_action, efi_disk)
+ end
+
ret
end
+ def Propose
+ super
+
+ # for UEFI always set PMBR flag on disk (bnc#872054)
+ BootCommon.pmbr_action = :add if !BootCommon.was_proposed || Mode.autoinst
+ end
+
# Display bootloader summary
# @return a list of summary lines
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.36/src/modules/BootSupportCheck.rb new/yast2-bootloader-3.1.46/src/modules/BootSupportCheck.rb
--- old/yast2-bootloader-3.1.36/src/modules/BootSupportCheck.rb 2014-05-16 16:13:47.000000000 +0200
+++ new/yast2-bootloader-3.1.46/src/modules/BootSupportCheck.rb 2014-05-29 16:18:44.000000000 +0200
@@ -143,38 +143,13 @@
def check_BootDevice
result = true
- boot_device = ""
-
devices = Storage.GetTargetMap
boot_device = BootCommon.getBootPartition
- boot_disk = BootCommon.getBootDisk
- # if (BootStorage::BootPartitionDevice == BootStorage::RootPartitionDevice)
- # AddNewProblem (_("Doesn't exist separete /boot partition"));
-
found_boot = false
# check if boot device is on raid0
Builtins.foreach(devices) do |k, v|
- # check if boot disk is iscsi disk
- # bnc#393928: Installing root system on iscsi disk makes the system useless
- if k == boot_disk
- # if "iscsi" is true
- if Ops.get_boolean(v, "iscsi", false)
- AddNewProblem(
- Builtins.sformat(
- _("The boot device is on iSCSI disk: %1. System may not boot."),
- k
- )
- )
- Builtins.y2error(
- "The boot partition: %1 is on iscsi disk: %2",
- boot_device,
- k
- )
- result = false
- end
- end
Builtins.foreach(Ops.get_list(v, "partitions", [])) do |p|
if Ops.get_string(p, "device", "") == boot_device
if Ops.get_string(p, "raid_type", "") != "raid1" &&
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package wayland for openSUSE:Factory checked in at 2014-06-01 18:57:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/wayland (Old)
and /work/SRC/openSUSE:Factory/.wayland.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "wayland"
Changes:
--------
--- /work/SRC/openSUSE:Factory/wayland/wayland.changes 2014-02-01 09:40:39.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.wayland.new/wayland.changes 2014-06-01 18:57:09.000000000 +0200
@@ -1,0 +2,8 @@
+Wed May 21 10:19:01 UTC 2014 - jengelh(a)inai.de
+
+- Update to new upstream release 1.5.0
+* Use an internal event queue for wl_display events. This allows
+ the client library to dispatch delete_id and error events
+ immediately, even if the default queue is not dispatched.
+
+-------------------------------------------------------------------
Old:
----
wayland-1.4.0.tar.xz
New:
----
wayland-1.5.0.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ wayland.spec ++++++
--- /var/tmp/diff_new_pack.VpBjJp/_old 2014-06-01 18:57:11.000000000 +0200
+++ /var/tmp/diff_new_pack.VpBjJp/_new 2014-06-01 18:57:11.000000000 +0200
@@ -18,7 +18,7 @@
%define lname libwayland0
Name: wayland
-Version: 1.4.0
+Version: 1.5.0
Release: 0
Summary: Wayland Compositor Infrastructure
License: HPND
@@ -111,8 +111,8 @@
make %{?_smp_mflags} V=1
%install
-make DESTDIR=%buildroot install %{?_smp_mflags}
-find %buildroot -type f -name "*.la" -delete -print
+make DESTDIR="%buildroot" install %{?_smp_mflags}
+find "%buildroot" -type f -name "*.la" -delete -print
%fdupes %buildroot/%_prefix
%check
@@ -124,15 +124,10 @@
%endif
%post -n libwayland-client0 -p /sbin/ldconfig
-
%postun -n libwayland-client0 -p /sbin/ldconfig
-
%post -n libwayland-cursor0 -p /sbin/ldconfig
-
%postun -n libwayland-cursor0 -p /sbin/ldconfig
-
%post -n libwayland-server0 -p /sbin/ldconfig
-
%postun -n libwayland-server0 -p /sbin/ldconfig
%files -n libwayland-client0
@@ -154,7 +149,7 @@
%_libdir/libwayland-*.so
%_libdir/pkgconfig/wayland-*.pc
%_datadir/aclocal/
-%_datadir/pkgconfig/wayland-*.pc
+#%_datadir/pkgconfig/wayland-*.pc
%_datadir/wayland/
%_mandir/man3/wl_*.3*
++++++ wayland-1.4.0.tar.xz -> wayland-1.5.0.tar.xz ++++++
++++ 15548 lines of diff (skipped)
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package libdlm for openSUSE:Factory checked in at 2014-06-01 18:57:07
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libdlm (Old)
and /work/SRC/openSUSE:Factory/.libdlm.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libdlm"
Changes:
--------
--- /work/SRC/openSUSE:Factory/libdlm/libdlm.changes 2014-05-22 09:04:25.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.libdlm.new/libdlm.changes 2014-06-01 18:57:08.000000000 +0200
@@ -1,0 +2,5 @@
+Wed May 21 11:34:53 UTC 2014 - jsegitz(a)novell.com
+
+- added necessary macros for systemd files
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libdlm.spec ++++++
--- /var/tmp/diff_new_pack.jaGyge/_old 2014-06-01 18:57:09.000000000 +0200
+++ /var/tmp/diff_new_pack.jaGyge/_new 2014-06-01 18:57:09.000000000 +0200
@@ -103,6 +103,12 @@
%preun
%service_del_preun dlm.service
+%pre
+%service_add_pre dlm.service
+
+%postun
+%service_del_postun dlm.service
+
%clean
###########################################################
make clean
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package dmraid for openSUSE:Factory checked in at 2014-06-01 18:57:05
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/dmraid (Old)
and /work/SRC/openSUSE:Factory/.dmraid.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "dmraid"
Changes:
--------
--- /work/SRC/openSUSE:Factory/dmraid/dmraid.changes 2013-09-26 07:03:54.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.dmraid.new/dmraid.changes 2014-06-01 18:57:06.000000000 +0200
@@ -1,0 +2,5 @@
+Wed May 21 09:40:42 UTC 2014 - jsegitz(a)novell.com
+
+- added necessary macros for systemd files
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ dmraid.spec ++++++
--- /var/tmp/diff_new_pack.OP6ryw/_old 2014-06-01 18:57:07.000000000 +0200
+++ /var/tmp/diff_new_pack.OP6ryw/_new 2014-06-01 18:57:07.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package dmraid
#
-# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -115,6 +115,9 @@
install -d %{buildroot}%{_tmpfilesdir}
echo 'd /run/lock/dmraid 0700 root root -' > %{buildroot}%{_tmpfilesdir}/dmraid.conf
+%pre
+%service_add_pre dmraid-activation.service
+
%preun
%service_del_preun dmraid-activation.service
@@ -126,6 +129,7 @@
%postun
/sbin/ldconfig
+%service_del_postun dmraid-activation.service
[ -x /sbin/mkinitrd_setup ] && mkinitrd_setup
%{insserv_cleanup}
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package dhcp for openSUSE:Factory checked in at 2014-06-01 18:57:03
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/dhcp (Old)
and /work/SRC/openSUSE:Factory/.dhcp.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "dhcp"
Changes:
--------
--- /work/SRC/openSUSE:Factory/dhcp/dhcp.changes 2014-05-14 10:50:27.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.dhcp.new/dhcp.changes 2014-06-01 18:57:04.000000000 +0200
@@ -1,0 +2,5 @@
+Wed May 21 08:34:07 UTC 2014 - jsegitz(a)novell.com
+
+- added necessary macros for systemd files
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ dhcp.spec ++++++
--- /var/tmp/diff_new_pack.TTmFcd/_old 2014-06-01 18:57:06.000000000 +0200
+++ /var/tmp/diff_new_pack.TTmFcd/_new 2014-06-01 18:57:06.000000000 +0200
@@ -474,6 +474,10 @@
%pre server
/usr/sbin/useradd -r -g nogroup -s /bin/false -c "DHCP server daemon" -d /var/lib/dhcp dhcpd 2> /dev/null ||:
+%if %{with systemd}
+%service_add_pre dhcpd.service
+%service_add_pre dhcpd6.service
+%endif
%post server
%if %{with systemd}
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package dante for openSUSE:Factory checked in at 2014-06-01 18:57:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/dante (Old)
and /work/SRC/openSUSE:Factory/.dante.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "dante"
Changes:
--------
--- /work/SRC/openSUSE:Factory/dante/dante.changes 2014-02-02 07:33:01.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.dante.new/dante.changes 2014-06-01 18:57:03.000000000 +0200
@@ -1,0 +2,5 @@
+Tue May 20 12:52:20 UTC 2014 - jsegitz(a)novell.com
+
+- Added %pre section to call %service_add_pre
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ dante.spec ++++++
--- /var/tmp/diff_new_pack.e1Piil/_old 2014-06-01 18:57:04.000000000 +0200
+++ /var/tmp/diff_new_pack.e1Piil/_new 2014-06-01 18:57:04.000000000 +0200
@@ -134,6 +134,9 @@
%__rm Makefile* SPECS/Makefile*
+%pre -n dante-server
+%service_add_pre sockd.service
+
%preun -n dante-server
%service_del_preun sockd.service
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package kiwi for openSUSE:Factory checked in at 2014-06-01 18:56:03
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kiwi (Old)
and /work/SRC/openSUSE:Factory/.kiwi.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kiwi"
Changes:
--------
--- /work/SRC/openSUSE:Factory/kiwi/kiwi.changes 2014-05-27 07:09:46.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.kiwi.new/kiwi.changes 2014-06-01 18:56:11.000000000 +0200
@@ -1,0 +2,121 @@
+Fri May 30 14:06:47 CEST 2014 - ms(a)suse.de
+
+- v5.06.104 released
+
+-------------------------------------------------------------------
+Fri May 30 11:57:08 CEST 2014 - ms(a)suse.de
+
+- make sure KIWISatSolver correctly quotes repo alias names
+ in a way that the shell can still find files with e.g spaces
+
+-------------------------------------------------------------------
+Fri May 30 11:38:49 CEST 2014 - ms(a)suse.de
+
+- make sure kiwi scripts runs in C locale (bnc #880674)
+
+-------------------------------------------------------------------
+Wed May 28 12:12:16 CEST 2014 - ms(a)suse.de
+
+- Follow up update jenkins prepare worker script
+ + make sure validation runtime checks find all tools on the host
+
+-------------------------------------------------------------------
+Wed May 28 11:11:22 CEST 2014 - ms(a)suse.de
+
+- Update jenkins prepare worker script
+ + make sure validation runtime checks find all tools on the host
+
+-------------------------------------------------------------------
+Tue May 27 21:36:13 CEST 2014 - ms(a)suse.de
+
+- v5.06.103 released
+
+-------------------------------------------------------------------
+Tue May 27 21:35:27 CEST 2014 - ms(a)suse.de
+
+- Fixed creation of versioned vagrant box json file
+
+-------------------------------------------------------------------
+Tue May 27 20:37:54 CEST 2014 - ms(a)suse.de
+
+- v5.06.102 released
+
+-------------------------------------------------------------------
+Tue May 27 18:09:22 CEST 2014 - ms(a)suse.de
+
+- Update suse-13.1/suse-vagrant-box example
+ + build for two providers, libvirt and virtualbox
+
+-------------------------------------------------------------------
+Tue May 27 18:08:19 CEST 2014 - ms(a)suse.de
+
+- Allow to specify multiple vagrantconfig sections
+ + one can build boxes for different providers in one build
+ + report missing machine configuration only when it makes sense
+
+-------------------------------------------------------------------
+Tue May 27 14:49:15 CEST 2014 - ms(a)suse.de
+
+- v5.06.101 released
+
+-------------------------------------------------------------------
+Tue May 27 14:45:08 CEST 2014 - ms(a)suse.de
+
+- Cleanup examples and templates
+ + remove obsolete openSUSE 12.1 examples
+ + fix package lists and type setup according to result
+ of preparation runtime checks
+
+-------------------------------------------------------------------
+Tue May 27 14:43:43 CEST 2014 - ms(a)suse.de
+
+- Update Makefile
+ + don't use shell backticks, instead use make's shell command
+ + limit scope of 'make valid' target to the present architecture
+
+-------------------------------------------------------------------
+Tue May 27 14:42:52 CEST 2014 - ms(a)suse.de
+
+- Extend scope of kiwi --check-config
+ Additionally call the prepare runtime checks after validation
+
+-------------------------------------------------------------------
+Tue May 27 12:34:10 CEST 2014 - ms(a)suse.de
+
+- Added runtime check __checkSelectedBootLoaderIncluded
+ Check if the selected bootloader will also be installed into the image
+
+-------------------------------------------------------------------
+Tue May 27 12:26:48 CEST 2014 - ms(a)suse.de
+
+- Fixed typo in suse-13.1/suse-vagrant-box definition
+ * wrong indention
+
+-------------------------------------------------------------------
+Tue May 27 10:38:58 CEST 2014 - ms(a)suse.de
+
+- v5.06.100 released
+
+-------------------------------------------------------------------
+Tue May 27 10:19:22 CEST 2014 - ms(a)suse.de
+
+- Fixed search path for *.kiwi control files in getControlFile
+
+-------------------------------------------------------------------
+Mon May 26 21:46:32 CEST 2014 - ms(a)suse.de
+
+- DB: rebuild documentation
+
+-------------------------------------------------------------------
+Mon May 26 21:37:24 CEST 2014 - ms(a)suse.de
+
+- DB: update documentation, remove obsolete kiwistderr information
+
+-------------------------------------------------------------------
+Mon May 26 16:10:29 CEST 2014 - ms(a)suse.de
+
+- Removed obsolete setup of kiwistderr cmdline value.
+ The kiwi boot code does not handle this information since
+ quite some time
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ kiwi.spec ++++++
--- /var/tmp/diff_new_pack.EOGCgN/_old 2014-06-01 18:56:13.000000000 +0200
+++ /var/tmp/diff_new_pack.EOGCgN/_new 2014-06-01 18:56:13.000000000 +0200
@@ -26,7 +26,7 @@
Group: System/Management
Url: http://github.com/openSUSE/kiwi
Name: kiwi
-Version: 5.06.99
+Version: 5.06.104
Release: 0
Provides: kiwi-schema = 6.1
# requirements to build packages
++++++ kiwi-docu.tar.bz2 ++++++
/work/SRC/openSUSE:Factory/kiwi/kiwi-docu.tar.bz2 /work/SRC/openSUSE:Factory/.kiwi.new/kiwi-docu.tar.bz2 differ: char 11, line 1
++++++ kiwi-repo.tar.bz2 ++++++
++++++ kiwi.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/.revision new/kiwi/.revision
--- old/kiwi/.revision 2014-05-23 14:09:40.000000000 +0200
+++ new/kiwi/.revision 2014-05-27 14:49:56.000000000 +0200
@@ -1 +1 @@
-30fc38c40b9501aa7d5d8af7ed5cf09e28b52bfb
+8f5fffd0d15c249cfdd0118f69764a60534c5155
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/Makefile new/kiwi/Makefile
--- old/kiwi/Makefile 2014-05-23 14:09:39.000000000 +0200
+++ new/kiwi/Makefile 2014-05-27 14:49:56.000000000 +0200
@@ -4,7 +4,7 @@
#
# Makefile for OpenSuSE - KIWI Image System
# ---
-arch = `uname -m | grep -q ^i[3-6] && echo ix86 || uname -m`
+arch := $(shell uname -m | grep -q ^i[3-6] && echo ix86 || uname -m)
buildroot = /
syslinux = /usr/share/syslinux
bindlib = lib
@@ -118,7 +118,7 @@
#============================================
# kiwi manual pages
#--------------------------------------------
- for i in `ls -1 ./doc/*.1`;do \
+ for i in $(shell ls -1 ./doc/*.1);do \
install -m 644 $$i ${MANVZ} ;\
done
@@ -138,7 +138,7 @@
#--------------------------------------------
install -m 755 ./kiwi.pl ${KIWIBINVZ}/kiwi
install -m 644 ./xsl/* ${KIWIXSLVZ}
- for i in `find modules -type f | grep -v -E '\.test'`;do \
+ for i in $(shell find modules -type f | grep -v -E '\.test');do \
install -m 644 $$i ${KIWIMODVZ} ;\
done
@@ -146,7 +146,7 @@
# Install KIWI metadata files
#--------------------------------------------
tar -C metadata -czf ${KIWIMETAVZ}/KIWIAnalyse.tgz d3
- for i in `find metadata -type f | grep -v -E 'd3'`;do \
+ for i in $(shell find metadata -type f | grep -v -E 'd3');do \
install -m 644 $$i ${KIWIMETAVZ} ;\
done
@@ -198,7 +198,7 @@
#============================================
# Validate all XML descriptions...
#--------------------------------------------
- for i in `find -name config.xml | grep -v tests`;do \
+ for i in $(shell find doc template/$(arch)/ system/boot/$(arch)/ -name config.xml);do \
test -f xsl/master.xsl && \
xsltproc -o $$i.new xsl/master.xsl $$i && mv $$i.new $$i;\
echo $$i;\
@@ -213,7 +213,7 @@
if test ! -d tests/.timestamps; then \
mkdir tests/.timestamps; \
fi
- for i in `find -name "*.t" | cut -d/ -f4`;do \
+ for i in $(shell find -name "*.t" | cut -d/ -f4);do \
touch tests/.timestamps/$$i's';\
done
cd tests/unit && \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/kiwi.pl new/kiwi/kiwi.pl
--- old/kiwi/kiwi.pl 2014-05-23 14:09:40.000000000 +0200
+++ new/kiwi/kiwi.pl 2014-05-27 14:49:56.000000000 +0200
@@ -31,6 +31,7 @@
use warnings;
use Carp qw (cluck);
use Getopt::Long;
+use File::Basename;
use File::Spec;
use File::Find;
use File::Glob ':glob';
@@ -1353,6 +1354,12 @@
if (! defined $FSInodeSize) {
$FSInodeSize = 256;
}
+ #========================================
+ # set build type from commandline
+ #----------------------------------------
+ if (defined $SetImageType) {
+ $cmdL -> setBuildType($SetImageType);
+ }
#==========================================
# non root task: Check XML configuration
#------------------------------------------
@@ -1488,9 +1495,6 @@
$kiwi -> failed ();
kiwiExit (1);
}
- if (defined $SetImageType) {
- $cmdL -> setBuildType($SetImageType);
- }
return;
}
@@ -1778,7 +1782,8 @@
#------------------------------------------
sub checkConfig {
# ...
- # Check the specified configuration file
+ # Check the specified configuration. validate the
+ # schema and apply the prepare runtime checks
# ---
my $config = shift;
my $gdata = $global -> getKiwiConfig();
@@ -1802,6 +1807,19 @@
$kiwi -> failed ();
exit 1;
}
+ my $configDir = dirname ($config);
+ my $xml = KIWIXML -> new (
+ $configDir,$cmdL->getBuildType(),undef,$cmdL
+ );
+ if (! $xml) {
+ exit 1;
+ }
+ my $krc = KIWIRuntimeChecker -> new(
+ $cmdL, $xml
+ );
+ if ((! $krc) || (! $krc -> prepareChecks())) {
+ exit 1;
+ }
$kiwi -> info ('Validation passed');
$kiwi -> done ();
exit 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/modules/KIWIBoot.pm new/kiwi/modules/KIWIBoot.pm
--- old/kiwi/modules/KIWIBoot.pm 2014-05-26 15:35:05.000000000 +0200
+++ new/kiwi/modules/KIWIBoot.pm 2014-05-27 09:33:35.000000000 +0200
@@ -4249,7 +4249,6 @@
$type->{installboot} = "install";
$type->{boottimeout} = 1;
$type->{fastboot} = 1;
- $cmdline="kiwistderr=/dev/hvc0";
$vga="normal";
}
if ($topic =~ /^KIWI (CD|USB)/) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/modules/KIWIGlobals.pm new/kiwi/modules/KIWIGlobals.pm
--- old/kiwi/modules/KIWIGlobals.pm 2014-05-26 15:35:05.000000000 +0200
+++ new/kiwi/modules/KIWIGlobals.pm 2014-05-30 14:10:16.000000000 +0200
@@ -1398,7 +1398,7 @@
# Globals (generic)
#------------------------------------------
my %data;
- $data{Version} = "5.06.99";
+ $data{Version} = "5.06.104";
$data{Publisher} = "SUSE LINUX GmbH";
$data{Preparer} = "KIWI - http://opensuse.github.com/kiwi";
$data{ConfigName} = "config.xml";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/modules/KIWIImageFormat.pm new/kiwi/modules/KIWIImageFormat.pm
--- old/kiwi/modules/KIWIImageFormat.pm 2014-05-23 14:09:40.000000000 +0200
+++ new/kiwi/modules/KIWIImageFormat.pm 2014-05-27 21:37:17.000000000 +0200
@@ -220,10 +220,12 @@
my $xml = $this->{xml};
my $bootp = $this->{bootp};
my $vconf = $this->{vmdata};
- my $xend;
- if ($vconf) {
- $xend = $vconf -> getDomain();
+ if ((! $vconf) && ($format =~ /qcow2|vagrant/)) {
+ # a machine configuration doesn't make sense with these
+ # formats requested. Thus we can silently return here
+ return;
}
+ my $xend = $vconf -> getDomain();
if (! $xend) {
$xend = "dom0";
}
@@ -487,141 +489,149 @@
my $this = shift;
my $kiwi = $this->{kiwi};
my $xml = $this->{xml};
- my $box = $this->{image};
my $dest = dirname $this->{image};
- my $vgc = $xml -> getVagrantConfig();
+ my $vgclist= $xml -> getVagrantConfig();
my $desc = $xml -> getDescriptionInfo();
my $pref = $xml -> getPreferences();
my $img;
my $fmt;
- if (! $vgc) {
- $kiwi -> error (
- "No vagrantconfig section found"
- );
- $kiwi -> failed ();
- return;
- }
- my $provider = $vgc -> getProvider();
- #==========================================
- # create vagrant image
- #------------------------------------------
- if ($provider eq 'libvirt') {
- $img = $this -> createQCOW2();
- $fmt = 'qcow2';
- } elsif ($provider eq 'virtualbox') {
- $img = $this -> createVMDK();
- $fmt = 'vmdk';
- }
- if (! $img) {
- return;
- }
- $kiwi -> info ("Creating vagrant box metadata files");
- #==========================================
- # create vagrant metadata.json
- #------------------------------------------
- my $vsize = $vgc -> getVirtualSize();
- my $json_fd = FileHandle -> new();
- my $json_meta = $dest."/metadata.json";
- my $json_ref = JSON->new->allow_nonref;
- my %json_data;
- $json_data{provider} = $provider;
- $json_data{format} = $fmt;
- $json_data{virtual_size} = $vsize;
- $json_ref -> pretty;
- my $json_text = $json_ref ->encode( \%json_data );
- if (! $json_fd -> open (">$json_meta")) {
- $kiwi -> failed ();
- $kiwi -> error (
- "Couldn't create $json_meta file: $!"
- );
- $kiwi -> failed ();
- return;
- }
- print $json_fd $json_text;
- $json_fd -> close();
- #==========================================
- # create vagrant cloud configuration
- #------------------------------------------
- $box =~ s/\.raw$/\.box/;
- my $json_cloud = $box;
- $json_cloud =~ s/\.box$/\.json/;
- %json_data = ();
- my $versions = [];
- my $providers = [];
- $providers->[0]->{name} = $provider;
- $providers->[0]->{url} = basename $box;
- $versions->[0]->{version} = $pref -> getVersion();
- $versions->[0]->{providers} = $providers;
- $json_data{name} = $xml -> getImageName();
- $json_data{description} = $desc -> getSpecificationDescript();
- $json_data{description} =~ s/[\n\t]+//g;
- $json_data{versions} = $versions;
- $json_ref = JSON->new->allow_nonref;
- $json_ref -> pretty;
- $json_text = $json_ref ->encode( \%json_data );
- $json_fd = FileHandle -> new();
- if (! $json_fd -> open (">$json_cloud")) {
- $kiwi -> failed ();
- $kiwi -> error (
- "Couldn't create $json_cloud file: $!"
- );
- $kiwi -> failed ();
- return;
- }
- print $json_fd $json_text;
- $json_fd -> close();
- #==========================================
- # create vagrant Vagrantfile
- #------------------------------------------
- my $vagrant_meta = $dest."/Vagrantfile";
- my $vagrant_fd = FileHandle -> new();
- my $vagrant_mac= $this -> __randomMAC();
- if (! $vagrant_fd -> open (">$vagrant_meta")) {
- $kiwi -> failed ();
+ my @boxes;
+ if (! $vgclist) {
$kiwi -> error (
- "Couldn't create Vagrantfile file: $!"
+ "No vagrantconfig section(s) found"
);
$kiwi -> failed ();
return;
}
- print $vagrant_fd 'Vagrant::Config.run do |config|'."\n";
- print $vagrant_fd ' config.vm.base_mac = "'.$vagrant_mac.'"'."\n";
- print $vagrant_fd 'end'."\n";
- print $vagrant_fd 'include_vagrantfile = ';
- print $vagrant_fd 'File.expand_path("../include/_Vagrantfile", ';
- print $vagrant_fd '__FILE__)'."\n";
- print $vagrant_fd 'load include_vagrantfile ';
- print $vagrant_fd 'if File.exist?(include_vagrantfile)'."\n";
- $vagrant_fd -> close();
- $kiwi -> done();
- #==========================================
- # package vagrant box
- #------------------------------------------
- $kiwi -> info ("Creating vagrant box");
- my $img_basename = basename $img;
- KIWIQX::qxx ("cd $dest && mv $img_basename box.img");
- my @components = ();
- push @components, basename $json_meta;
- push @components, basename $vagrant_meta;
- push @components, 'box.img';
- my $status = KIWIQX::qxx (
- "tar -C $dest -czf $box @components 2>&1"
- );
- my $result = $? >> 8;
- if ($result != 0) {
- $kiwi -> failed ();
- $kiwi -> error (
- "Couldn't create box tarball: $status"
+ foreach my $vgc (@{$vgclist}) {
+ my $box = $this->{image};
+ my $provider = $vgc -> getProvider();
+ $kiwi -> info ("Creating vagrant box for $provider provider\n");
+ #==========================================
+ # create vagrant image
+ #------------------------------------------
+ if ($provider eq 'libvirt') {
+ $this->{format} = 'qcow2';
+ $img = $this -> createQCOW2();
+ $fmt = 'qcow2';
+ } elsif ($provider eq 'virtualbox') {
+ $this->{format} = 'vmdk';
+ $img = $this -> createVMDK();
+ $fmt = 'vmdk';
+ }
+ $this->{format} = 'vagrant';
+ if (! $img) {
+ return;
+ }
+ $kiwi -> info ("--> Creating box metadata files");
+ #==========================================
+ # create vagrant metadata.json
+ #------------------------------------------
+ my $vsize = $vgc -> getVirtualSize();
+ my $json_fd = FileHandle -> new();
+ my $json_meta = $dest."/metadata.json";
+ my $json_ref = JSON->new->allow_nonref;
+ my %json_data;
+ $json_data{provider} = $provider;
+ $json_data{format} = $fmt;
+ $json_data{virtual_size} = $vsize;
+ $json_ref -> pretty;
+ my $json_text = $json_ref ->encode( \%json_data );
+ if (! $json_fd -> open (">$json_meta")) {
+ $kiwi -> failed ();
+ $kiwi -> error (
+ "Couldn't create $json_meta file: $!"
+ );
+ $kiwi -> failed ();
+ return;
+ }
+ print $json_fd $json_text;
+ $json_fd -> close();
+ #==========================================
+ # create vagrant cloud configuration
+ #------------------------------------------
+ my $json_cloud = $box;
+ $json_cloud =~ s/\.raw$/\.$provider\.json/;
+ $box =~ s/\.raw$/\.$provider\.box/;
+ %json_data = ();
+ my $versions = [];
+ my $providers = [];
+ $providers->[0]->{name} = $provider;
+ $providers->[0]->{url} = basename $box;
+ $versions->[0]->{version} = $pref -> getVersion();
+ $versions->[0]->{providers} = $providers;
+ $json_data{name} = $xml -> getImageName();
+ $json_data{description} = $desc -> getSpecificationDescript();
+ $json_data{description} =~ s/[\n\t]+//g;
+ $json_data{versions} = $versions;
+ $json_ref = JSON->new->allow_nonref;
+ $json_ref -> pretty;
+ $json_text = $json_ref ->encode( \%json_data );
+ $json_fd = FileHandle -> new();
+ if (! $json_fd -> open (">$json_cloud")) {
+ $kiwi -> failed ();
+ $kiwi -> error (
+ "Couldn't create $json_cloud file: $!"
+ );
+ $kiwi -> failed ();
+ return;
+ }
+ print $json_fd $json_text;
+ $json_fd -> close();
+ #==========================================
+ # create vagrant Vagrantfile
+ #------------------------------------------
+ my $vagrant_meta = $dest."/Vagrantfile";
+ my $vagrant_fd = FileHandle -> new();
+ my $vagrant_mac= $this -> __randomMAC();
+ if (! $vagrant_fd -> open (">$vagrant_meta")) {
+ $kiwi -> failed ();
+ $kiwi -> error (
+ "Couldn't create Vagrantfile file: $!"
+ );
+ $kiwi -> failed ();
+ return;
+ }
+ print $vagrant_fd 'Vagrant::Config.run do |config|'."\n";
+ print $vagrant_fd ' config.vm.base_mac = "'.$vagrant_mac.'"'."\n";
+ print $vagrant_fd 'end'."\n";
+ print $vagrant_fd 'include_vagrantfile = ';
+ print $vagrant_fd 'File.expand_path("../include/_Vagrantfile", ';
+ print $vagrant_fd '__FILE__)'."\n";
+ print $vagrant_fd 'load include_vagrantfile ';
+ print $vagrant_fd 'if File.exist?(include_vagrantfile)'."\n";
+ $vagrant_fd -> close();
+ $kiwi -> done();
+ #==========================================
+ # package vagrant box
+ #------------------------------------------
+ $kiwi -> info ("--> Creating box archive");
+ my $img_basename = basename $img;
+ KIWIQX::qxx ("cd $dest && mv $img_basename box.img");
+ my @components = ();
+ push @components, basename $json_meta;
+ push @components, basename $vagrant_meta;
+ push @components, 'box.img';
+ my $status = KIWIQX::qxx (
+ "tar -C $dest -czf $box @components 2>&1"
);
- $kiwi -> failed ();
- return;
+ my $result = $? >> 8;
+ if ($result != 0) {
+ $kiwi -> failed ();
+ $kiwi -> error (
+ "Couldn't create box tarball: $status"
+ );
+ $kiwi -> failed ();
+ return;
+ }
+ push @boxes, $box;
+ $kiwi -> done();
+ #==========================================
+ # cleanup
+ #------------------------------------------
+ KIWIQX::qxx ("rm -f $json_meta $vagrant_meta $dest/box.img");
}
- $kiwi -> done();
- #==========================================
- # cleanup
- #------------------------------------------
- KIWIQX::qxx ("rm -f $json_meta $vagrant_meta $dest/box.img");
- return $box;
+ return @boxes;
}
#==========================================
@@ -631,7 +641,7 @@
my $this = shift;
my $kiwi = $this->{kiwi};
my $xml = $this->{xml};
- my $vmc = $xml -> getVMachineConfig();
+ my $vmc = $this->{vmdata};
my $dest = dirname $this->{image};
my $base = basename $this->{image};
my $format;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/modules/KIWILocator.pm new/kiwi/modules/KIWILocator.pm
--- old/kiwi/modules/KIWILocator.pm 2014-05-23 14:09:40.000000000 +0200
+++ new/kiwi/modules/KIWILocator.pm 2014-05-27 10:40:10.000000000 +0200
@@ -222,7 +222,7 @@
if (-f $config) {
$found = 1; last;
}
- @globsearch = glob ($dir."/*.kiwi");
+ @globsearch = glob ($dir.$search."*.kiwi");
my $globitems = @globsearch;
if ($globitems == 0) {
next;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/modules/KIWIManagerEnsconce.pm new/kiwi/modules/KIWIManagerEnsconce.pm
--- old/kiwi/modules/KIWIManagerEnsconce.pm 2014-05-23 14:09:40.000000000 +0200
+++ new/kiwi/modules/KIWIManagerEnsconce.pm 2014-05-30 14:10:16.000000000 +0200
@@ -225,6 +225,8 @@
my @removeOpts = (
"--nodeps --allmatches --noscripts"
);
+ print $fd "export LANG=C"."\n";
+ print $fd "export LC_ALL=C"."\n";
print $fd "function clean { kill \$SPID;";
print $fd "while kill -0 \$SPID &>/dev/null; do sleep 1;";
print $fd "if [ \"\$c\" = 5 ];then kill \$SPID;break;fi;";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/modules/KIWIManagerYum.pm new/kiwi/modules/KIWIManagerYum.pm
--- old/kiwi/modules/KIWIManagerYum.pm 2014-05-23 14:09:40.000000000 +0200
+++ new/kiwi/modules/KIWIManagerYum.pm 2014-05-30 14:10:16.000000000 +0200
@@ -381,6 +381,8 @@
my @removeOpts = (
"--nodeps --allmatches --noscripts"
);
+ print $fd "export LANG=C"."\n";
+ print $fd "export LC_ALL=C"."\n";
print $fd "function clean { kill \$SPID;";
print $fd "while kill -0 \$SPID &>/dev/null; do sleep 1;";
print $fd "if [ \"\$c\" = 5 ];then kill \$SPID;break;fi;";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/modules/KIWIManagerZypper.pm new/kiwi/modules/KIWIManagerZypper.pm
--- old/kiwi/modules/KIWIManagerZypper.pm 2014-05-23 14:09:40.000000000 +0200
+++ new/kiwi/modules/KIWIManagerZypper.pm 2014-05-30 14:10:16.000000000 +0200
@@ -582,6 +582,8 @@
my @removeOpts = (
"--nodeps --allmatches --noscripts"
);
+ print $fd "export LANG=C"."\n";
+ print $fd "export LC_ALL=C"."\n";
print $fd "function clean { kill \$SPID;";
print $fd "while kill -0 \$SPID &>/dev/null; do sleep 1;";
print $fd "if [ \"\$c\" = 5 ];then kill \$SPID;break;fi;";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/modules/KIWIRuntimeChecker.pm new/kiwi/modules/KIWIRuntimeChecker.pm
--- old/kiwi/modules/KIWIRuntimeChecker.pm 2014-05-23 14:09:40.000000000 +0200
+++ new/kiwi/modules/KIWIRuntimeChecker.pm 2014-05-27 14:49:56.000000000 +0200
@@ -109,6 +109,9 @@
if (! $this -> __checkContainerHasLXC()) {
return;
}
+ if (! $this -> __checkSelectedBootLoaderIncluded()) {
+ return;
+ }
if (! $this -> __checkProfileConsistent()) {
return;
}
@@ -168,6 +171,9 @@
if (! $this -> __checkYaSTenvironment()) {
return;
}
+ if (! $this -> __checkSelectedBootLoaderIncluded()) {
+ return;
+ }
if (! $this -> __haveValidTypeString()) {
return;
}
@@ -341,6 +347,62 @@
}
#==========================================
+# __checkSelectedBootLoaderIncluded
+#------------------------------------------
+sub __checkSelectedBootLoaderIncluded {
+ # ...
+ # check if the selected bootloader will also be installed into
+ # the image. This is required for the oem, vmx and pxe image
+ # types. In case of a pxe type the deploy configuration might
+ # not require a bootloader e.g for remote root systems. As we
+ # don't know the deploy configuration at build time the check
+ # might complain unnecessarily. In such a case add the package
+ # in question and remove it in config.sh again.
+ # ---
+ my $this = shift;
+ my $xml = $this->{xml};
+ my $kiwi = $this->{kiwi};
+ my %loaderPackages = (
+ 'grub' => 'grub',
+ 'grub2' => 'grub2',
+ 'extlinux' => 'syslinux',
+ 'syslinux' => 'syslinux',
+ 'zipl' => 's390-tools',
+ 'uboot' => 'u-boot-tools'
+ );
+ my $msg;
+ my $type = $xml -> getImageType();
+ if (! $type) {
+ return 1;
+ }
+ my $name = $type -> getTypeName();
+ if ($name !~ /oem|vmx|pxe/) {
+ return 1;
+ }
+ my $bootloader = $type -> getBootLoader();
+ if (! $bootloader) {
+ $bootloader = 'grub';
+ }
+ my $loaderPackage = $loaderPackages{$bootloader};
+ if (! $loaderPackage) {
+ return 1;
+ }
+ my $pckgs = $xml -> getPackages();
+ push @{$pckgs}, @{$xml -> getBootstrapPackages()};
+ for my $pckg (@{$pckgs}) {
+ my $pname = $pckg -> getName();
+ if ($pname eq $loaderPackage) {
+ return 1;
+ }
+ }
+ $msg = "Selected bootloader is $bootloader, but required ";
+ $msg.= "package $loaderPackage is not included in image.";
+ $kiwi -> error ( $msg );
+ $kiwi -> failed ();
+ return;
+}
+
+#==========================================
# __checkContainerHasLXC
#------------------------------------------
sub __checkContainerHasLXC {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/modules/KIWISatSolver.pm new/kiwi/modules/KIWISatSolver.pm
--- old/kiwi/modules/KIWISatSolver.pm 2014-05-23 14:09:40.000000000 +0200
+++ new/kiwi/modules/KIWISatSolver.pm 2014-05-30 14:10:16.000000000 +0200
@@ -190,7 +190,7 @@
$kiwi -> failed ();
return;
}
- push @files, $solv_file;
+ push @files, quotemeta($solv_file);
}
} else {
#==========================================
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/modules/KIWISchema.rnc new/kiwi/modules/KIWISchema.rnc
--- old/kiwi/modules/KIWISchema.rnc 2014-05-23 14:09:40.000000000 +0200
+++ new/kiwi/modules/KIWISchema.rnc 2014-05-27 20:38:41.000000000 +0200
@@ -1822,7 +1822,7 @@
k.size? &
k.split? &
k.systemdisk? &
- k.vagrantconfig?
+ k.vagrantconfig*
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/modules/KIWISchema.rng new/kiwi/modules/KIWISchema.rng
--- old/kiwi/modules/KIWISchema.rng 2014-05-23 14:09:40.000000000 +0200
+++ new/kiwi/modules/KIWISchema.rng 2014-05-27 20:38:41.000000000 +0200
@@ -2564,9 +2564,9 @@
<optional>
<ref name="k.systemdisk"/>
</optional>
- <optional>
+ <zeroOrMore>
<ref name="k.vagrantconfig"/>
- </optional>
+ </zeroOrMore>
</interleave>
</element>
</define>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/modules/KIWIXML.pm new/kiwi/modules/KIWIXML.pm
--- old/kiwi/modules/KIWIXML.pm 2014-05-23 14:09:40.000000000 +0200
+++ new/kiwi/modules/KIWIXML.pm 2014-05-27 20:38:41.000000000 +0200
@@ -99,7 +99,7 @@
# defaultType = {
# machine = KIWIXMLVMachineData
# oemconfig = KIWIXMLOEMConfigData
- # vagrantconfig = KIWIXMLVagrantConfigData
+ # vagrantconfig = (KIWIXMLVagrantConfigData,...)
# pxeconfig = (KIWIXMLPXEDeployConfigData,...)
# pxedeploy = KIWIXMLPXEDeployData
# split = KIWIXMLSplitData
@@ -110,7 +110,7 @@
# selectedType = {
# machine = KIWIXMLVMachineData
# oemconfig = KIWIXMLOEMConfigData
- # vagrantconfig = KIWIXMLVagrantConfigData
+ # vagrantconfig = (KIWIXMLVagrantConfigData,...)
# pxeconfig = (KIWIXMLPXEDeployConfigData,...)
# pxedeploy = KIWIXMLPXEDeployData
# split = KIWIXMLSplitData
@@ -196,7 +196,7 @@
# <typename>[+] {
# machine = KIWIXMLVMachineData
# oemconfig = KIWIXMLOEMConfigData
- # vagrantconfig = KIWIXMLVagrantConfigData
+ # vagrantconfig = (KIWIXMLVagrantConfigData,...)
# pxeconfig = (KIWIXMLPXEDeployConfigData,...)
# pxedeploy = KIWIXMLPXEDeployData
# split = KIWIXMLSplitData
@@ -1611,7 +1611,8 @@
#------------------------------------------
sub getVagrantConfig {
# ...
- # Return a VagrantConfigData object for the selected build type
+ # Return an array ref containing VagrantConfigData objects
+ # for the selected build type
# ---
my $this = shift;
return $this->{selectedType}->{vagrantconfig};
@@ -1629,26 +1630,6 @@
}
#==========================================
-# setVagrantConfig
-#------------------------------------------
-sub setVagrantConfig {
- # ...
- # Store a new VagrantConfigData object for the selected build type
- # ---
- my $this = shift;
- my $vagrantconf = shift;
- my $vagrantref = ref $vagrantconf;
- if (! $vagrantref) {
- return;
- }
- if ($vagrantref ne 'KIWIXMLVagrantConfigData') {
- return;
- }
- $this->{selectedType}->{vagrantconfig} = $vagrantconf;
- return $this;
-}
-
-#==========================================
# setOEMConfig
#------------------------------------------
sub setOEMConfig {
@@ -2953,26 +2934,30 @@
sub __createVagrantConfig {
# ...
# Return a ref to a hash that contains the configuration data
- # for the <vagrantconfig> element and it's children for the
+ # for the <vagrantconfig> elements and it's children for the
# given XML:ELEMENT object
# ---
my $this = shift;
my $node = shift;
my $kiwi = $this->{kiwi};
- my $vagrantConfig = $node
- -> getChildrenByTagName('vagrantconfig') -> get_node(1);
- if (! $vagrantConfig ) {
+ my @vagrantConfigNodes = $node
+ -> getChildrenByTagName('vagrantconfig');
+ if (! @vagrantConfigNodes) {
return;
}
- my %vagrantConfigData;
- $vagrantConfigData{provider} =
- $vagrantConfig -> getAttribute('provider');
- $vagrantConfigData{virtual_size} =
- $vagrantConfig -> getAttribute('virtualsize');
- my $vagrantConfObj = KIWIXMLVagrantConfigData -> new(
- \%vagrantConfigData
- );
- return $vagrantConfObj;
+ my @vagrantConfigData;
+ for my $vagrantConfig (@vagrantConfigNodes) {
+ my %vagrantConfigSet;
+ $vagrantConfigSet{provider} =
+ $vagrantConfig -> getAttribute('provider');
+ $vagrantConfigSet{virtual_size} =
+ $vagrantConfig -> getAttribute('virtualsize');
+ my $vagrantConfObj = KIWIXMLVagrantConfigData -> new(
+ \%vagrantConfigSet
+ );
+ push @vagrantConfigData, $vagrantConfObj;
+ }
+ return \@vagrantConfigData;
}
#==========================================
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/tests/jenkins/prepare.sh new/kiwi/tests/jenkins/prepare.sh
--- old/kiwi/tests/jenkins/prepare.sh 2014-05-23 14:09:40.000000000 +0200
+++ new/kiwi/tests/jenkins/prepare.sh 2014-05-30 14:10:16.000000000 +0200
@@ -34,7 +34,7 @@
# install required packages
spec=/home/jenkins/kiwi/kiwi/rpm/kiwi.spec
-packages="genisoimage cdrkit-cdrtools-compat squashfs osc"
+packages="grub grub2 genisoimage cdrkit-cdrtools-compat squashfs osc yum"
if ! zypper -n install --no-recommends $packages;then
exit 1
fi
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package yast2-ruby-bindings for openSUSE:Factory checked in at 2014-06-01 18:56:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-ruby-bindings (Old)
and /work/SRC/openSUSE:Factory/.yast2-ruby-bindings.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-ruby-bindings"
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-ruby-bindings/yast2-ruby-bindings.changes 2014-05-17 22:01:54.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-ruby-bindings.new/yast2-ruby-bindings.changes 2014-06-01 18:56:08.000000000 +0200
@@ -1,0 +2,7 @@
+Thu May 29 15:03:23 UTC 2014 - jreidinger(a)suse.com
+
+- fix translation if mixture of textdomain are used in included
+ files (bnc#877687)
+- 3.1.18
+
+-------------------------------------------------------------------
Old:
----
yast2-ruby-bindings-3.1.17.tar.bz2
New:
----
yast2-ruby-bindings-3.1.18.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-ruby-bindings.spec ++++++
--- /var/tmp/diff_new_pack.OXSl3p/_old 2014-06-01 18:56:09.000000000 +0200
+++ /var/tmp/diff_new_pack.OXSl3p/_new 2014-06-01 18:56:09.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-ruby-bindings
-Version: 3.1.17
+Version: 3.1.18
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: yast2-ruby-bindings-%{version}.tar.bz2
++++++ yast2-ruby-bindings-3.1.17.tar.bz2 -> yast2-ruby-bindings-3.1.18.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ruby-bindings-3.1.17/package/yast2-ruby-bindings.changes new/yast2-ruby-bindings-3.1.18/package/yast2-ruby-bindings.changes
--- old/yast2-ruby-bindings-3.1.17/package/yast2-ruby-bindings.changes 2014-05-15 12:36:47.000000000 +0200
+++ new/yast2-ruby-bindings-3.1.18/package/yast2-ruby-bindings.changes 2014-05-30 10:26:45.000000000 +0200
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
+Thu May 29 15:03:23 UTC 2014 - jreidinger(a)suse.com
+
+- fix translation if mixture of textdomain are used in included
+ files (bnc#877687)
+- 3.1.18
+
+-------------------------------------------------------------------
Wed May 14 13:13:09 UTC 2014 - mvidner(a)suse.com
- Mechanically converted the remaining test/unit tests to RSpec
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ruby-bindings-3.1.17/package/yast2-ruby-bindings.spec new/yast2-ruby-bindings-3.1.18/package/yast2-ruby-bindings.spec
--- old/yast2-ruby-bindings-3.1.17/package/yast2-ruby-bindings.spec 2014-05-15 12:36:47.000000000 +0200
+++ new/yast2-ruby-bindings-3.1.18/package/yast2-ruby-bindings.spec 2014-05-30 10:26:45.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-ruby-bindings
-Version: 3.1.17
+Version: 3.1.18
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: yast2-ruby-bindings-%{version}.tar.bz2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ruby-bindings-3.1.17/src/ruby/yast/i18n.rb new/yast2-ruby-bindings-3.1.18/src/ruby/yast/i18n.rb
--- old/yast2-ruby-bindings-3.1.17/src/ruby/yast/i18n.rb 2014-05-15 12:36:47.000000000 +0200
+++ new/yast2-ruby-bindings-3.1.18/src/ruby/yast/i18n.rb 2014-05-30 10:26:45.000000000 +0200
@@ -18,7 +18,9 @@
# FastGettext does not track which file/class uses which text domain,
# it has just single global text domain (the current one),
# remember the requested text domain here
- @my_textdomain = domain
+ # One object can have multiple text domains via multiple Yast.include (bnc#877687).
+ @my_textdomain ||= []
+ @my_textdomain << domain unless @my_textdomain.include? domain
# initialize available locales at first use or when the current language is changed
if FastGettext.available_locales.nil? || current_language != FastGettext.locale
@@ -42,7 +44,15 @@
return str unless @my_textdomain
old_text_domain = FastGettext.text_domain
- FastGettext.text_domain = @my_textdomain
+ # Switching textdomain clears gettext caches so avoid it if possible.
+ if !(a)my_textdomain.include?(old_text_domain) ||
+ !FastGettext.key_exist?(str)
+ # Set domain where key is defined.
+ @my_textdomain.each do |domain|
+ FastGettext.text_domain = domain
+ break if FastGettext.key_exist?(str)
+ end
+ end
FastGettext::Translation::_ str
ensure
FastGettext.text_domain = old_text_domain
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package xf86-video-vesa for openSUSE:Factory checked in at 2014-06-01 18:56:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/xf86-video-vesa (Old)
and /work/SRC/openSUSE:Factory/.xf86-video-vesa.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "xf86-video-vesa"
Changes:
--------
--- /work/SRC/openSUSE:Factory/xf86-video-vesa/xf86-video-vesa.changes 2013-09-12 07:10:18.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.xf86-video-vesa.new/xf86-video-vesa.changes 2014-06-01 18:56:07.000000000 +0200
@@ -1,0 +2,9 @@
+Thu May 22 13:39:00 UTC 2014 - eich(a)suse.com
+
+- u_Restore-palette-on-LeaveVT.patch:
+ Restore the Palette on LeaveVT - as it is done on CloseScreen() already
+ (bnc#719866).
+- u_Enable-DefaultRefresh-by-default.patch:
+ Update comments.
+
+-------------------------------------------------------------------
New:
----
u_Restore-palette-on-LeaveVT.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ xf86-video-vesa.spec ++++++
--- /var/tmp/diff_new_pack.uH920c/_old 2014-06-01 18:56:08.000000000 +0200
+++ /var/tmp/diff_new_pack.uH920c/_new 2014-06-01 18:56:08.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package xf86-video-vesa
#
-# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -25,6 +25,7 @@
Url: http://xorg.freedesktop.org/
Source0: http://xorg.freedesktop.org/releases/individual/driver/%{name}-%{version}.t…
Patch0: u_Enable-DefaultRefresh-by-default.patch
+Patch1: u_Restore-palette-on-LeaveVT.patch
#PATCH-FIX-UPSTREAM U_mibstore.patch -- removes obsolete include
BuildRequires: pkg-config
BuildRequires: pkgconfig(fontsproto)
@@ -52,6 +53,7 @@
%prep
%setup -q
%patch0 -p1
+%patch1 -p1
%build
%configure
++++++ u_Enable-DefaultRefresh-by-default.patch ++++++
--- /var/tmp/diff_new_pack.uH920c/_old 2014-06-01 18:56:08.000000000 +0200
+++ /var/tmp/diff_new_pack.uH920c/_new 2014-06-01 18:56:08.000000000 +0200
@@ -1,9 +1,11 @@
From c8409ab331647ce19028f5424f0d9d3e8978c98e Mon Sep 17 00:00:00 2001
From: Stefan Dirsch <sndirsch(a)suse.de>
Date: Wed, 11 Sep 2013 12:55:10 +0200
-Subject: [PATCH] Enable DefaultRefresh by default
+Subject: [PATCH] Use default refresh by default
+
+This seems to be a feature that isn't tested well.
+Too many VBE 3.0 BIOSes are incorrectly implemented.
-Use DefaultRefresh by default due to VBE 3.0 often wrongly implemented.
---
src/vesa.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
@@ -19,8 +21,8 @@
-
- if (xf86ReturnOptValBool(pVesa->Options, OPTION_DFLT_REFRESH, FALSE))
- pVesa->defaultRefresh = TRUE;
-+ /* Use DefaultRefresh by default due to VBE 3.0 often wrongly
-+ * implemented.
++ /* Use default refresh by default. Too many VBE 3.0
++ * BIOSes are incorrectly implemented.
+ */
+ pVesa->defaultRefresh = xf86ReturnOptValBool(pVesa->Options,
+ OPTION_DFLT_REFRESH, TRUE);
++++++ u_Restore-palette-on-LeaveVT.patch ++++++
From: Egbert Eich <eich(a)freedesktop.org>
Date: Thu Sep 22 16:47:19 2011 +0200
Subject: [PATCH]Restore palette on LeaveVT()
Patch-mainline: to be upstreamed
Git-commit: 46bbbae9b7e714c472db4c36733096772a17d86f
Git-repo: ssh://git.freedesktop.org/git/xorg/driver/xf86-video-vesa
References: bnc#719866
Signed-off-by: Egbert Eich <eich(a)suse.com>
Use BIOS function to restore palette on LeaveVT().
This fixes messed up colors in text mode on VT switch.
It is already done in CloseScreen().
Signed-off-by: Egbert Eich <eich(a)freedesktop.org>
---
src/vesa.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/vesa.c b/src/vesa.c
index 53854b1..dc308f4 100644
--- a/src/vesa.c
+++ b/src/vesa.c
@@ -1127,7 +1127,12 @@ static void
VESALeaveVT(VT_FUNC_ARGS_DECL)
{
SCRN_INFO_PTR(arg);
+ VESAPtr pVesa = VESAGetRec(pScrn);
+
VESASaveRestore(pScrn, MODE_RESTORE);
+ if (pVesa->savedPal)
+ VBESetGetPaletteData(pVesa->pVbe, TRUE, 0, 256,
+ pVesa->savedPal, FALSE, TRUE);
}
static Bool
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package libzypp for openSUSE:Factory checked in at 2014-06-01 18:56:00
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libzypp (Old)
and /work/SRC/openSUSE:Factory/.libzypp.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libzypp"
Changes:
--------
--- /work/SRC/openSUSE:Factory/libzypp/libzypp.changes 2014-05-10 07:48:28.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.libzypp.new/libzypp.changes 2014-06-01 18:56:05.000000000 +0200
@@ -1,0 +2,17 @@
+Tue May 27 16:31:21 CEST 2014 - ma(a)suse.de
+
+- Let ServiceRefresh en-/disable repos with respect to previous state
+ and user modifications.
+- RepoindexFileReader: support variable substitution
+- Parse optional autorefresh attribute from repoindex.xml
+- version 14.21.0 (20)
+
+-------------------------------------------------------------------
+Wed May 14 13:52:38 CEST 2014 - ma(a)suse.de
+
+- Add DownloadResolvableReport::infoInCache
+- Adjust transfer timeout settings (bnc#877405)
+- Fix computation of update candidate (bnc#834858)
+- version 14.20.0 (20)
+
+-------------------------------------------------------------------
Old:
----
libzypp-14.19.0.tar.bz2
New:
----
libzypp-14.21.0.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libzypp.spec ++++++
--- /var/tmp/diff_new_pack.gNO1b9/_old 2014-06-01 18:56:06.000000000 +0200
+++ /var/tmp/diff_new_pack.gNO1b9/_new 2014-06-01 18:56:06.000000000 +0200
@@ -23,7 +23,7 @@
Summary: Package, Patch, Pattern, and Product Management
License: GPL-2.0+
Group: System/Packages
-Version: 14.19.0
+Version: 14.21.0
Release: 0
Source: %{name}-%{version}.tar.bz2
Source1: %{name}-rpmlintrc
++++++ libzypp-14.19.0.tar.bz2 -> libzypp-14.21.0.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-14.19.0/VERSION.cmake new/libzypp-14.21.0/VERSION.cmake
--- old/libzypp-14.19.0/VERSION.cmake 2014-05-08 18:56:44.000000000 +0200
+++ new/libzypp-14.21.0/VERSION.cmake 2014-05-27 16:33:18.000000000 +0200
@@ -59,10 +59,10 @@
# See './mkChangelog -h' for help.
#
SET(LIBZYPP_MAJOR "14")
-SET(LIBZYPP_COMPATMINOR "19")
-SET(LIBZYPP_MINOR "19")
+SET(LIBZYPP_COMPATMINOR "20")
+SET(LIBZYPP_MINOR "21")
SET(LIBZYPP_PATCH "0")
#
-# LAST RELEASED: 14.19.0 (19)
+# LAST RELEASED: 14.21.0 (20)
# (The number in parenthesis is LIBZYPP_COMPATMINOR)
#=======
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-14.19.0/package/libzypp.changes new/libzypp-14.21.0/package/libzypp.changes
--- old/libzypp-14.19.0/package/libzypp.changes 2014-05-08 18:56:44.000000000 +0200
+++ new/libzypp-14.21.0/package/libzypp.changes 2014-05-27 16:33:18.000000000 +0200
@@ -1,4 +1,21 @@
-------------------------------------------------------------------
+Tue May 27 16:31:21 CEST 2014 - ma(a)suse.de
+
+- Let ServiceRefresh en-/disable repos with respect to previous state
+ and user modifications.
+- RepoindexFileReader: support variable substitution
+- Parse optional autorefresh attribute from repoindex.xml
+- version 14.21.0 (20)
+
+-------------------------------------------------------------------
+Wed May 14 13:52:38 CEST 2014 - ma(a)suse.de
+
+- Add DownloadResolvableReport::infoInCache
+- Adjust transfer timeout settings (bnc#877405)
+- Fix computation of update candidate (bnc#834858)
+- version 14.20.0 (20)
+
+-------------------------------------------------------------------
Thu May 8 18:54:25 CEST 2014 - ma(a)suse.de
- KeyRingReport: New infoVerify callback showing the trusted key
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-14.19.0/tests/parser/RepoindexFileReader_test.cc new/libzypp-14.21.0/tests/parser/RepoindexFileReader_test.cc
--- old/libzypp-14.19.0/tests/parser/RepoindexFileReader_test.cc 2013-03-20 09:29:30.000000000 +0100
+++ new/libzypp-14.21.0/tests/parser/RepoindexFileReader_test.cc 2014-05-27 16:33:19.000000000 +0200
@@ -10,13 +10,13 @@
using std::string;
using namespace zypp;
-static string service = "<repoindex>"
+static string service = "<repoindex arch=\"i386\" distver=\"11\">"
"<repo alias=\"company-foo\" name=\"Company's Foo\""
- " path=\"products/foo\" distro_target=\"sle-11-i386\" priority=\"20\"/>"
+ " path=\"products/foo\" distro_target=\"sle-%{distver}-%{arch}\" priority=\"20\"/>"
"<repo alias=\"company-bar\" name=\"Company's Bar\""
- " path=\"products/bar\" distro_target=\"sle-11-i386\" enabled=\"true\"/>"
+ " path=\"products/bar\" distro_target=\"sle-%{distver}-%{arch}\" enabled=\"tRUe\" autorefresh=\"FaLsE\"/>"
"<repo alias=\"company-foo-upd\" name=\"Company's Foo Updates\""
- " path=\"products/foo/updates\" distro_target=\"sle-11-i386\" priority=\"1\"/>"
+ " path=\"products/foo/updates\" distro_target=\"sle-%{distver}-%{arch}\" priority=\"1\"/>"
"</repoindex>";
struct RepoCollector : private base::NonCopyable
@@ -61,6 +61,8 @@
BOOST_CHECK_EQUAL(99, repo.priority());
// "Repository is explicitly enabled"
BOOST_CHECK(repo.enabled());
+ // "Repository autorefresh is explicitly disabled"
+ BOOST_CHECK(!repo.autorefresh());
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-14.19.0/zypp/RepoManager.cc new/libzypp-14.21.0/zypp/RepoManager.cc
--- old/libzypp-14.19.0/zypp/RepoManager.cc 2014-04-03 19:24:12.000000000 +0200
+++ new/libzypp-14.21.0/zypp/RepoManager.cc 2014-05-27 16:33:19.000000000 +0200
@@ -1294,7 +1294,7 @@
if ( subdir->basename() == r->escaped_alias() )
{ found = true; break; }
- if ( ! found )
+ if ( ! found && ( Date::now()-PathInfo(*subdir).mtime() > Date::day ) )
filesystem::recursive_rmdir( *subdir );
progress.set( progress.val() + sdircurrent * 100 / sdircount );
@@ -1717,7 +1717,7 @@
void RepoManager::Impl::removeService( const std::string & alias )
{
- MIL << "Going to delete repo " << alias << endl;
+ MIL << "Going to delete service " << alias << endl;
const ServiceInfo & service = getService( alias );
@@ -1838,12 +1838,24 @@
uglyHack.second = e;
}
+ ////////////////////////////////////////////////////////////////////////////
+ // On the fly remember the new repo states as defined the reopoindex.xml.
+ // Move into ServiceInfo later.
+ ServiceInfo::RepoStates newRepoStates;
+
// set service alias and base url for all collected repositories
for_( it, collector.repos.begin(), collector.repos.end() )
{
+ // First of all: Prepend service alias:
+ it->setAlias( str::form( "%s:%s", service.alias().c_str(), it->alias().c_str() ) );
+ // set refrence to the parent service
+ it->setService( service.alias() );
+
+ // remember the new parsed repo state
+ newRepoStates[it->alias()] = *it;
+
// if the repo url was not set by the repoindex parser, set service's url
Url url;
-
if ( it->baseUrlsEmpty() )
url = service.url();
else
@@ -1862,13 +1874,8 @@
it->setPath("");
}
- // Prepend service alias:
- it->setAlias( str::form( "%s:%s", service.alias().c_str(), it->alias().c_str() ) );
-
// save the url
it->setBaseUrl( url );
- // set refrence to the parent service
- it->setService( service.alias() );
}
////////////////////////////////////////////////////////////////////////////
@@ -1877,22 +1884,29 @@
RepoInfoList oldRepos;
getRepositoriesInService( service.alias(), std::back_inserter( oldRepos ) );
+ ////////////////////////////////////////////////////////////////////////////
// find old repositories to remove...
- for_( it, oldRepos.begin(), oldRepos.end() )
+ for_( oldRepo, oldRepos.begin(), oldRepos.end() )
{
- if ( ! foundAliasIn( it->alias(), collector.repos ) )
+ if ( ! foundAliasIn( oldRepo->alias(), collector.repos ) )
{
- if ( it->enabled() && ! service.repoToDisableFind( it->alias() ) )
- {
- DBG << "Service removes enabled repo " << it->alias() << endl;
- service.addRepoToEnable( it->alias() );
- serviceModified = true;
- }
- else
- {
- DBG << "Service removes disabled repo " << it->alias() << endl;
- }
- removeRepository( *it );
+ if ( oldRepo->enabled() )
+ {
+ // Currently enabled. If this was a user modification remember the state.
+ const auto & last = service.repoStates().find( oldRepo->alias() );
+ if ( last != service.repoStates().end() && ! last->second.enabled )
+ {
+ DBG << "Service removes user enabled repo " << oldRepo->alias() << endl;
+ service.addRepoToEnable( oldRepo->alias() );
+ serviceModified = true;
+ }
+ else
+ DBG << "Service removes enabled repo " << oldRepo->alias() << endl;
+ }
+ else
+ DBG << "Service removes disabled repo " << oldRepo->alias() << endl;
+
+ removeRepository( *oldRepo );
}
}
@@ -1900,76 +1914,101 @@
// create missing repositories and modify exising ones if needed...
for_( it, collector.repos.begin(), collector.repos.end() )
{
- // Service explicitly requests the repo being enabled?
- // Service explicitly requests the repo being disabled?
+ // User explicitly requested the repo being enabled?
+ // User explicitly requested the repo being disabled?
// And hopefully not both ;) If so, enable wins.
- bool beEnabled = service.repoToEnableFind( it->alias() );
- bool beDisabled = service.repoToDisableFind( it->alias() );
- // Make sure the service repo is created with the
- // appropriate enable
- if ( beEnabled ) it->setEnabled(true);
- if ( beDisabled ) it->setEnabled(false);
+ TriBool toBeEnabled( indeterminate ); // indeterminate - follow the service request
+ DBG << "Service request to " << (it->enabled()?"enable":"disable") << " service repo " << it->alias() << endl;
- if ( beEnabled )
+ if ( service.repoToEnableFind( it->alias() ) )
{
+ DBG << "User request to enable service repo " << it->alias() << endl;
+ toBeEnabled = true;
// Remove from enable request list.
// NOTE: repoToDisable is handled differently.
// It gets cleared on each refresh.
service.delRepoToEnable( it->alias() );
serviceModified = true;
}
+ else if ( service.repoToDisableFind( it->alias() ) )
+ {
+ DBG << "User request to disable service repo " << it->alias() << endl;
+ toBeEnabled = false;
+ }
+
RepoInfoList::iterator oldRepo( findAlias( it->alias(), oldRepos ) );
if ( oldRepo == oldRepos.end() )
{
// Not found in oldRepos ==> a new repo to add
- // At that point check whether a repo with the same alias
- // exists outside this service. Maybe forcefully re-alias
- // the existing repo?
+ // Make sure the service repo is created with the appropriate enablement
+ if ( ! indeterminate(toBeEnabled) )
+ it->setEnabled( toBeEnabled );
+
DBG << "Service adds repo " << it->alias() << " " << (it->enabled()?"enabled":"disabled") << endl;
addRepository( *it );
-
- // save repo credentials
- // ma@: task for modifyRepository?
}
else
{
// ==> an exising repo to check
bool oldRepoModified = false;
+ if ( indeterminate(toBeEnabled) )
+ {
+ // No user request: check for an old user modificaton otherwise follow service request.
+ // NOTE: Assert toBeEnabled is boolean afterwards!
+ if ( oldRepo->enabled() == it->enabled() )
+ toBeEnabled = it->enabled(); // service requests no change to the system
+ else
+ {
+ const auto & last = service.repoStates().find( oldRepo->alias() );
+ if ( last == service.repoStates().end() || last->second.enabled != it->enabled() )
+ toBeEnabled = it->enabled(); // service request has changed since last refresh -> follow
+ else
+ {
+ toBeEnabled = oldRepo->enabled(); // service request unchaned since last refresh -> keep user modification
+ DBG << "User modified service repo " << it->alias() << " may stay " << (toBeEnabled?"enabled":"disabled") << endl;
+ }
+ }
+ }
+
// changed enable?
- if ( beEnabled )
- {
- if ( ! oldRepo->enabled() )
- {
- DBG << "Service repo " << it->alias() << " gets enabled" << endl;
- oldRepo->setEnabled( true );
- oldRepoModified = true;
- }
- else
- {
- DBG << "Service repo " << it->alias() << " stays enabled" << endl;
- }
- }
- else if ( beDisabled )
- {
- if ( oldRepo->enabled() )
- {
- DBG << "Service repo " << it->alias() << " gets disabled" << endl;
- oldRepo->setEnabled( false );
- oldRepoModified = true;
- }
- else
- {
- DBG << "Service repo " << it->alias() << " stays disabled" << endl;
- }
- }
- else
- {
- DBG << "Service repo " << it->alias() << " stays " << (oldRepo->enabled()?"enabled":"disabled") << endl;
- }
+ if ( toBeEnabled == oldRepo->enabled() )
+ {
+ DBG << "Service repo " << it->alias() << " stays " << (oldRepo->enabled()?"enabled":"disabled") << endl;
+ }
+ else if ( toBeEnabled )
+ {
+ DBG << "Service repo " << it->alias() << " gets enabled" << endl;
+ oldRepo->setEnabled( true );
+ oldRepoModified = true;
+ }
+ else
+ {
+ DBG << "Service repo " << it->alias() << " gets disabled" << endl;
+ oldRepo->setEnabled( false );
+ oldRepoModified = true;
+ }
+
+ // all other attributes follow the service request:
+
+ // changed autorefresh
+ if ( oldRepo->autorefresh() != it->autorefresh() )
+ {
+ DBG << "Service repo " << it->alias() << " gets new AUTOREFRESH " << it->autorefresh() << endl;
+ oldRepo->setAutorefresh( it->autorefresh() );
+ oldRepoModified = true;
+ }
+
+ // changed priority?
+ if ( oldRepo->priority() != it->priority() )
+ {
+ DBG << "Service repo " << it->alias() << " gets new PRIORITY " << it->priority() << endl;
+ oldRepo->setPriority( it->priority() );
+ oldRepoModified = true;
+ }
// changed url?
// service repo can contain only one URL now, so no need to iterate.
@@ -1995,6 +2034,13 @@
serviceModified = true;
}
+ // Remember original service request for next refresh
+ if ( service.repoStates() != newRepoStates )
+ {
+ service.setRepoStates( std::move(newRepoStates) );
+ serviceModified = true;
+ }
+
////////////////////////////////////////////////////////////////////////////
// save service if modified:
if ( serviceModified )
@@ -2021,7 +2067,7 @@
if ( service.type() == ServiceType::PLUGIN )
{
- MIL << "Not modifying plugin service '" << oldAlias << "'" << endl;
+ WAR << "Not modifying plugin service '" << oldAlias << "'" << endl;
return;
}
@@ -2052,23 +2098,29 @@
_services.insert(service);
// changed properties affecting also repositories
- if( oldAlias != service.alias() // changed alias
- || oldService.enabled() != service.enabled() // changed enabled status
- )
+ if ( oldAlias != service.alias() // changed alias
+ || oldService.enabled() != service.enabled() ) // changed enabled status
{
std::vector<RepoInfo> toModify;
getRepositoriesInService(oldAlias, std::back_inserter(toModify));
for_( it, toModify.begin(), toModify.end() )
{
- if (oldService.enabled() && !service.enabled())
- it->setEnabled(false);
- else if (!oldService.enabled() && service.enabled())
- {
- //! \todo do nothing? the repos will be enabled on service refresh
- //! \todo how to know the service needs a (auto) refresh????
- }
- else
+ if ( oldService.enabled() != service.enabled() )
+ {
+ if ( service.enabled() )
+ {
+ // reset to last refreshs state
+ const auto & last = service.repoStates().find( it->alias() );
+ if ( last != service.repoStates().end() )
+ it->setEnabled( last->second.enabled );
+ }
+ else
+ it->setEnabled( false );
+ }
+
+ if ( oldAlias != service.alias() )
it->setService(service.alias());
+
modifyRepository(it->alias(), *it);
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-14.19.0/zypp/ServiceInfo.cc new/libzypp-14.21.0/zypp/ServiceInfo.cc
--- old/libzypp-14.19.0/zypp/ServiceInfo.cc 2014-01-24 11:28:53.000000000 +0100
+++ new/libzypp-14.21.0/zypp/ServiceInfo.cc 2014-05-27 16:33:19.000000000 +0200
@@ -41,6 +41,8 @@
repo::ServiceType type;
ReposToEnable reposToEnable;
ReposToDisable reposToDisable;
+ RepoStates repoStates;
+
public:
Impl()
@@ -164,6 +166,19 @@
void ServiceInfo::clearReposToDisable()
{ _pimpl->reposToDisable.clear(); }
+ const ServiceInfo::RepoStates & ServiceInfo::repoStates() const
+ { return _pimpl->repoStates; }
+
+ void ServiceInfo::setRepoStates( RepoStates newStates_r )
+ { swap( _pimpl->repoStates, newStates_r ); }
+
+ std::ostream & operator<<( std::ostream & str, const ServiceInfo::RepoState & obj )
+ {
+ return str
+ << "enabled=" << obj.enabled << " "
+ << "autorefresh=" << obj.autorefresh << " "
+ << "priority=" << obj.priority;
+ }
std::ostream & ServiceInfo::dumpAsIniOn( std::ostream & str ) const
{
@@ -171,6 +186,24 @@
<< "url = " << url() << endl
<< "type = " << type() << endl;
+ if ( ! repoStates().empty() )
+ {
+ unsigned cnt = 0U;
+ for ( const auto & el : repoStates() )
+ {
+ std::string tag( "repo_" );
+ tag += str::numstring( ++cnt );
+ const RepoState & state( el.second );
+
+ str << tag << "=" << el.first << endl
+ << tag << "_enabled=" << state.enabled << endl
+ << tag << "_autorefresh=" << state.autorefresh << endl;
+ if ( state.priority != RepoInfo::defaultPriority() )
+ str
+ << tag << "_priority=" << state.priority << endl;
+ }
+ }
+
if ( ! reposToEnableEmpty() )
str << "repostoenable = " << str::joinEscaped( reposToEnableBegin(), reposToEnableEnd() ) << endl;
if ( ! reposToDisableEmpty() )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-14.19.0/zypp/ServiceInfo.h new/libzypp-14.21.0/zypp/ServiceInfo.h
--- old/libzypp-14.19.0/zypp/ServiceInfo.h 2014-01-24 11:28:53.000000000 +0100
+++ new/libzypp-14.21.0/zypp/ServiceInfo.h 2014-05-27 16:33:19.000000000 +0200
@@ -18,7 +18,7 @@
#include "zypp/Url.h"
#include "zypp/repo/ServiceType.h"
-#include "zypp/repo/RepoInfoBase.h"
+#include "zypp/RepoInfo.h"
///////////////////////////////////////////////////////////////////
@@ -137,6 +137,40 @@
void clearReposToDisable();
//@}
+ /** \name The original repo state as defined by the repoindex.xml upon last refresh.
+ *
+ * This state is remembered to detect any user modifications applied to the repos.
+ * It may not be available for all repos or in plugin services. In this case all
+ * changes requested by a service refresh are applied unconditionally.
+ */
+ //@{
+ struct RepoState
+ {
+ bool enabled;
+ bool autorefresh;
+ unsigned priority;
+
+ RepoState()
+ : enabled( false ), autorefresh( true ), priority( RepoInfo::defaultPriority() )
+ {}
+ RepoState( const RepoInfo & repo_r )
+ : enabled( repo_r.enabled() ), autorefresh( repo_r.autorefresh() ), priority( repo_r.priority() )
+ {}
+ bool operator==( const RepoState & rhs ) const
+ { return( enabled==rhs.enabled && autorefresh==rhs.autorefresh && priority==rhs.priority ); }
+ bool operator!=( const RepoState & rhs ) const
+ { return ! operator==( rhs ); }
+ friend std::ostream & operator<<( std::ostream & str, const RepoState & obj );
+ };
+ typedef std::map<std::string,RepoState> RepoStates;
+
+ /** Access the remembered repository states. */
+ const RepoStates & repoStates() const;
+
+ /** Remember a new set of repository states. */
+ void setRepoStates( RepoStates newStates_r );
+ //@}
+
public:
/**
* Writes ServiceInfo to stream in ".service" format
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-14.19.0/zypp/ZYppCallbacks.h new/libzypp-14.21.0/zypp/ZYppCallbacks.h
--- old/libzypp-14.19.0/zypp/ZYppCallbacks.h 2014-04-10 19:20:45.000000000 +0200
+++ new/libzypp-14.21.0/zypp/ZYppCallbacks.h 2014-05-14 13:57:00.000000000 +0200
@@ -111,6 +111,12 @@
INVALID // the downloaded file is invalid
};
+ /** Hint that package is available in the local cache (no download needed).
+ * This will be the only trigger for an already cached package.
+ */
+ virtual void infoInCache( Resolvable::constPtr res_r, const Pathname & localfile_r )
+ {}
+
virtual void start(
Resolvable::constPtr /*resolvable_ptr*/
, const Url &/*url*/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-14.19.0/zypp/base/String.h new/libzypp-14.21.0/zypp/base/String.h
--- old/libzypp-14.19.0/zypp/base/String.h 2014-04-10 19:20:45.000000000 +0200
+++ new/libzypp-14.21.0/zypp/base/String.h 2014-05-09 11:04:45.000000000 +0200
@@ -410,6 +410,28 @@
*/
std::string & replaceAllFun( std::string & str_r, const std::string & from_r, function<std::string()> to_r );
+ /** Enhance readability: insert gaps at regular distance
+ * \code
+ * // no gaps
+ * Key Fingerprint: 22C07BA534178CD02EFE22AAB88B2FD43DBDC284
+ * // gapify 8
+ * Key Fingerprint: 22C07BA5 34178CD0 2EFE22AA B88B2FD4 3DBDC284
+ * // gapify 4
+ * Key Fingerprint: 22C0 7BA5 3417 8CD0 2EFE 22AA B88B 2FD4 3DBD C284
+ * // gapify 4, '-'
+ * Key Fingerprint: 22C0-7BA5-3417-8CD0-2EFE-22AA-B88B-2FD4-3DBD-C284
+ * \endcode
+ */
+ inline std::string gapify( std::string inp_r, std::string::size_type gap_r = 1, char gapchar = ' ' )
+ {
+ if ( gap_r && inp_r.size() > gap_r )
+ {
+ inp_r.reserve( inp_r.size() + (inp_r.size()-1)/gap_r );
+ for ( std::string::size_type pos = gap_r; pos < inp_r.size(); pos += gap_r+1 )
+ inp_r.insert( pos, 1, gapchar );
+ }
+ return inp_r;
+ }
///////////////////////////////////////////////////////////////////
/** \name Split. */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-14.19.0/zypp/media/MediaCurl.cc new/libzypp-14.21.0/zypp/media/MediaCurl.cc
--- old/libzypp-14.19.0/zypp/media/MediaCurl.cc 2014-01-13 12:04:52.000000000 +0100
+++ new/libzypp-14.21.0/zypp/media/MediaCurl.cc 2014-05-14 13:57:00.000000000 +0200
@@ -598,6 +598,13 @@
* Connect timeout
*/
SET_OPTION(CURLOPT_CONNECTTIMEOUT, _settings.connectTimeout());
+ // If a transfer timeout is set, also set CURLOPT_TIMEOUT to an upper limit
+ // just in case curl does not trigger its progress callback frequently
+ // enough.
+ if ( _settings.timeout() )
+ {
+ SET_OPTION(CURLOPT_TIMEOUT, 3600L);
+ }
// follow any Location: header that the server sends as part of
// an HTTP header (#113275)
@@ -715,7 +722,7 @@
{
SET_OPTION(CURLOPT_LOW_SPEED_LIMIT, _settings.minDownloadSpeed());
// default to 10 seconds at low speed
- SET_OPTION(CURLOPT_LOW_SPEED_TIME, 10L);
+ SET_OPTION(CURLOPT_LOW_SPEED_TIME, 60L);
}
#if CURLVERSION_AT_LEAST(7,15,5)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-14.19.0/zypp/parser/RepoindexFileReader.cc new/libzypp-14.21.0/zypp/parser/RepoindexFileReader.cc
--- old/libzypp-14.19.0/zypp/parser/RepoindexFileReader.cc 2013-03-20 09:29:30.000000000 +0100
+++ new/libzypp-14.21.0/zypp/parser/RepoindexFileReader.cc 2014-05-27 16:33:19.000000000 +0200
@@ -10,6 +10,7 @@
* Implementation of repoindex.xml file reader.
*/
#include <iostream>
+#include <unordered_map>
#include "zypp/base/String.h"
#include "zypp/base/Logger.h"
@@ -29,14 +30,68 @@
#undef ZYPP_BASE_LOGGER_LOGGROUP
#define ZYPP_BASE_LOGGER_LOGGROUP "parser"
-using namespace std;
-using namespace zypp::xml;
+using std::endl;
namespace zypp
{
namespace parser
{
+ using xml::Reader;
+ using xml::XmlString;
+ ///////////////////////////////////////////////////////////////////
+ namespace
+ {
+ class VarReplacer : private base::NonCopyable
+ {
+ public:
+ /** */
+ void setVar( const std::string & key_r, const std::string & val_r )
+ {
+ MIL << "*** Inject " << key_r << " = " << val_r;
+ _vars[key_r] = replace( val_r );
+ MIL << " (" << _vars[key_r] << ")" << endl;
+ }
+
+ std::string replace( const std::string & val_r ) const
+ {
+ std::string::size_type vbeg = val_r.find( "%{", 0 );
+ if ( vbeg == std::string::npos )
+ return val_r;
+
+ str::Str ret;
+ std::string::size_type cbeg = 0;
+ for( ; vbeg != std::string::npos; vbeg = val_r.find( "%{", vbeg ) )
+ {
+ std::string::size_type nbeg = vbeg+2;
+ std::string::size_type nend = val_r.find( "}", nbeg );
+ if ( nend == std::string::npos )
+ {
+ WAR << "Incomplete variable in '" << val_r << "'" << endl;
+ break;
+ }
+ const auto & iter = _vars.find( val_r.substr( nbeg, nend-nbeg ) );
+ if ( iter != _vars.end() )
+ {
+ if ( cbeg < vbeg )
+ ret << val_r.substr( cbeg, vbeg-cbeg );
+ ret << iter->second;
+ cbeg = nend+1;
+ }
+ else
+ WAR << "Undefined variable %{" << val_r.substr( nbeg, nend-nbeg ) << "} in '" << val_r << "'" << endl;
+ vbeg = nend+1;
+ }
+ if ( cbeg < val_r.size() )
+ ret << val_r.substr( cbeg );
+
+ return ret;
+ }
+ private:
+ std::unordered_map<std::string,std::string> _vars;
+ };
+ } // namespace
+ ///////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
//
@@ -57,11 +112,23 @@
*/
bool consumeNode( Reader & reader_r );
+ private:
+ bool getAttrValue( const std::string & key_r, Reader & reader_r, std::string & value_r )
+ {
+ const XmlString & s( reader_r->getAttribute( key_r ) );
+ if ( s.get() )
+ {
+ value_r = _replacer.replace( s.asString() );
+ return !value_r.empty();
+ }
+ value_r.clear();
+ return false;
+ }
private:
/** Function for processing collected data. Passed-in through constructor. */
ProcessResource _callback;
- string _target_distro;
+ VarReplacer _replacer;
};
///////////////////////////////////////////////////////////////////////
@@ -94,76 +161,78 @@
// xpath: /repoindex
if ( reader_r->name() == "repoindex" )
{
+ while ( reader_r.nextNodeAttribute() )
+ _replacer.setVar( reader_r->localName().asString(), reader_r->value().asString() );
return true;
}
// xpath: /repoindex/data (+)
if ( reader_r->name() == "repo" )
{
- XmlString s;
-
RepoInfo info;
-
- // enabled or disabled is controlled by the
- // reposToEnable/Disable list, unless the
- // enabled attribute is set
- info.setEnabled(false);
-
// Set some defaults that are not contained in the repo information
info.setAutorefresh( true );
+ info.setEnabled(false);
- // url and/or path
- string url_s;
- s = reader_r->getAttribute("url");
- if (s.get())
- url_s = s.asString();
- string path_s;
- s = reader_r->getAttribute("path");
- if (s.get())
- path_s = s.asString();
-
- if (url_s.empty() && path_s.empty())
- throw ParseException(str::form(_("One or both of '%s' or '%s' attributes is required."), "url", "path"));
- //! \todo FIXME this hardcodes the "/repo/" fragment - should not be if we want it to be usable by others!
- else if (url_s.empty())
- info.setPath(Pathname(string("/repo/") + path_s));
- else if (path_s.empty())
- info.setBaseUrl(Url(url_s));
- else
- info.setBaseUrl(Url(url_s + "/repo/" + path_s));
-
- // required alias
- s = reader_r->getAttribute("alias");
- if (!s.get())
- throw ParseException(str::form(_("Required attribute '%s' is missing."), "alias"));
- info.setAlias(s.asString());
-
- // optional type
- s = reader_r->getAttribute("type");
- if (s.get())
- info.setType(repo::RepoType(s.asString()));
+ std::string attrValue;
+
+ // required alias
+ // mandatory, so we can allow it in var replacement without reset
+ if ( getAttrValue( "alias", reader_r, attrValue ) )
+ {
+ info.setAlias( attrValue );
+ _replacer.setVar( "alias", attrValue );
+ }
+ else
+ throw ParseException(str::form(_("Required attribute '%s' is missing."), "alias"));
+
+ // required url
+ // SLES HACK: or path, but beware of the hardcoded '/repo' prefix!
+ {
+ std::string urlstr;
+ std::string pathstr;
+ getAttrValue( "url", reader_r, urlstr );
+ getAttrValue( "path", reader_r, pathstr );
+ if ( urlstr.empty() )
+ {
+ if ( pathstr.empty() )
+ throw ParseException(str::form(_("One or both of '%s' or '%s' attributes is required."), "url", "path"));
+ else
+ info.setPath( Pathname("/repo") / pathstr );
+ }
+ else
+ {
+ if ( pathstr.empty() )
+ info.setBaseUrl( Url(urlstr) );
+ else
+ {
+ Url url( urlstr );
+ url.setPathName( Pathname(url.getPathName()) / "repo" / pathstr );
+ info.setBaseUrl( url );
+ }
+ }
+ }
// optional name
- s = reader_r->getAttribute("name");
- if (s.get())
- info.setName(s.asString());
+ if ( getAttrValue( "name", reader_r, attrValue ) )
+ info.setName( attrValue );
// optional targetDistro
- s = reader_r->getAttribute("distro_target");
- if (s.get())
- info.setTargetDistribution(s.asString());
+ if ( getAttrValue( "distro_target", reader_r, attrValue ) )
+ info.setTargetDistribution( attrValue );
// optional priority
- s = reader_r->getAttribute("priority");
- if (s.get()) {
- info.setPriority(str::strtonum<unsigned>(s.asString()));
- }
+ if ( getAttrValue( "priority", reader_r, attrValue ) )
+ info.setPriority( str::strtonum<unsigned>( attrValue ) );
+
// optional enabled
- s = reader_r->getAttribute("enabled");
- if (s.get()) {
- info.setEnabled(str::strToTrue(s.asString()));
- }
+ if ( getAttrValue( "enabled", reader_r, attrValue ) )
+ info.setEnabled( str::strToBool( attrValue, info.enabled() ) );
+
+ // optional autorefresh
+ if ( getAttrValue( "autorefresh", reader_r, attrValue ) )
+ info.setAutorefresh( str::strToBool( attrValue, info.autorefresh() ) );
DBG << info << endl;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-14.19.0/zypp/parser/ServiceFileReader.cc new/libzypp-14.21.0/zypp/parser/ServiceFileReader.cc
--- old/libzypp-14.19.0/zypp/parser/ServiceFileReader.cc 2013-03-20 09:29:30.000000000 +0100
+++ new/libzypp-14.21.0/zypp/parser/ServiceFileReader.cc 2014-05-27 16:33:19.000000000 +0200
@@ -12,6 +12,7 @@
#include <iostream>
#include "zypp/base/Logger.h"
#include "zypp/base/String.h"
+#include "zypp/base/Regex.h"
#include "zypp/base/InputStream.h"
#include "zypp/base/UserRequestException.h"
@@ -54,6 +55,7 @@
MIL << (*its) << endl;
ServiceInfo service(*its);
+ std::map<std::string,std::pair<std::string,ServiceInfo::RepoState>> repoStates; // <repo_NUM,< alias,RepoState >>
for ( IniDict::entry_const_iterator it = dict.entriesBegin(*its);
it != dict.entriesEnd(*its);
@@ -88,10 +90,52 @@
service.addRepoToDisable( *ait );
}
}
+ else if ( str::startsWith( it->first, "repo_" ) )
+ {
+ static str::regex rxexpr( "([0-9]+)(_(.*))?" );
+ str::smatch what;
+ if ( str::regex_match( it->first.c_str()+5/*repo_*/, what, rxexpr ) )
+ {
+ std::string tag( what[1] );
+ if ( what.size() > 3 )
+ {
+ // attribute
+ if ( what[3] == "enabled" )
+ repoStates[tag].second.enabled = str::strToBool( it->second, repoStates[tag].second.enabled );
+ else if ( what[3] == "autorefresh" )
+ repoStates[tag].second.autorefresh = str::strToBool( it->second, repoStates[tag].second.autorefresh );
+ else if ( what[3] == "priority" )
+ str::strtonum( it->second, repoStates[tag].second.priority );
+ else
+ ERR << "Unknown attribute " << it->first << " ignored" << endl;
+ }
+ else
+ {
+ // alias
+ repoStates[tag].first = it->second;
+ }
+ }
+ else
+ ERR << "Unknown attribute " << it->first << " ignored" << endl;
+ }
else
ERR << "Unknown attribute " << it->first << " ignored" << endl;
}
+ if ( ! repoStates.empty() )
+ {
+ ServiceInfo::RepoStates data;
+ for ( const auto & el : repoStates )
+ {
+ if ( el.second.first.empty() )
+ ERR << "Missing alias for repo_" << el.first << "; ignore entry" << endl;
+ else
+ data[el.second.first] = el.second.second;
+ }
+ if ( ! data.empty() )
+ service.setRepoStates( std::move(data) );
+ }
+
MIL << "Linking ServiceInfo with file " << file << endl;
service.setFilepath(file);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-14.19.0/zypp/parser/xml/Node.h new/libzypp-14.21.0/zypp/parser/xml/Node.h
--- old/libzypp-14.19.0/zypp/parser/xml/Node.h 2013-05-02 11:11:26.000000000 +0200
+++ new/libzypp-14.21.0/zypp/parser/xml/Node.h 2014-05-27 16:33:19.000000000 +0200
@@ -71,6 +71,9 @@
XmlString getAttribute( const char * name_r ) const
{ return XmlString( xmlTextReaderGetAttribute( _reader, reinterpret_cast<const xmlChar *>(name_r) ),
XmlString::FREE ); }
+ /** \overload */
+ XmlString getAttribute( const std::string & name_r ) const
+ { return getAttribute( name_r.c_str() ); }
/** Provides a copy of the attribute value with the specified
* index relative to the containing element. */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-14.19.0/zypp/repo/PackageProvider.cc new/libzypp-14.21.0/zypp/repo/PackageProvider.cc
--- old/libzypp-14.19.0/zypp/repo/PackageProvider.cc 2014-01-24 08:44:53.000000000 +0100
+++ new/libzypp-14.21.0/zypp/repo/PackageProvider.cc 2014-05-14 13:57:00.000000000 +0200
@@ -208,25 +208,25 @@
ManagedFile PackageProvider::Impl::providePackage() const
{
+ ScopedGuard guardReport( newReport() );
+
// check for cache hit:
ManagedFile ret( providePackageFromCache() );
if ( ! ret->empty() )
{
MIL << "provided Package from cache " << _package << " at " << ret << endl;
+ report()->infoInCache( _package, ret );
return ret; // <-- cache hit
}
// HERE: cache misss, do download:
- Url url;
RepoInfo info = _package->repoInfo();
// FIXME we only support the first url for now.
if ( info.baseUrlsEmpty() )
ZYPP_THROW(Exception("No url in repository."));
- else
- url = * info.baseUrlsBegin();
MIL << "provide Package " << _package << endl;
- ScopedGuard guardReport( newReport() );
+ Url url = * info.baseUrlsBegin();
do {
_retry = false;
report()->start( _package, url );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-14.19.0/zypp/solver/detail/Testcase.cc new/libzypp-14.21.0/zypp/solver/detail/Testcase.cc
--- old/libzypp-14.19.0/zypp/solver/detail/Testcase.cc 2014-02-13 10:36:18.000000000 +0100
+++ new/libzypp-14.21.0/zypp/solver/detail/Testcase.cc 2014-05-21 16:24:51.000000000 +0200
@@ -120,6 +120,10 @@
str << "<dep name='packageand("
<< IdString(detail.lhs().id()) << ":"
<< IdString(detail.rhs().id()) << ")' />" << endl;
+ } else if (detail.capRel() == CapDetail::CAP_NAMESPACE
+ && detail.lhs().id() == NAMESPACE_OTHERPROVIDERS) {
+ str << "<dep name='otherproviders("
+ << IdString(detail.rhs().id()) << ")' />" << endl;
} else {
// modalias ?
IdString packageName;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-14.19.0/zypp/target/CommitPackageCache.cc new/libzypp-14.21.0/zypp/target/CommitPackageCache.cc
--- old/libzypp-14.19.0/zypp/target/CommitPackageCache.cc 2014-04-15 17:04:45.000000000 +0200
+++ new/libzypp-14.21.0/zypp/target/CommitPackageCache.cc 2014-05-27 16:33:19.000000000 +0200
@@ -127,13 +127,17 @@
{}
void CommitPackageCache::setCommitList( std::vector<sat::Solvable> commitList_r )
- {
- _pimpl->setCommitList( commitList_r );
- }
+ { _pimpl->setCommitList( commitList_r ); }
ManagedFile CommitPackageCache::get( const PoolItem & citem_r )
{ return _pimpl->get( citem_r ); }
+ bool CommitPackageCache::preloaded() const
+ { return _pimpl->preloaded(); }
+
+ void CommitPackageCache::preloaded( bool newval_r )
+ { _pimpl->preloaded( newval_r ); }
+
/******************************************************************
**
** FUNCTION NAME : operator<<
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-14.19.0/zypp/target/CommitPackageCache.h new/libzypp-14.21.0/zypp/target/CommitPackageCache.h
--- old/libzypp-14.19.0/zypp/target/CommitPackageCache.h 2014-04-15 17:04:45.000000000 +0200
+++ new/libzypp-14.21.0/zypp/target/CommitPackageCache.h 2014-05-27 16:33:19.000000000 +0200
@@ -84,6 +84,14 @@
ManagedFile get( sat::Solvable citem_r )
{ return get( PoolItem(citem_r) ); }
+ /** Whether preloaded hint is set.
+ * If preloaded the cache tries to avoid trigering the infoInCache CB,
+ * based on the assumption this was already done when preloading the cache.
+ */
+ bool preloaded() const;
+ /** Set preloaded hint. */
+ void preloaded( bool newval_r );
+
public:
/** Implementation. */
class Impl;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-14.19.0/zypp/target/CommitPackageCacheImpl.h new/libzypp-14.21.0/zypp/target/CommitPackageCacheImpl.h
--- old/libzypp-14.19.0/zypp/target/CommitPackageCacheImpl.h 2014-01-24 08:44:53.000000000 +0100
+++ new/libzypp-14.21.0/zypp/target/CommitPackageCacheImpl.h 2014-05-27 16:33:19.000000000 +0200
@@ -64,6 +64,12 @@
const std::vector<sat::Solvable> & commitList() const
{ return _commitList; }
+ bool preloaded() const
+ { return _preloaded; }
+
+ void preloaded( bool newval_r )
+ { _preloaded = newval_r; }
+
protected:
/** Let the Source provide the package. */
virtual ManagedFile sourceProvidePackage( const PoolItem & pi ) const
@@ -96,6 +102,7 @@
private:
std::vector<sat::Solvable> _commitList;
PackageProvider _packageProvider;
+ DefaultIntegral<bool,false> _preloaded;
};
///////////////////////////////////////////////////////////////////
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-14.19.0/zypp/target/CommitPackageCacheReadAhead.cc new/libzypp-14.21.0/zypp/target/CommitPackageCacheReadAhead.cc
--- old/libzypp-14.19.0/zypp/target/CommitPackageCacheReadAhead.cc 2014-01-24 08:44:53.000000000 +0100
+++ new/libzypp-14.21.0/zypp/target/CommitPackageCacheReadAhead.cc 2014-05-27 16:33:19.000000000 +0200
@@ -140,27 +140,39 @@
//
ManagedFile CommitPackageCacheReadAhead::get( const PoolItem & citem_r )
{
- // Non CD/DVD media provide their packages without cache.
- if ( ! onInteractiveMedia( citem_r ) )
+ ManagedFile ret;
+ if ( preloaded() )
{
- return sourceProvidePackage( citem_r );
+ // Check whether it's cached.
+ ManagedFile ret( sourceProvideCachedPackage( citem_r ) );
+ if ( ! ret->empty() )
+ return ret;
}
+ // else: we head for sourceProvidePackage(), even if the package
+ // was cached. The actual difference is that sourceProvidePackage
+ // will trigger the infoInCache CB that informs the application.
+ // Once the cache is preloaded we try to avoid this CB.
- // Check whether it's cached.
- ManagedFile ret( sourceProvideCachedPackage( citem_r ) );
- if ( ! ret->empty() )
- return ret;
- IMediaKey current( citem_r );
- if ( current != _lastInteractive )
+ // Preload cache if a CD/DVD change is pending to avoid
+ // switching back and forth...
+ if ( onInteractiveMedia( citem_r ) )
{
- if ( _lastInteractive != IMediaKey() )
+ ret = sourceProvideCachedPackage( citem_r );
+ if ( ! ret->empty() )
+ return ret;
+
+ IMediaKey current( citem_r );
+ if ( current != _lastInteractive )
{
- cacheLastInteractive( citem_r );
- }
+ if ( _lastInteractive != IMediaKey() )
+ {
+ cacheLastInteractive( citem_r );
+ }
- DBG << "Interactive change [" << ++_dbgChanges << "] from " << _lastInteractive << " to " << current << endl;
- _lastInteractive = current;
+ DBG << "Interactive change [" << ++_dbgChanges << "] from " << _lastInteractive << " to " << current << endl;
+ _lastInteractive = current;
+ }
}
// Provide and return the file from media.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-14.19.0/zypp/target/TargetImpl.cc new/libzypp-14.21.0/zypp/target/TargetImpl.cc
--- old/libzypp-14.19.0/zypp/target/TargetImpl.cc 2014-04-28 15:36:46.000000000 +0200
+++ new/libzypp-14.21.0/zypp/target/TargetImpl.cc 2014-05-27 16:33:19.000000000 +0200
@@ -1449,6 +1449,7 @@
}
}
}
+ packageCache.preloaded( true ); // try to avoid duplicate infoInCache CBs in commit
}
if ( miss )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-14.19.0/zypp/ui/SelectableImpl.h new/libzypp-14.21.0/zypp/ui/SelectableImpl.h
--- old/libzypp-14.19.0/zypp/ui/SelectableImpl.h 2013-07-11 10:50:17.000000000 +0200
+++ new/libzypp-14.21.0/zypp/ui/SelectableImpl.h 2014-05-14 13:57:00.000000000 +0200
@@ -153,10 +153,6 @@
// Here: installed and defaultCand are non NULL and it's not a
// multiversion install.
- // update candidate must come from the highest priority repo
- if ( defaultCand->repoInfo().priority() != (*availableBegin())->repoInfo().priority() )
- return PoolItem();
-
PoolItem installed( installedObj() );
// check vendor change
if ( ! ( ResPool::instance().resolver().allowVendorChange()
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0