[euca2ools] Fix handling of empty block device sizes

gholms gholms at fedoraproject.org
Fri Jun 10 22:51:46 UTC 2011


commit 626fae5f98a422a6742605da9f8e48550f845b09
Author: Garrett Holmstrom <gholms at fedoraproject.org>
Date:   Fri Jun 10 10:13:20 2011 -0700

    Fix handling of empty block device sizes

 euca2ools-1.3.1-emptyblock.patch |   16 ++++++++++++++++
 euca2ools.spec                   |   10 +++++++++-
 2 files changed, 25 insertions(+), 1 deletions(-)
---
diff --git a/euca2ools-1.3.1-emptyblock.patch b/euca2ools-1.3.1-emptyblock.patch
new file mode 100644
index 0000000..ee850e5
--- /dev/null
+++ b/euca2ools-1.3.1-emptyblock.patch
@@ -0,0 +1,16 @@
+Index: euca2ools-1.3/euca2ools/euca2ools/__init__.py
+===================================================================
+--- euca2ools-1.3.orig/euca2ools/euca2ools/__init__.py
++++ euca2ools-1.3/euca2ools/euca2ools/__init__.py
+@@ -1467,7 +1467,10 @@ class Euca2ool:
+                     if value_parts[0].startswith('ephemeral'):
+                         block_dev_type.ephemeral_name = value_parts[0]
+                 if len(value_parts) > 1:
+-                    block_dev_type.size = int(value_parts[1])
++                    try:
++                        block_dev_type.size = int(value_parts[1])
++                    except ValueError:
++                        pass
+                 if len(value_parts) > 2:
+                     if value_parts[2] == 'true':
+                         block_dev_type.delete_on_termination = True
diff --git a/euca2ools.spec b/euca2ools.spec
index a49c313..1e9afd2 100644
--- a/euca2ools.spec
+++ b/euca2ools.spec
@@ -1,8 +1,10 @@
+# Spec file license: MIT
+
 %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
 
 Name:           euca2ools
 Version:        1.3.1
-Release:        10%{?dist}
+Release:        11%{?dist}
 Summary:        Elastic Utility Computing Architecture Command-Line Tools
 
 Group:          Applications/Internet
@@ -56,6 +58,8 @@ Patch21:        euca2ools-1.3.1-euca20.patch
 Patch22:        euca2ools-1.3.1-smallbundle.patch
 # https://bugs.launchpad.net/euca2ools/+bug/771498
 Patch23:        euca2ools-1.3.1-mkfsopt.patch
+# (upstream bzr revision 424)
+Patch24:        euca2ools-1.3.1-emptyblock.patch
 
 Requires:       m2crypto
 Requires:       python-boto
@@ -104,6 +108,7 @@ Eucalyptus.  These tools are also compatible with Amazon AWS.
 %patch21 -p1
 %patch22 -p1
 %patch23 -p1
+%patch24 -p1
 
 
 %build
@@ -139,6 +144,9 @@ rm -rf %{buildroot}
 %doc README
 
 %changelog
+* Fri Jun 10 2011 Garrett Holmstrom <gholms at fedoraproject.org> - 1.3.1-11
+- Fixed handling of empty block device sizes
+
 * Tue Apr 26 2011 Garrett Holmstrom <gholms at fedoraproject.org> - 1.3.1-10
 - Added unlisted dependencies for euca-bundle-vol
 - Fixed typos introduced by the FSID patch


More information about the scm-commits mailing list