liveusb-creator | 2 ++
liveusb-creator.spec | 5 ++++-
liveusb/creator.py | 10 +++++++++-
liveusb/gui.py | 4 ++++
liveusb/linux_dialog.py | 31 ++++++++++++++++---------------
setup.py | 4 ++--
6 files changed, 37 insertions(+), 19 deletions(-)
New commits:
commit c9ce39b064fcfcb23673c3691d32f3b435e713fd
Author: Luke Macken <lmacken(a)redhat.com>
Date: Mon Jan 4 14:48:59 2010 -0500
Disable --format until it is tested
diff --git a/liveusb-creator b/liveusb-creator
index 1084120..210b7a4 100755
--- a/liveusb-creator
+++ b/liveusb-creator
@@ -52,8 +52,8 @@ def parse_args():
parser.add_option('-H', '--hash', dest='hash',
action='store', metavar='HASH', default='sha1',
help='Use a specific checksum algorithm (default: sha1)')
- parser.add_option('-F', '--format', dest='format', action='store_true', default=False,
- help='Format the device as FAT32 (WARNING: destructive)')
+ #parser.add_option('-F', '--format', dest='format', action='store_true', default=False,
+ # help='Format the device as FAT32 (WARNING: destructive)')
#parser.add_option('-z', '--usb-zip', dest='zip', action='store_true',
# help='Initialize device with zipdrive-compatible geometry'
# ' for booting in USB-ZIP mode with legacy BIOSes. '
commit 10b2c9bafe446c560bac7803cd850127f8a3a659
Author: Luke Macken <lmacken(a)redhat.com>
Date: Mon Jan 4 14:47:16 2010 -0500
Make our EFI configuration copying a little more robust
diff --git a/liveusb/creator.py b/liveusb/creator.py
index 816cfc2..5521ac5 100755
--- a/liveusb/creator.py
+++ b/liveusb/creator.py
@@ -304,7 +304,10 @@ class LiveUSBCreator(object):
# only copy/overwrite files we had originally started with
for (infile, outfile) in copies:
if os.path.exists(outfile):
- shutil.copyfile(infile, outfile)
+ try:
+ shutil.copyfile(infile, outfile)
+ except Exception, e:
+ self.log.warning("Unable to copy %s to %s: %s" % (infile, outfile, str(e)))
def delete_liveos(self):
""" Delete the existing LiveOS """
commit 3fc3b044e580deb1af56ef652f09ce1664e577c9
Author: Luke Macken <lmacken(a)redhat.com>
Date: Mon Jan 4 14:47:08 2010 -0500
Bump our version for the upcoming 3.9.2 release
diff --git a/liveusb-creator.spec b/liveusb-creator.spec
index 22976db..5eacb9b 100644
--- a/liveusb-creator.spec
+++ b/liveusb-creator.spec
@@ -1,7 +1,7 @@
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
Name: liveusb-creator
-Version: 3.9
+Version: 3.9.2
Release: 1%{?dist}
Summary: A liveusb creator
@@ -68,6 +68,9 @@ rm -rf %{buildroot}
%config(noreplace) %{_sysconfdir}/security/console.apps/%{name}
%changelog
+* Tue Dec 08 2009 Luke Macken <lmacken(a)redhat.com> - 3.9.1-1
+- 3.9.1 bugfix release
+
* Tue Dec 01 2009 Luke Macken <lmacken(a)redhat.com> - 3.9-1
- 3.9 release
diff --git a/setup.py b/setup.py
index 4c260f7..11db653 100644
--- a/setup.py
+++ b/setup.py
@@ -14,7 +14,7 @@ if sys.platform == 'win32':
setup(
name = 'liveusb-creator',
- version = '3.9',
+ version = '3.9.2',
packages = ['liveusb', 'liveusb/urlgrabber'],
scripts = ['liveusb-creator'],
license = 'GNU General Public License (GPL)',
@@ -55,7 +55,7 @@ if sys.platform == 'win32':
else:
setup(
name = 'liveusb-creator',
- version = '3.9',
+ version = '3.9.2',
packages = ['liveusb'],
scripts = ['liveusb-creator'],
license = 'GNU General Public License (GPL)',
commit f29f3b7967a05b771d15401b4074a0cfff065647
Author: Luke Macken <lmacken(a)redhat.com>
Date: Mon Jan 4 14:46:14 2010 -0500
Make our GUI labels translatable through our standard _ function
diff --git a/liveusb/linux_dialog.py b/liveusb/linux_dialog.py
index 4ea9c38..38e039e 100644
--- a/liveusb/linux_dialog.py
+++ b/liveusb/linux_dialog.py
@@ -8,6 +8,7 @@
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
+from liveusb import _
class Ui_Dialog(object):
def setupUi(self, Dialog):
@@ -94,21 +95,21 @@ class Ui_Dialog(object):
QtCore.QMetaObject.connectSlotsByName(Dialog)
def retranslateUi(self, Dialog):
- Dialog.setWindowTitle(QtGui.QApplication.translate("Dialog", "Fedora LiveUSB Creator", None, QtGui.QApplication.UnicodeUTF8))
- self.startButton.setWhatsThis(QtGui.QApplication.translate("Dialog", "This button will begin the LiveUSB creation process. This entails optionally downloading a release (if an existing one wasn\'t selected), extracting the ISO to the USB device, creating the persistent overlay, and installing the bootloader.", None, QtGui.QApplication.UnicodeUTF8))
- self.startButton.setText(QtGui.QApplication.translate("Dialog", "Create Live USB", None, QtGui.QApplication.UnicodeUTF8))
- self.textEdit.setWhatsThis(QtGui.QApplication.translate("Dialog", "This is the status console, where all messages get written to.", None, QtGui.QApplication.UnicodeUTF8))
- self.progressBar.setWhatsThis(QtGui.QApplication.translate("Dialog", "This is the progress bar that will indicate how far along in the LiveUSB creation process you are", None, QtGui.QApplication.UnicodeUTF8))
- self.downloadGroup.setWhatsThis(QtGui.QApplication.translate("Dialog", "If you do not select an existing Live CD, the selected release will be downloaded for you.", None, QtGui.QApplication.UnicodeUTF8))
- self.downloadGroup.setTitle(QtGui.QApplication.translate("Dialog", "Download Fedora", None, QtGui.QApplication.UnicodeUTF8))
- self.label_2.setText(QtGui.QApplication.translate("Dialog", "or", None, QtGui.QApplication.UnicodeUTF8))
- self.groupBox.setWhatsThis(QtGui.QApplication.translate("Dialog", "This button allows you to browse for an existing Live CD ISO that you have previously downloaded. If you do not select one, a release will be downloaded for you automatically.", None, QtGui.QApplication.UnicodeUTF8))
- self.groupBox.setTitle(QtGui.QApplication.translate("Dialog", "Use existing Live CD", None, QtGui.QApplication.UnicodeUTF8))
- self.isoBttn.setText(QtGui.QApplication.translate("Dialog", "Browse", None, QtGui.QApplication.UnicodeUTF8))
+ Dialog.setWindowTitle(QtGui.QApplication.translate("Dialog", _("Fedora LiveUSB Creator"), None, QtGui.QApplication.UnicodeUTF8))
+ self.startButton.setWhatsThis(QtGui.QApplication.translate("Dialog", _("This button will begin the LiveUSB creation process. This entails optionally downloading a release (if an existing one wasn\'t selected), extracting the ISO to the USB device, creating the persistent overlay, and installing the bootloader."), None, QtGui.QApplication.UnicodeUTF8))
+ self.startButton.setText(QtGui.QApplication.translate("Dialog", _("Create Live USB"), None, QtGui.QApplication.UnicodeUTF8))
+ self.textEdit.setWhatsThis(QtGui.QApplication.translate("Dialog", _("This is the status console, where all messages get written to."), None, QtGui.QApplication.UnicodeUTF8))
+ self.progressBar.setWhatsThis(QtGui.QApplication.translate("Dialog", _("This is the progress bar that will indicate how far along in the LiveUSB creation process you are"), None, QtGui.QApplication.UnicodeUTF8))
+ self.downloadGroup.setWhatsThis(QtGui.QApplication.translate("Dialog", _("If you do not select an existing Live CD, the selected release will be downloaded for you."), None, QtGui.QApplication.UnicodeUTF8))
+ self.downloadGroup.setTitle(QtGui.QApplication.translate("Dialog", _("Download Fedora"), None, QtGui.QApplication.UnicodeUTF8))
+ self.label_2.setText(QtGui.QApplication.translate("Dialog", _("or"), None, QtGui.QApplication.UnicodeUTF8))
+ self.groupBox.setWhatsThis(QtGui.QApplication.translate("Dialog", _("This button allows you to browse for an existing Live CD ISO that you have previously downloaded. If you do not select one, a release will be downloaded for you automatically."), None, QtGui.QApplication.UnicodeUTF8))
+ self.groupBox.setTitle(QtGui.QApplication.translate("Dialog", _("Use existing Live CD"), None, QtGui.QApplication.UnicodeUTF8))
+ self.isoBttn.setText(QtGui.QApplication.translate("Dialog", _("Browse"), None, QtGui.QApplication.UnicodeUTF8))
self.isoBttn.setShortcut(QtGui.QApplication.translate("Dialog", "Alt+B", None, QtGui.QApplication.UnicodeUTF8))
- self.groupBox_2.setWhatsThis(QtGui.QApplication.translate("Dialog", "This is the USB stick that you want to install your Live CD on. This device must be formatted with the FAT filesystem.", None, QtGui.QApplication.UnicodeUTF8))
- self.groupBox_2.setTitle(QtGui.QApplication.translate("Dialog", "Target Device", None, QtGui.QApplication.UnicodeUTF8))
- self.overlayTitle.setWhatsThis(QtGui.QApplication.translate("Dialog", "By allocating extra space on your USB stick for a persistent overlay, you will be able to store data and make permanent modifications to your live operating system. Without it, you will not be able to save data that will persist after a reboot.", None, QtGui.QApplication.UnicodeUTF8))
- self.overlayTitle.setTitle(QtGui.QApplication.translate("Dialog", "Persistent Storage (0 MB)", None, QtGui.QApplication.UnicodeUTF8))
+ self.groupBox_2.setWhatsThis(QtGui.QApplication.translate("Dialog", _("This is the USB stick that you want to install your Live CD on. This device must be formatted with the FAT filesystem."), None, QtGui.QApplication.UnicodeUTF8))
+ self.groupBox_2.setTitle(QtGui.QApplication.translate("Dialog", _("Target Device"), None, QtGui.QApplication.UnicodeUTF8))
+ self.overlayTitle.setWhatsThis(QtGui.QApplication.translate("Dialog", _("By allocating extra space on your USB stick for a persistent overlay, you will be able to store data and make permanent modifications to your live operating system. Without it, you will not be able to save data that will persist after a reboot."), None, QtGui.QApplication.UnicodeUTF8))
+ self.overlayTitle.setTitle(QtGui.QApplication.translate("Dialog", _("Persistent Storage") + " (0 MB)", None, QtGui.QApplication.UnicodeUTF8))
import resources_rc
commit ed0007a3ff4560382b1c2d78af65cefb63b3698c
Author: Luke Macken <lmacken(a)redhat.com>
Date: Sat Dec 26 23:49:24 2009 -0500
Add a --format command line option, and a windows implemention
diff --git a/liveusb-creator b/liveusb-creator
index 87dddc7..1084120 100755
--- a/liveusb-creator
+++ b/liveusb-creator
@@ -52,6 +52,8 @@ def parse_args():
parser.add_option('-H', '--hash', dest='hash',
action='store', metavar='HASH', default='sha1',
help='Use a specific checksum algorithm (default: sha1)')
+ parser.add_option('-F', '--format', dest='format', action='store_true', default=False,
+ help='Format the device as FAT32 (WARNING: destructive)')
#parser.add_option('-z', '--usb-zip', dest='zip', action='store_true',
# help='Initialize device with zipdrive-compatible geometry'
# ' for booting in USB-ZIP mode with legacy BIOSes. '
diff --git a/liveusb/creator.py b/liveusb/creator.py
index bd0f200..816cfc2 100755
--- a/liveusb/creator.py
+++ b/liveusb/creator.py
@@ -1105,3 +1105,8 @@ class WindowsLiveUSBCreator(LiveUSBCreator):
hash = getattr(hashlib, self.opts.hash, 'sha1')()
map(hash.update, checksums)
self.log.info("%s = %s" % (hash.name, hash.hexdigest()))
+
+ def format_device(self):
+ """ Format the selected partition as FAT32 """
+ self.log.info('Formatting %s as FAT32' % self.drive['device'])
+ self.popen('format /Q /X /y /V:Fedora /FS:FAT32 %s' % self.drive['device'])
diff --git a/liveusb/gui.py b/liveusb/gui.py
index b59fef8..48a3c90 100755
--- a/liveusb/gui.py
+++ b/liveusb/gui.py
@@ -157,6 +157,10 @@ class LiveUSBThread(QtCore.QThread):
self.live.log.addHandler(handler)
now = datetime.now()
try:
+ if self.parent.opts.format:
+ self.live.unmount_device()
+ self.live.format_device()
+
# Initialize zip-drive-compatible geometry
#if self.parent.opts.zip:
# self.live.dest = self.live.drive['mount']