Hello community,

here is the log from the commit of package yast2-bootloader for 
openSUSE:Factory checked in at 2016-07-01 09:51:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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        
2016-06-02 12:49:57.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-bootloader.new/yast2-bootloader.changes   
2016-07-01 09:51:50.000000000 +0200
@@ -1,0 +2,12 @@
+Wed Jun 15 12:42:08 UTC 2016 - [email protected]
+
+- do not activate partition on gpt disks on ppc (bnc#983194)
+- 3.1.194
+
+-------------------------------------------------------------------
+Mon Jun 13 13:36:51 UTC 2016 - [email protected]
+
+- fix unknown method extended_partition (bnc#983062)
+- 3.1.193
+
+-------------------------------------------------------------------

Old:
----
  yast2-bootloader-3.1.192.tar.bz2

New:
----
  yast2-bootloader-3.1.194.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ yast2-bootloader.spec ++++++
--- /var/tmp/diff_new_pack.WXnbWH/_old  2016-07-01 09:51:51.000000000 +0200
+++ /var/tmp/diff_new_pack.WXnbWH/_new  2016-07-01 09:51:51.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-bootloader
-Version:        3.1.192
+Version:        3.1.194
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

++++++ yast2-bootloader-3.1.192.tar.bz2 -> yast2-bootloader-3.1.194.tar.bz2 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-bootloader-3.1.192/package/yast2-bootloader.changes 
new/yast2-bootloader-3.1.194/package/yast2-bootloader.changes
--- old/yast2-bootloader-3.1.192/package/yast2-bootloader.changes       
2016-06-01 15:46:17.000000000 +0200
+++ new/yast2-bootloader-3.1.194/package/yast2-bootloader.changes       
2016-06-15 15:17:59.000000000 +0200
@@ -1,4 +1,16 @@
 -------------------------------------------------------------------
+Wed Jun 15 12:42:08 UTC 2016 - [email protected]
+
+- do not activate partition on gpt disks on ppc (bnc#983194)
+- 3.1.194
+
+-------------------------------------------------------------------
+Mon Jun 13 13:36:51 UTC 2016 - [email protected]
+
+- fix unknown method extended_partition (bnc#983062)
+- 3.1.193
+
+-------------------------------------------------------------------
 Wed Jun  1 13:31:57 UTC 2016 - [email protected]
 
 - Drop yast2-bootloader-devel-doc package (fate#320356)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-bootloader-3.1.192/package/yast2-bootloader.spec 
new/yast2-bootloader-3.1.194/package/yast2-bootloader.spec
--- old/yast2-bootloader-3.1.192/package/yast2-bootloader.spec  2016-06-01 
15:46:17.000000000 +0200
+++ new/yast2-bootloader-3.1.194/package/yast2-bootloader.spec  2016-06-15 
15:17:59.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-bootloader
-Version:        3.1.192
+Version:        3.1.194
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-bootloader-3.1.192/src/lib/bootloader/stage1.rb 
new/yast2-bootloader-3.1.194/src/lib/bootloader/stage1.rb
--- old/yast2-bootloader-3.1.192/src/lib/bootloader/stage1.rb   2016-06-01 
15:46:17.000000000 +0200
+++ new/yast2-bootloader-3.1.194/src/lib/bootloader/stage1.rb   2016-06-15 
15:17:59.000000000 +0200
@@ -145,17 +145,17 @@
 
     # returns hash, where key is symbol for location and value is device name
     def available_locations
-      res = {}
-
       case Yast::Arch.architecture
       when "i386", "x86_64"
-        available_partitions(res)
+        res = available_partitions
         res[:mbr] = Yast::BootStorage.mbr_disk
+
+        return res
       else
         log.info "no available non-custom location for arch 
#{Yast::Arch.architecture}"
-      end
 
-      res
+        return {}
+      end
     end
 
     def can_use_boot?
@@ -212,15 +212,21 @@
       end
     end
 
-    def available_partitions(res)
-      return unless can_use_boot?
+    def available_partitions
+      return {} unless can_use_boot?
 
+      res = {}
       if Yast::BootStorage.separated_boot?
         res[:boot] = Yast::BootStorage.BootPartitionDevice
       else
         res[:root] = Yast::BootStorage.RootPartitionDevice
       end
-      res[:extended] = extended_partition if extended_partition?
+
+      if extended_partition?
+        res[:extended] = Yast::BootStorage.ExtendedPartitionDevice
+      end
+
+      res
     end
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-bootloader-3.1.192/src/lib/bootloader/stage1_proposal.rb 
new/yast2-bootloader-3.1.194/src/lib/bootloader/stage1_proposal.rb
--- old/yast2-bootloader-3.1.192/src/lib/bootloader/stage1_proposal.rb  
2016-06-01 15:46:17.000000000 +0200
+++ new/yast2-bootloader-3.1.194/src/lib/bootloader/stage1_proposal.rb  
2016-06-15 15:17:59.000000000 +0200
@@ -197,7 +197,7 @@
         if partition
           assign_bootloader_device([:custom, partition])
 
-          stage1.activate = true
+          stage1.activate = !on_gpt?(partition) # do not activate on gpt disks 
see (bnc#983194)
           stage1.generic_mbr = false
         # handle diskless setup, in such case do not write boot code anywhere
         # (bnc#874466)
@@ -243,6 +243,13 @@
         log.info "nothing better so lets return first available prep"
         partitions.first
       end
+
+      def on_gpt?(partition)
+        target_map = Yast::Storage.GetTargetMap
+        real_partitions = Bootloader::Stage1Device.new(partition).real_devices
+        disks = real_partitions.map { |p| Yast::Storage.GetDisk(target_map, p) 
}
+        disks.any? { |d| d["label"] == "gpt" }
+      end
     end
 
     AVAILABLE_PROPOSALS = {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-bootloader-3.1.192/test/stage1_test.rb 
new/yast2-bootloader-3.1.194/test/stage1_test.rb
--- old/yast2-bootloader-3.1.192/test/stage1_test.rb    2016-06-01 
15:46:17.000000000 +0200
+++ new/yast2-bootloader-3.1.194/test/stage1_test.rb    2016-06-15 
15:17:59.000000000 +0200
@@ -86,6 +86,21 @@
         expect(subject.devices).to eq(["/dev/sda1"])
       end
 
+      it "activate partition if it is on DOS partition table" do
+        expect(Yast::Storage).to receive(:GetDisk).with(anything, "/dev/sdb1")
+          .and_return("label" => "dos")
+        subject.propose
+
+        expect(subject.activate?).to eq true
+      end
+
+      it "does not activate partition if it is on GPT" do
+        expect(Yast::Storage).to receive(:GetDisk).with(anything, "/dev/sdb1")
+          .and_return("label" => "gpt")
+        subject.propose
+
+        expect(subject.activate?).to eq false
+      end
     end
 
     it "sets no device for s390" do


Reply via email to