Commit d5472707 authored by intrigeri's avatar intrigeri
Browse files

Merge remote-tracking branch 'origin/master'

parents 7d63251f 507eeeb2
......@@ -102,6 +102,10 @@ class ImageCreator(object):
self.create_gpt()
self.create_partition()
self.set_partition_flags()
# set_partition_flags() resets the partition type
# before Buster's udisks2 + libblockdev 2.15-1
# (https://github.com/storaged-project/udisks/issues/418)
self.set_partition_type()
# XXX: Rescan?
self.format_partition()
with self.mount_partition():
......@@ -145,7 +149,6 @@ class ImageCreator(object):
arg_fd=GLib.Variant('h', 0),
arg_options=GLib.Variant('a{sv}', None),
fd_list=Gio.UnixFDList.new_from_array([image_fd]),
cancellable=None,
)
if not resulting_device:
......@@ -160,15 +163,13 @@ class ImageCreator(object):
logger.info("Tearing down loop device")
self.loop_device.props.loop.call_delete_sync(
arg_options=GLib.Variant('a{sv}', None),
cancellable=None,
)
def create_gpt(self):
logger.info("Creating GPT")
self.loop_device.props.block.call_format_sync(
arg_type='gpt',
arg_options=GLib.Variant('a{sv}', None),
cancellable=None
arg_options=GLib.Variant('a{sv}', None)
)
def create_partition(self):
......@@ -178,8 +179,7 @@ class ImageCreator(object):
arg_size=self.system_partition_size * 2**20,
arg_type=ESP_GUID,
arg_name=PARTITION_LABEL,
arg_options=GLib.Variant('a{sv}', None),
cancellable=None
arg_options=GLib.Variant('a{sv}', None)
)
# XXX: Tails Installer ignores GLib errors here
......@@ -194,8 +194,24 @@ class ImageCreator(object):
try:
self.partition.props.partition.call_set_flags_sync(
arg_flags=SYSTEM_PARTITION_FLAGS,
arg_options=GLib.Variant('a{sv}', None),
cancellable=None
arg_options=GLib.Variant('a{sv}', None)
)
except GLib.Error as e:
if "GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface" in e.message:
time.sleep(0.1)
continue
raise
return
def set_partition_type(self):
logger.info("Setting partition type")
start_time = time.perf_counter()
while time.perf_counter() - start_time < WAIT_FOR_PARTITION_TIMEOUT:
try:
self.partition.props.partition.call_set_type_sync(
ESP_GUID,
GLib.Variant('a{sv}', None)
)
except GLib.Error as e:
if "GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface" in e.message:
......@@ -213,8 +229,7 @@ class ImageCreator(object):
self.partition.props.block.call_format_sync(
arg_type='vfat',
arg_options=options,
cancellable=None
arg_options=options
)
@contextmanager
......@@ -222,8 +237,7 @@ class ImageCreator(object):
logger.info("Mounting partition")
try:
self.mountpoint = self.partition.props.filesystem.call_mount_sync(
arg_options=GLib.Variant('a{sv}', None),
cancellable=None
arg_options=GLib.Variant('a{sv}', None)
)
except GLib.Error as e:
if "org.freedesktop.UDisks2.Error.AlreadyMounted" in e.message and \
......@@ -239,7 +253,6 @@ class ImageCreator(object):
logger.info("Unmounting partition")
self.partition.props.filesystem.call_unmount_sync(
arg_options=GLib.Variant('a{sv}', {'force': GLib.Variant('b', True)}),
cancellable=None,
)
def set_permissions(self):
......
This diff is collapsed.
......@@ -105,33 +105,43 @@
</div>
<div class="counter">
<div class="counter-amount donate-en">$30&#8239;359 out of $140&#8239;000</div>
<div class="counter-amount donate-es">26&#8239;956€ de 120&#8239;000€</div>
<div class="counter-amount donate-de">26&#8239;956€ von 120&#8239;000€</div>
<div class="counter-amount donate-fa">$30&#8239;359 out of $140&#8239;000</div>
<div class="counter-amount donate-fr">26&#8239;956€ sur 120&#8239;000€</div>
<div class="counter-amount donate-it">26&#8239;956€ out of 120&#8239;000€</div>
<div class="counter-amount donate-pt">26&#8239;956€ out of 120&#8239;000€</div>
<!--
Checklist when updating:
- [ ] Total in EUR
- [ ] Total in USD
- [ ] Last updated
- [ ] Percent
- [ ] Remaining days
-->
<div class="counter-amount donate-en">$31&#8239;991 out of $140&#8239;000</div>
<div class="counter-amount donate-es">28&#8239;126€ de 120&#8239;000€</div>
<div class="counter-amount donate-de">28&#8239;126€ von 120&#8239;000€</div>
<div class="counter-amount donate-fa">$31&#8239;991 out of $140&#8239;000</div>
<div class="counter-amount donate-fr">28&#8239;126€ sur 120&#8239;000€</div>
<div class="counter-amount donate-it">28&#8239;126€ out of 120&#8239;000€</div>
<div class="counter-amount donate-pt">28&#8239;126€ out of 120&#8239;000€</div>
<div id="counter-last-updated-info"><img src="<TMPL_VAR BASEURL>lib/info.png" alt="Info"></div>
<div id="counter-last-updated">
<span class="donate-en">Last updated on 2018-11-15.</span>
<span class="donate-es">Última actualización el 2018-11-15.</span>
<span class="donate-de">Last updated on 2018-11-15.</span>
<span class="donate-fa">Last updated on 2018-11-15.</span>
<span class="donate-fr">Dernière mise à jour le 2018-11-15.</span>
<span class="donate-it">Last updated on 2018-11-15.</span>
<span class="donate-pt">Last updated on 2018-11-15.</span>
<span class="donate-en">Last updated on 2018-11-29.</span>
<span class="donate-es">Última actualización el 2018-11-29.</span>
<span class="donate-de">Last updated on 2018-11-29.</span>
<span class="donate-fa">Last updated on 2018-11-29.</span>
<span class="donate-fr">Dernière mise à jour le 2018-11-29.</span>
<span class="donate-it">Last updated on 2018-11-29.</span>
<span class="donate-pt">Last updated on 2018-11-29.</span>
</div>
<div class="counter-progress">
<div class="counter-progress-bar" role="progressbar" style="width: 22%" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100"></div>
<div class="counter-progress-bar" role="progressbar" style="width: 23%" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<div class="donate-en"><div class="counter-days"><span class="counter-number-of-days">61</span> days remaining</div></div>
<div class="donate-es"><div class="counter-days">Quedan <span class="counter-number-of-days">61</span> días</div></div>
<div class="donate-de"><div class="counter-days">Noch <span class="counter-number-of-days">61</span> Tage übrig</div></div>
<div class="donate-fa"><div class="counter-days"><span class="counter-number-of-days">61</span> days remaining</div></div>
<div class="donate-fr"><div class="counter-days"><span class="counter-number-of-days">61</span> jours restants</div></div>
<div class="donate-it"><div class="counter-days"><span class="counter-number-of-days">61</span> days remaining</div></div>
<div class="donate-pt"><div class="counter-days"><span class="counter-number-of-days">61</span> days remaining</div></div>
<div class="donate-en"><div class="counter-days"><span class="counter-number-of-days">47</span> days remaining</div></div>
<div class="donate-es"><div class="counter-days">Quedan <span class="counter-number-of-days">47</span> días</div></div>
<div class="donate-de"><div class="counter-days">Noch <span class="counter-number-of-days">47</span> Tage übrig</div></div>
<div class="donate-fa"><div class="counter-days"><span class="counter-number-of-days">47</span> days remaining</div></div>
<div class="donate-fr"><div class="counter-days"><span class="counter-number-of-days">47</span> jours restants</div></div>
<div class="donate-it"><div class="counter-days"><span class="counter-number-of-days">47</span> days remaining</div></div>
<div class="donate-pt"><div class="counter-days"><span class="counter-number-of-days">47</span> days remaining</div></div>
</div>
</a>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment