Skip to content

Commit

Permalink
Ensure we properly prepare the /boot/efi partition
Browse files Browse the repository at this point in the history
  • Loading branch information
g7 committed Jul 2, 2013
1 parent 944e7af commit f0c3775
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
8 changes: 8 additions & 0 deletions linstaller/core/libmodules/partdisks/library.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,14 @@ def commit(obj, touched):
except:
return False

def prepareforEFI(partition):
""" Sets boot flag and type to EFI System Partition on the partition object. """

partition.setFlag(p.PARTITION_BOOT)

# Uh, it seems that by setting the boot flag we are marking the
# partition as EFI system partition. AWESOME!

def format_partition_for_real(obj, fs):
""" Uses mkfs.* to format partition. """

Expand Down
5 changes: 5 additions & 0 deletions linstaller/modules/partdisks/inst/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ def start(self):
if lib.is_mounted(key):
# Umount
lib.umount(path=key)
if useas == "/boot/efi":
# If this is going to be the /boot/efi partition
# we should make sure that it's going to have the
# proper partition type set to EFI System Partition
lib.prepareforEFI(lib.return_partition(key))
lib.mount_partition(path=key, target=mountpoint)

# Ok, it is mounted. Now let's see if it is empty
Expand Down
4 changes: 4 additions & 0 deletions linstaller/services/glade/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@

### HEADER TYPES ###
head_col = {"error":"#F07568","info":"#729fcf","ok":"#73d216","hold":"#f57900"}
#head_col = {"error":"#a40000", "info":"#204a87", "ok":"#4e9a06", "hold":"#ce5c00"}
head_ico = {"info":Gtk.STOCK_INFO,"error":Gtk.STOCK_DIALOG_ERROR,"ok":Gtk.STOCK_OK,"hold":Gtk.STOCK_EXECUTE}

class Service(linstaller.core.service.Service):
Expand Down Expand Up @@ -353,6 +354,9 @@ def set_header(self, icon, title, subtitle, appicon=None, toolbarinfo=True):
folor = Gdk.RGBA()
folor.parse("#363636")

# color = self.main.get_style_context().lookup_color("toolbar_gradient_base")[1]
# folor = self.main.get_style_context().lookup_color("toolbar_fg_color")[1]

# Get and set icon
if not appicon:
icon = head_ico[icon]
Expand Down

0 comments on commit f0c3775

Please sign in to comment.